--- vim-7.1.314.orig/runtime/autoload/ada.vim
+++ vim-7.1.314/runtime/autoload/ada.vim
@@ -1,14 +1,16 @@
 "------------------------------------------------------------------------------
 "  Description: Perform Ada specific completion & tagging.
 "     Language: Ada (2005)
-"	   $Id: ada.vim,v 1.1 2007/05/05 18:02:22 vimboss Exp $
-"   Maintainer: Martin Krischik
+"	   $Id: ada.vim 774 2007-09-17 09:11:59Z krischik $
+"   Maintainer: Martin Krischik <krischik@users.sourceforge.net>
+"		Taylor Venable <taylor@metasyntax.net>
 "		Neil Bird <neil@fnxweb.com>
-"      $Author: vimboss $
-"	 $Date: 2007/05/05 18:02:22 $
-"      Version: 4.2
-"    $Revision: 1.1 $
-"     $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $
+"		Ned Okie <nokie@radford.edu>
+"      $Author: krischik $
+"	 $Date: 2007-09-17 05:11:59 -0400 (Mon, 17 Sep 2007) $
+"      Version: 4.5
+"    $Revision: 774 $
+"     $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/tags/vim-ada-mode/4.3.9/vim/autoload/ada.vim $
 "      History: 24.05.2006 MK Unified Headers
 "		26.05.2006 MK ' should not be in iskeyword.
 "		16.07.2006 MK Ada-Mode as vim-ball
@@ -17,6 +19,10 @@
 "		05.11.2006 MK Bram suggested not to use include protection for
 "			      autoload
 "		05.11.2006 MK Bram suggested to save on spaces
+"		08.07.2007 TV fix mapleader problems.
+"	        09.05.2007 MK Session just won't work no matter how much
+"			      tweaking is done
+"		19.09.2007 NO still some mapleader problems
 "    Help Page: ft-ada-functions
 "------------------------------------------------------------------------------
 
@@ -425,7 +431,15 @@
    execute '!ctags --excmd=number ' . l:Filename
 endfunction ada#Create_Tags
 
-function ada#Switch_Session (New_Session)   "{{{1
+" Section: ada#Switch_Session {{{1
+"
+function ada#Switch_Session (New_Session)
+   " 
+   " you should not save to much date into the seession since they will
+   " be sourced
+   "
+   set sessionoptions=buffers,curdir,folds,globals,resize,slash,tabpages,tabpages,unix,winpos,winsize
+
    if a:New_Session != v:this_session
       "
       "  We actualy got a new session - otherwise there
@@ -437,18 +451,23 @@
 
       let v:this_session = a:New_Session
 
-      if filereadable (v:this_session)
-	 execute 'source ' . v:this_session
-      endif
+      "if filereadable (v:this_session)
+	 "execute 'source ' . v:this_session
+      "endif
 
       augroup ada_session
 	 autocmd!
 	 autocmd VimLeavePre * execute 'mksession! ' . v:this_session
       augroup END
+      "
+      "if exists ("g:Tlist_Auto_Open") && g:Tlist_Auto_Open
+	 "TlistOpen
+      "endif
+
    endif
 
    return
-endfunction ada#Switch_Session	 "}}}1
+endfunction ada#Switch_Session	
 
 " Section: GNAT Pretty Printer folding {{{1
 "
@@ -546,18 +565,23 @@
 	\ a:Keys		 .
 	\" <C-O>:" . a:Command . "<CR>"
    else
+      if exists("g:mapleader")
+         let l:leader = g:mapleader
+      else
+         let l:leader = '\'
+      endif
       execute
 	\ "50amenu " .
 	\ "Ada."  . escape(a:Text, ' ') .
-	\ "<Tab>" . escape(g:mapleader . "a" . a:Keys , '\') .
+	\ "<Tab>" . escape(l:leader . "a" . a:Keys , '\') .
 	\ " :"	  . a:Command . "<CR>"
       execute
 	\ "nnoremap <buffer>" .
-	\ escape(g:mapleader . "a" . a:Keys , '\') .
+	\ escape(l:leader . "a" . a:Keys , '\') .
 	\" :" . a:Command
       execute
 	\ "inoremap <buffer>" .
-	\ escape(g:mapleader . "a" . a:Keys , '\') .
+	\ escape(l:leader . "a" . a:Keys , '\') .
 	\" <C-O>:" . a:Command
    endif
    return
@@ -566,10 +590,15 @@
 " Section: ada#Map_Popup {{{2
 "
 function ada#Map_Popup (Text, Keys, Command)
+   if exists("g:mapleader")
+      let l:leader = g:mapleader
+   else
+      let l:leader = '\'
+   endif
    execute
      \ "50amenu " .
      \ "PopUp."   . escape(a:Text, ' ') .
-     \ "<Tab>"	  . escape(g:mapleader . "a" . a:Keys , '\') .
+     \ "<Tab>"	  . escape(l:leader . "a" . a:Keys , '\') .
      \ " :"	  . a:Command . "<CR>"
 
    call ada#Map_Menu (a:Text, a:Keys, a:Command)
--- vim-7.1.314.orig/runtime/autoload/adacomplete.vim
+++ vim-7.1.314/runtime/autoload/adacomplete.vim
@@ -1,13 +1,13 @@
 "------------------------------------------------------------------------------
 "  Description: Vim Ada omnicompletion file
 "     Language:	Ada (2005)
-"	   $Id: adacomplete.vim,v 1.1 2007/05/05 17:34:16 vimboss Exp $
-"   Maintainer:	Martin Krischik
-"      $Author: vimboss $
-"	 $Date: 2007/05/05 17:34:16 $
-"      Version: 4.2
-"    $Revision: 1.1 $
-"     $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $
+"	   $Id: adacomplete.vim 774 2007-09-17 09:11:59Z krischik $
+"   Maintainer:	Martin Krischik <krischik@users.sourceforge.net>
+"      $Author: krischik $
+"	 $Date: 2007-09-17 05:11:59 -0400 (Mon, 17 Sep 2007) $
+"      Version: 4.5
+"    $Revision: 774 $
+"     $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/tags/vim-ada-mode/4.3.9/vim/autoload/adacomplete.vim $
 "      History: 24.05.2006 MK Unified Headers
 "		26.05.2006 MK improved search for begin of word.
 "		16.07.2006 MK Ada-Mode as vim-ball
--- vim-7.1.314.orig/runtime/autoload/decada.vim
+++ vim-7.1.314/runtime/autoload/decada.vim
@@ -1,14 +1,14 @@
 "------------------------------------------------------------------------------
 "  Description: Vim Ada/Dec Ada compiler file
 "     Language: Ada (Dec Ada)
-"          $Id: decada.vim,v 1.1 2007/05/05 17:25:32 vimboss Exp $
+"          $Id: decada.vim 774 2007-09-17 09:11:59Z krischik $
 "    Copyright: Copyright (C) 2006 Martin Krischik
-"   Maintainer:	Martin Krischik
-"      $Author: vimboss $
-"        $Date: 2007/05/05 17:25:32 $
-"      Version: 4.2
-"    $Revision: 1.1 $
-"     $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $
+"   Maintainer:	Martin Krischik <krischik@users.sourceforge.net>
+"      $Author: krischik $
+"        $Date: 2007-09-17 05:11:59 -0400 (Mon, 17 Sep 2007) $
+"      Version: 4.5
+"    $Revision: 774 $
+"     $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/tags/vim-ada-mode/4.3.9/vim/autoload/decada.vim $
 "      History: 21.07.2006 MK New Dec Ada
 "               15.10.2006 MK Bram's suggestion for runtime integration
 "               05.11.2006 MK Bram suggested not to use include protection for
@@ -45,7 +45,7 @@
       call ada#Switch_Session (a:1)
    elseif argc() == 0 && strlen (v:servername) > 0
       call ada#Switch_Session (
-	 \ expand('~')[0:-2] . ".vimfiles.session]" .
+	 \ expand('~')[0:-2] . ".vimfiles.session]decada_" .
 	 \ v:servername . ".vim")
    endif
    return
--- vim-7.1.314.orig/runtime/autoload/getscript.vim
+++ vim-7.1.314/runtime/autoload/getscript.vim
@@ -2,7 +2,7 @@
 " getscript.vim
 "  Author:	Charles E. Campbell, Jr.
 "  Date:	May 11, 2007
-"  Version:	27
+"  Version:	27+Debian
 "  Installing:	:help glvs-install
 "  Usage:	:help glvs
 "
@@ -23,10 +23,23 @@
 if exists("g:loaded_getscript")
  finish
 endif
-let g:loaded_getscript= "v27"
+let g:loaded_getscript= "v27+Debian"
 
 " ---------------------------------------------------------------------
 "  Global Variables: {{{1
+" shell quoting character {{{2
+if exists("g:netrw_shq") && !exists("g:getscript_shq")
+ let g:getscript_shq= g:netrw_shq
+elseif !exists("g:getscript_shq")
+ if exists("&shq") && &shq != ""
+  let g:getscript_shq= &shq
+ elseif exists("&sxq") && &sxq != ""
+  let g:getscript_shq= &sxq
+ else
+  let g:getscript_shq= "'"
+ endif
+endif
+
 " allow user to change the command for obtaining scripts (does fetch work?)
 if !exists("g:GetLatestVimScripts_wget")
  if executable("wget")
@@ -192,10 +205,10 @@
      exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile.' "'.scriptaddr.'"'
 	else
 "     call Decho("silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile." '".scriptaddr."'")
-     exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile." '".scriptaddr."'"
+     exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(tmpfile)." ".s:Escape(scriptaddr)
 	endif
 	if itry == 1
-    exe "silent vsplit ".tmpfile
+    exe "silent vsplit ".fnameescape(tmpfile)
 	else
 	 silent! e %
 	endif
@@ -273,7 +286,7 @@
     exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname.' "'.'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid.'"'
    else
 "    call Decho("unix: silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname." '".'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid."'")
-    exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname." '".'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid."'"
+    exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(sname)." ".s:Escape('http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid)
    endif
 
    " AutoInstall: only if doautoinstall is so indicating
@@ -281,20 +294,20 @@
 "     call Decho("attempting to do autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname))
      if filereadable(sname)
 "       call Decho("move <".sname."> to ".s:autoinstall)
-       exe "silent !".g:GetLatestVimScripts_mv." ".sname." ".s:autoinstall
-       let curdir= escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #")
+       exe "silent !".g:GetLatestVimScripts_mv." ".s:Escape(sname)." ".s:Escape(s:autoinstall)
+       let curdir= fnameescape(substitute(getcwd(),'\','/','ge'))
 "       call Decho("exe cd ".s:autoinstall)
-       exe "cd ".s:autoinstall
+       exe "cd ".fnameescape(s:autoinstall)
       
        " decompress
        if sname =~ '\.bz2$'
 "         call Decho("decompress: attempt to bunzip2 ".sname)
-         exe "silent !bunzip2 ".sname
+         exe "silent !bunzip2 ".s:Escape(sname)
          let sname= substitute(sname,'\.bz2$','','')
 "         call Decho("decompress: new sname<".sname."> after bunzip2")
        elseif sname =~ '\.gz$'
 "         call Decho("decompress: attempt to gunzip ".sname)
-         exe "silent !gunzip ".sname
+         exe "silent !gunzip ".s:Escape(sname)
          let sname= substitute(sname,'\.gz$','','')
 "         call Decho("decompress: new sname<".sname."> after gunzip")
        endif
@@ -302,28 +315,28 @@
        " distribute archive(.zip, .tar, .vba) contents
        if sname =~ '\.zip$'
 "         call Decho("dearchive: attempt to unzip ".sname)
-         exe "silent !unzip -o ".sname
+         exe "silent !unzip -o ".s:Escape(sname)
        elseif sname =~ '\.tar$'
 "         call Decho("dearchive: attempt to untar ".sname)
-         exe "silent !tar -xvf ".sname
+         exe "silent !tar -xvf ".s:Escape(sname)
        elseif sname =~ '\.vba$'
 "         call Decho("dearchive: attempt to handle a vimball: ".sname)
          silent 1split
-         exe "silent e ".sname
+         exe "silent e ".fnameescape(sname)
          silent so %
          silent q
        endif
       
        if sname =~ '.vim$'
 "         call Decho("dearchive: attempt to simply move ".sname." to plugin")
-         exe "silent !".g:GetLatestVimScripts_mv." ".sname." plugin"
+         exe "silent !".g:GetLatestVimScripts_mv." ".s:Escape(sname)." plugin"
        endif
       
        " helptags step
        let docdir= substitute(&rtp,',.*','','e')."/doc"
 "       call Decho("helptags: docdir<".docdir.">")
-       exe "helptags ".docdir
-       exe "cd ".curdir
+       exe "helptags ".fnameescape(docdir)
+       exe "cd ".fnameescape(curdir)
      endif
      if fname !~ ':AutoInstall:'
       let modline=scriptid." ".latestsrcid." :AutoInstall: ".fname.cmmnt
@@ -350,6 +363,17 @@
 endfun
 
 " ---------------------------------------------------------------------
+" s:Escape: makes a string safe&suitable for the shell {{{2
+fun! s:Escape(name)
+  if exists("*shellescape")
+   let name= shellescape(a:name)
+  else
+   let name= g:getscript_shq . a:name . g:getscript_shq
+  endif
+  return name
+endfun
+
+" ---------------------------------------------------------------------
 " GetLatestVimScripts: this function gets the latest versions of {{{1
 "                      scripts based on the list in
 "   (first dir in runtimepath)/GetLatest/GetLatestVimScripts.dat
@@ -409,9 +433,9 @@
   " record current directory, change to datadir, open split window with
   " datafile
   let origdir= getcwd()
-  exe "cd ".escape(substitute(datadir,'\','/','ge'),"|[]*'\" #")
+  exe "cd ".fnameescape(substitute(datadir,'\','/','ge'))
   split
-  exe "e ".escape(substitute(datafile,'\','/','ge'),"|[]*'\" #")
+  exe "e ".fnameescape(substitute(datafile,'\','/','ge'))
   res 1000
   let s:downloads = 0
   let s:downerrors= 0
@@ -440,10 +464,12 @@
    endif
 
    " read plugin in
+   " evidently a :r creates a new buffer (the "#" buffer) that is subsequently unused -- bwiping it
    $
 "   call Decho(" ")
 "   call Decho(".dependency checking<".plugin."> line$=".line("$"))
-   exe "silent r ".plugin
+   exe "silent r ".fnameescape(plugin)
+   exe "silent bwipe ".bufnr("#")
 
    while search('^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+','W') != 0
     let newscript= substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+\s\+\(.*\)$','\1','e')
@@ -487,12 +513,12 @@
 "  call Decho(" ")
 
   if foundscript == 0
-   set nomod
+   setlocal nomod
   endif
 
   " Check on out-of-date scripts using GetLatest/GetLatestVimScripts.dat
 "  call Decho("begin: checking out-of-date scripts using datafile<".datafile.">")
-  set lz
+  setlocal lz
   1
 "  /^-----/,$g/^\s*\d/call Decho(getline("."))
   1
@@ -529,9 +555,9 @@
   q
 
   " restore events and current directory
-  exe "cd ".escape(substitute(origdir,'\','/','ge'),"|[]*'\" #")
+  exe "cd ".fnameescape(substitute(origdir,'\','/','ge'))
   let &ei= eikeep
-  set nolz
+  setlocal nolz
 "  call Dret("GetLatestVimScripts : did ".s:downloads." downloads")
 endfun
 " ---------------------------------------------------------------------
--- vim-7.1.314.orig/runtime/autoload/gnat.vim
+++ vim-7.1.314/runtime/autoload/gnat.vim
@@ -1,14 +1,15 @@
 "------------------------------------------------------------------------------
 "  Description: Vim Ada/GNAT compiler file
 "     Language: Ada (GNAT)
-"          $Id: gnat.vim,v 1.1 2007/05/05 18:18:20 vimboss Exp $
+"          $Id: gnat.vim 774 2007-09-17 09:11:59Z krischik $
 "    Copyright: Copyright (C) 2006 Martin Krischik
-"   Maintainer:	Martin Krischik
-"      $Author: vimboss $
-"        $Date: 2007/05/05 18:18:20 $
-"      Version: 4.2
-"    $Revision: 1.1 $
-"     $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/gnat.vim $
+"   Maintainer:	Martin Krischi <krischik@users.sourceforge.net>k
+"		Ned Okie <nokie@radford.edu>
+"      $Author: krischik $
+"        $Date: 2007-09-17 05:11:59 -0400 (Mon, 17 Sep 2007) $
+"      Version: 4.5
+"    $Revision: 774 $
+"     $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/tags/vim-ada-mode/4.3.9/vim/autoload/gnat.vim $
 "      History: 24.05.2006 MK Unified Headers
 "		16.07.2006 MK Ada-Mode as vim-ball
 "		05.08.2006 MK Add session support
@@ -16,6 +17,7 @@
 "               05.11.2006 MK Bram suggested not to use include protection for
 "                             autoload
 "		05.11.2006 MK Bram suggested to save on spaces
+"		19.09.2007 NO use project file only when there is a project
 "    Help Page: compiler-gnat
 "------------------------------------------------------------------------------
 
@@ -71,13 +73,19 @@
       execute 'mksession! ' . v:this_session
    endif
 
-   if strlen (self.Project_File) > 0
-      call ada#Switch_Session (
-	 \ expand('~') . "/vimfiles/session/" .
-	 \ fnamemodify (self.Project_File, ":t:r") . ".vim")
-   else
-      call ada#Switch_Session ('')
-   endif
+   "if strlen (self.Project_File) > 0
+      "if has("vms")
+	 "call ada#Switch_Session (
+	    "\ expand('~')[0:-2] . ".vimfiles.session]gnat_" .
+	    "\ fnamemodify (self.Project_File, ":t:r") . ".vim")
+      "else
+	 "call ada#Switch_Session (
+	    "\ expand('~') . "/vimfiles/session/gnat_" .
+	    "\ fnamemodify (self.Project_File, ":t:r") . ".vim")
+      "endif
+   "else
+      "call ada#Switch_Session ('')
+   "endif
 
    return
 endfunction gnat#Set_Project_File				     " }}}1
--- vim-7.1.314.orig/runtime/autoload/gzip.vim
+++ vim-7.1.314/runtime/autoload/gzip.vim
@@ -153,9 +153,9 @@
     let nmt = s:tempname(nm)
     if rename(nm, nmt) == 0
       if exists("b:gzip_comp_arg")
-	call system(a:cmd . " " . b:gzip_comp_arg . " " . s:escape(nmt))
+	call system(a:cmd . " " . b:gzip_comp_arg . " -- " . s:escape(nmt))
       else
-	call system(a:cmd . " " . s:escape(nmt))
+	call system(a:cmd . " -- " . s:escape(nmt))
       endif
       call rename(nmt . "." . expand("<afile>:e"), nm)
     endif
@@ -180,10 +180,10 @@
     if rename(nm, nmte) == 0
       if &patchmode != "" && getfsize(nm . &patchmode) == -1
 	" Create patchmode file by creating the decompressed file new
-	call system(a:cmd . " -c " . s:escape(nmte) . " > " . s:escape(nmt))
+	call system(a:cmd . " -c -- " . s:escape(nmte) . " > " . s:escape(nmt))
 	call rename(nmte, nm . &patchmode)
       else
-	call system(a:cmd . " " . s:escape(nmte))
+	call system(a:cmd . " -- " . s:escape(nmte))
       endif
       call rename(nmt, nm)
     endif
--- vim-7.1.314.orig/runtime/autoload/netrw.vim
+++ vim-7.1.314/runtime/autoload/netrw.vim
@@ -1,22 +1,19 @@
 " netrw.vim: Handles file transfer and remote directory listing across
 "            AUTOLOAD SECTION
-" Date:		May 05, 2007
-" Version:	109
+" Date:		Jun 12, 2008
+" Version:	125
 " Maintainer:	Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
 " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
-" Copyright:    Copyright (C) 1999-2007 Charles E. Campbell, Jr. {{{1
+" Copyright:    Copyright (C) 1999-2008 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, netrwPlugin.vim, and netrwSettings.vim are provided
-"               *as is* and comes with no warranty of any kind, either
+"               *as is* and come 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.
-" COMBAK: worked with tmpfile s:GetTempname() in NetRead() NetWrite()
-"         !!NEEDS DEBUGGING && TESTING!!!
-"redraw!|call inputsave()|call input("Press <cr> to continue")|call inputrestore()
+"redraw!|call DechoSep()|call inputsave()|call input("Press <cr> to continue")|call inputrestore()
 "
 "  But be doers of the Word, and not only hearers, deluding your own selves {{{1
 "  (James 1:22 RSV)
@@ -30,11 +27,20 @@
  let s:WARNING = 1
  let s:ERROR   = 2
 endif
-let g:loaded_netrw = "v109"
+let g:loaded_netrw = "v125"
+
+" sanity checks
 if v:version < 700
  call netrw#ErrorMsg(s:WARNING,"you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw",1)
  finish
 endif
+if !exists("*shellescape")
+ call netrw#ErrorMsg(s:ERROR,"you need to upgade your vim so that it has shellescape()",64)
+endif
+if !exists("*fnameescape")
+ call netrw#ErrorMsg(s:ERROR,"you need to upgade your vim so that it has fnameescape()",65)
+endif
+
 let s:keepcpo= &cpo
 setlocal cpo&vim
 "DechoTabOn
@@ -115,6 +121,18 @@
 
 " ---------------------------------------------------------------------
 " Default values for netrw's global variables {{{2
+" Cygwin Detection ------- {{{3
+if !exists("g:netrw_cygwin")
+ if has("win32") || has("win95") || has("win64") || has("win16")
+  if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
+   let g:netrw_cygwin= 1
+  else
+   let g:netrw_cygwin= 0
+  endif
+ else
+  let g:netrw_cygwin= 0
+ endif
+endif
 " Default values - a-c ---------- {{{3
 if !exists("g:netrw_alto")
  let g:netrw_alto= &sb
@@ -128,26 +146,25 @@
 if !exists("g:netrw_chgwin")
  let g:netrw_chgwin    = -1
 endif
-if !exists("g:netrw_cygwin")
- if has("win32") || has("win95") || has("win64") || has("win16")
-  if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
-   let g:netrw_cygwin= 1
-  else
-   let g:netrw_cygwin= 0
-  endif
- else
-  let g:netrw_cygwin= 0
- endif
-else
- let g:netrw_cygwin= 0
+if !exists("g:netrw_compress")
+ let g:netrw_compress= "gzip"
 endif
-" Default values - d-f ---------- {{{3
+if !exists("g:netrw_ctags")
+ let g:netrw_ctags= "ctags"
+endif
+" Default values - d-g ---------- {{{3
 if !exists("g:NETRW_DIRHIST_CNT")
  let g:NETRW_DIRHIST_CNT= 0
 endif
+if !exists("g:netrw_decompress")
+ let g:netrw_decompress= { ".gz" : "gunzip" , ".bz2" : "bunzip2" , ".zip" : "unzip" , ".tar" : "tar -xf"}
+endif
 if !exists("g:netrw_dirhistmax")
  let g:netrw_dirhistmax= 10
 endif
+if !exists("g:netrw_fastbrowse")
+ let g:netrw_fastbrowse= 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$'
 endif
@@ -198,9 +215,35 @@
  let g:netrw_list_hide= ""
 endif
 " Default values - lh-lz ---------- {{{3
+if !exists("g:netrw_localcopycmd")
+ if has("win32") || has("win95") || has("win64") || has("win16")
+  if g:netrw_cygwin
+   let g:netrw_localcopycmd= "cp"
+  else
+   let g:netrw_localcopycmd= "copy"
+  endif
+ elseif has("unix") || has("macunix")
+  let g:netrw_localcopycmd= "cp"
+ else
+  let g:netrw_localcopycmd= ""
+ endif
+endif
 if !exists("g:netrw_local_mkdir")
  let g:netrw_local_mkdir= "mkdir"
 endif
+if !exists("g:netrw_localmovecmd")
+ if has("win32") || has("win95") || has("win64") || has("win16")
+  if g:netrw_cygwin
+   let g:netrw_localmovecmd= "mv"
+  else
+   let g:netrw_localmovecmd= "move"
+  endif
+ elseif has("unix") || has("macunix")
+  let g:netrw_localmovecmd= "mv"
+ else
+  let g:netrw_localmovecmd= ""
+ endif
+endif
 if !exists("g:netrw_local_rmdir")
  let g:netrw_local_rmdir= "rmdir"
 endif
@@ -215,6 +258,9 @@
  let g:netrw_list_cmd= g:netrw_list_cmd." -l"
 endif
 " Default values - m-r ---------- {{{3
+if !exists("g:netrw_markfileesc")
+ let g:netrw_markfileesc= '*./[\~'
+endif
 if !exists("g:netrw_maxfilenamelen")
  let g:netrw_maxfilenamelen= 32
 endif
@@ -224,6 +270,19 @@
 if !exists("g:netrw_mkdir_cmd")
  let g:netrw_mkdir_cmd= g:netrw_ssh_cmd." USEPORT HOSTNAME mkdir"
 endif
+if !exists("g:netrw_mousemaps")
+ if exists("&mouse") && &mouse =~ '[anh]'
+  let g:netrw_mousemaps= 1
+ else
+  let g:netrw_mousemaps= 0
+ endif
+endif
+if !exists("g:netrw_retmap")
+ let g:netrw_retmap= 0
+endif
+if !exists("g:netrw_preview")
+ let g:netrw_preview= 0
+endif
 if !exists("g:netrw_scpport")
  let g:netrw_scpport= "-P"
 endif
@@ -243,27 +302,11 @@
  let g:netrw_rmf_cmd    = g:netrw_ssh_cmd." USEPORT HOSTNAME rm -f"
 endif
 " Default values - s ---------- {{{3
+ " set up shell quoting character
 if exists("g:netrw_silent") && g:netrw_silent != 0
- let g:netrw_silentxfer= "silent "
+ let s:netrw_silentxfer= "silent "
 else
- let g:netrw_silentxfer= ""
-endif
-if !exists("g:netrw_fastbrowse")
- let g:netrw_fastbrowse= 1
-endif
-if !exists("g:netrw_shq")
- if exists("&shq") && &shq != ""
-  let g:netrw_shq= &shq
- elseif has("win32") || has("win95") || has("win64") || has("win16")
-  if g:netrw_cygwin
-   let g:netrw_shq= "'"
-  else
-   let g:netrw_shq= '"'
-  endif
- else
-  let g:netrw_shq= "'"
- endif
-" call Decho("g:netrw_shq<".g:netrw_shq.">")
+ let s:netrw_silentxfer= ""
 endif
 if !exists("g:netrw_sort_by")
  " alternatives: date size
@@ -274,7 +317,10 @@
  let g:netrw_sort_direction= "normal"
 endif
 if !exists("g:netrw_sort_sequence")
- let g:netrw_sort_sequence= '[\/]$,\.h$,\.c$,\.cpp$,\.[a-np-z]$,*,\.info$,\.swp$,\.o$\.obj$,\.bak$'
+ let g:netrw_sort_sequence= '[\/]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$'
+endif
+if !exists("g:netrw_special_syntax")
+ let g:netrw_special_syntax= 0
 endif
 if !exists("g:netrw_ssh_browse_reject")
   let g:netrw_ssh_browse_reject='^total\s\+\d\+$'
@@ -290,6 +336,9 @@
 if !exists("g:netrw_timefmt")
  let g:netrw_timefmt= "%c"
 endif
+if !exists("g:netrw_xstrlen")
+ let g:netrw_xstrlen= 1
+endif
 if !exists("g:NetrwTopLvlMenu")
  let g:NetrwTopLvlMenu= "Netrw."
 endif
@@ -304,18 +353,16 @@
 endif
 " ---------------------------------------------------------------------
 " Default values for netrw's script variables: {{{2
-if !exists("s:netrw_cd_escape")
-  let s:netrw_cd_escape="[]#*$%'\" ?`!&();<>\\"
-endif
 if !exists("g:netrw_fname_escape")
- let g:netrw_fname_escape= ' ?&;'
+ let g:netrw_fname_escape= ' ?&;%'
 endif
-if !exists("g:netrw_tmpfile_escape")
- let g:netrw_tmpfile_escape= ' ?&;'
+if !exists("g:netrw_glob_escape")
+  let g:netrw_glob_escape= '[]*?`{~$'
 endif
-if !exists("s:netrw_glob_escape")
-  let s:netrw_glob_escape= '[]*?`{~$'
+if !exists("g:netrw_tmpfile_escape")
+ let g:netrw_tmpfile_escape= ' &;'
 endif
+let s:netrw_map_escape = "<|\n\r\\\<C-V>\""
 
 " BufEnter event ignored by decho when following variable is true
 "  Has a side effect that doau BufReadPost doesn't work, so
@@ -327,184 +374,201 @@
 " ==============================
 
 " ------------------------------------------------------------------------
-" NetSavePosn: saves position of cursor on screen {{{2
-fun! netrw#NetSavePosn()
-"  call Dfunc("netrw#NetSavePosn()")
-  " Save current line and column
-  let w:netrw_winnr= winnr()
-  let w:netrw_line = line(".")
-  let w:netrw_col  = virtcol(".")
-
-  " Save top-of-screen line
-  norm! H0
-  let w:netrw_hline= line(".")
-
-  call netrw#NetRestorePosn()
-"  call Dret("netrw#NetSavePosn : winnr=".w:netrw_winnr." line=".w:netrw_line." col=".w:netrw_col." hline=".w:netrw_hline)
-endfun
-
-" ------------------------------------------------------------------------
-" NetRestorePosn: restores the cursor and file position as saved by NetSavePosn() {{{2
-fun! netrw#NetRestorePosn()
-"  call Dfunc("netrw#NetRestorePosn() winnr=".(exists("w:netrw_winnr")? w:netrw_winnr : -1)." line=".(exists("w:netrw_line")? w:netrw_line : -1)." col=".(exists("w:netrw_col")? w:netrw_col : -1)." hline=".(exists("w:netrw_hline")? w:netrw_hline : -1))
-  let eikeep= &ei
-  set ei=all
-  if expand("%") == "NetrwMessage"
-   exe s:winBeforeErr."wincmd w"
-  endif
-
-  " restore window
-  if exists("w:netrw_winnr")
-"   call Decho("restore window: exe silent! ".w:netrw_winnr."wincmd w")
-   exe "silent! ".w:netrw_winnr."wincmd w"
-  endif
-  if v:shell_error == 0
-   " as suggested by Bram M: redraw on no error
-   " allows protocol error messages to remain visible
-   redraw!
-  endif
-
-  " restore top-of-screen line
-  if exists("w:netrw_hline")
-"   call Decho("restore topofscreen: exe norm! ".w:netrw_hline."G0z")
-   exe "norm! ".w:netrw_hline."G0z\<CR>"
-  endif
-
-  " restore position
-  if exists("w:netrw_line") && exists("w:netrw_col")
-"   call Decho("restore posn: exe norm! ".w:netrw_line."G0".w:netrw_col."|")
-   exe "norm! ".w:netrw_line."G0".w:netrw_col."\<bar>"
-  endif
-
-  let &ei= eikeep
-"  call Dret("netrw#NetRestorePosn")
-endfun
-
-" ===============================
-" NetOptionSave: save options and set to "standard" form {{{2
-"DechoTabOn
-fun! s:NetOptionSave()
-"  call Dfunc("s:NetOptionSave() win#".winnr()." buf#".bufnr("."))
-  if !exists("w:netrw_optionsave")
-   let w:netrw_optionsave= 1
+" s:NetrwOptionSave: save options and set to "standard" form {{{2
+"  06/08/07 : removed call to NetrwSafeOptions(), either placed
+"             immediately after NetrwOptionSave() calls in NetRead
+"             and NetWrite, or after the s:NetrwEnew() call in
+"             NetrwBrowse.
+"             vt: normally its "w:" or "s:" (a variable type)
+fun! s:NetrwOptionSave(vt)
+"  call Dfunc("s:NetrwOptionSave(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%")).">")
+
+"  call Decho(a:vt."netrw_optionsave".(exists("{a:vt}netrw_optionsave")? ("=".{a:vt}netrw_optionsave) : " doesn't exist"))
+  if !exists("{a:vt}netrw_optionsave")
+   let {a:vt}netrw_optionsave= 1
   else
-"   call Dret("s:NetOptionSave : netoptionsave=".w:netrw_optionsave)
+"   call Dret("s:NetrwOptionSave : options already saved")
    return
   endif
+"  call Decho("fo=".&fo.(exists("&acd")? " acd=".&acd : " acd doesn't exist"))
 
   " Save current settings and current directory
   let s:yykeep          = @@
   if exists("&l:acd")
-   let w:netrw_acdkeep  = &l:acd
+   let {a:vt}netrw_acdkeep  = &l:acd
   endif
-  let w:netrw_aikeep    = &l:ai
-  let w:netrw_awkeep    = &l:aw
-  let w:netrw_cikeep    = &l:ci
-  let w:netrw_cinkeep   = &l:cin
-  let w:netrw_cinokeep  = &l:cino
-  let w:netrw_comkeep   = &l:com
-  let w:netrw_cpokeep   = &l:cpo
+  let {a:vt}netrw_aikeep    = &l:ai
+  let {a:vt}netrw_awkeep    = &l:aw
+  let {a:vt}netrw_cikeep    = &l:ci
+  let {a:vt}netrw_cinkeep   = &l:cin
+  let {a:vt}netrw_cinokeep  = &l:cino
+  let {a:vt}netrw_comkeep   = &l:com
+  let {a:vt}netrw_cpokeep   = &l:cpo
   if g:netrw_keepdir
-   let w:netrw_dirkeep  = getcwd()
+   let {a:vt}netrw_dirkeep  = getcwd()
   endif
-  let w:netrw_fokeep    = &l:fo           " formatoptions
-  let w:netrw_gdkeep    = &l:gd           " gdefault
-  let w:netrw_hidkeep   = &l:hidden
-  let w:netrw_magickeep = &l:magic
-  let w:netrw_repkeep   = &l:report
-  let w:netrw_spellkeep = &l:spell
-  let w:netrw_twkeep    = &l:tw           " textwidth
-  let w:netrw_wigkeep   = &l:wig          " wildignore
+  let {a:vt}netrw_fokeep    = &l:fo           " formatoptions
+  let {a:vt}netrw_gdkeep    = &l:gd           " gdefault
+  let {a:vt}netrw_hidkeep   = &l:hidden
+  let {a:vt}netrw_magickeep = &l:magic
+  let {a:vt}netrw_repkeep   = &l:report
+  let {a:vt}netrw_spellkeep = &l:spell
+  let {a:vt}netrw_twkeep    = &l:tw           " textwidth
+  let {a:vt}netrw_wigkeep   = &l:wig          " wildignore
   if has("win32") && !has("win95")
-   let w:netrw_swfkeep= &l:swf            " swapfile
+   let {a:vt}netrw_swfkeep= &l:swf            " swapfile
   endif
-  call s:NetrwSafeOptions()
-  if &go =~ 'a' | silent! let w:netrw_regstar = @* | endif
-  silent! let w:netrw_regslash= @/
+  if &go =~ 'a' | silent! let {a:vt}netrw_regstar = @* | endif
+  silent! let {a:vt}netrw_regslash= @/
 
-"  call Dret("s:NetOptionSave")
-"  call Dret("s:NetOptionSave : win#".winnr()." buf#".bufnr("."))
+"  call Dret("s:NetrwOptionSave : win#".winnr()." buf#".bufnr("%"))
 endfun
 
 " ------------------------------------------------------------------------
-" NetOptionRestore: restore options {{{2
-fun! s:NetOptionRestore()
-"  call Dfunc("s:NetOptionRestore() win#".winnr()." buf#".bufnr("."))
-  if !exists("w:netrw_optionsave")
-"   call Dret("s:NetOptionRestore : w:netrw_optionsave doesn't exist")
+" s:NetrwOptionRestore: restore options {{{2
+fun! s:NetrwOptionRestore(vt)
+"  call Dfunc("s:NetrwOptionRestore(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%"))
+  if !exists("{a:vt}netrw_optionsave")
+"   call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
+"   call Dret("s:NetrwOptionRestore : ".a:vt."netrw_optionsave doesn't exist")
    return
   endif
-  unlet w:netrw_optionsave
+  unlet {a:vt}netrw_optionsave
 
   if exists("&acd")
-   if exists("w:netrw_acdkeep") |let &l:acd    = w:netrw_acdkeep     |unlet w:netrw_acdkeep  |endif
+   if exists("{a:vt}netrw_acdkeep")
+"    call Decho("g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd)
+    let curdir = getcwd()
+    let &l:acd = {a:vt}netrw_acdkeep
+    unlet {a:vt}netrw_acdkeep
+    if &l:acd
+"     call Decho("exe keepjumps lcd ".fnameescape(curdir))  " NOTE: was g:netrw_fname_escape for some reason
+     try
+      if !exists("&l:acd") && !&l:acd
+       exe 'keepjumps lcd '.fnameescape(curdir)
+      endif
+     catch /^Vim\%((\a\+)\)\=:E472/
+      call netrw#ErrorMsg(s:ERROR,"unable to change directory to <".curdir."> (permissions?)",61)
+     endtry
+    endif
+   endif
   endif
-  if exists("w:netrw_aikeep")   |let &l:ai     = w:netrw_aikeep      |unlet w:netrw_aikeep   |endif
-  if exists("w:netrw_awkeep")   |let &l:aw     = w:netrw_awkeep      |unlet w:netrw_awkeep   |endif
-  if exists("w:netrw_cikeep")   |let &l:ci     = w:netrw_cikeep      |unlet w:netrw_cikeep   |endif
-  if exists("w:netrw_cinkeep")  |let &l:cin    = w:netrw_cinkeep     |unlet w:netrw_cinkeep  |endif
-  if exists("w:netrw_cinokeep") |let &l:cino   = w:netrw_cinokeep    |unlet w:netrw_cinokeep |endif
-  if exists("w:netrw_comkeep")  |let &l:com    = w:netrw_comkeep     |unlet w:netrw_comkeep  |endif
-  if exists("w:netrw_cpokeep")  |let &l:cpo    = w:netrw_cpokeep     |unlet w:netrw_cpokeep  |endif
-  if exists("w:netrw_dirkeep")  |exe "lcd ".w:netrw_dirkeep          |unlet w:netrw_dirkeep  |endif
-  if exists("w:netrw_fokeep")   |let &l:fo     = w:netrw_fokeep      |unlet w:netrw_fokeep   |endif
-  if exists("w:netrw_gdkeep")   |let &l:gd     = w:netrw_gdkeep      |unlet w:netrw_gdkeep   |endif
-  if exists("w:netrw_hidkeep")  |let &l:hidden = w:netrw_hidkeep     |unlet w:netrw_hidkeep  |endif
-  if exists("w:netrw_magic")    |let &l:magic  = w:netrw_magic       |unlet w:netrw_magic    |endif
-  if exists("w:netrw_repkeep")  |let &l:report = w:netrw_repkeep     |unlet w:netrw_repkeep  |endif
-  if exists("w:netrw_spellkeep")|let &l:spell  = w:netrw_spellkeep   |unlet w:netrw_spellkeep|endif
-  if exists("w:netrw_twkeep")   |let &l:tw     = w:netrw_twkeep      |unlet w:netrw_twkeep   |endif
-  if exists("w:netrw_wigkeep")  |let &l:wig    = w:netrw_wigkeep     |unlet w:netrw_wigkeep  |endif
-  if exists("s:yykeep")         |let  @@       = s:yykeep            |unlet s:yykeep         |endif
-  if exists("w:netrw_swfkeep")
+  if exists("{a:vt}netrw_aikeep")   |let &l:ai     = {a:vt}netrw_aikeep      |unlet {a:vt}netrw_aikeep   |endif
+  if exists("{a:vt}netrw_awkeep")   |let &l:aw     = {a:vt}netrw_awkeep      |unlet {a:vt}netrw_awkeep   |endif
+  if exists("{a:vt}netrw_cikeep")   |let &l:ci     = {a:vt}netrw_cikeep      |unlet {a:vt}netrw_cikeep   |endif
+  if exists("{a:vt}netrw_cinkeep")  |let &l:cin    = {a:vt}netrw_cinkeep     |unlet {a:vt}netrw_cinkeep  |endif
+  if exists("{a:vt}netrw_cinokeep") |let &l:cino   = {a:vt}netrw_cinokeep    |unlet {a:vt}netrw_cinokeep |endif
+  if exists("{a:vt}netrw_comkeep")  |let &l:com    = {a:vt}netrw_comkeep     |unlet {a:vt}netrw_comkeep  |endif
+  if exists("{a:vt}netrw_cpokeep")  |let &l:cpo    = {a:vt}netrw_cpokeep     |unlet {a:vt}netrw_cpokeep  |endif
+  if exists("{a:vt}netrw_dirkeep") && isdirectory({a:vt}netrw_dirkeep) && g:netrw_keepdir
+   let dirkeep = substitute({a:vt}netrw_dirkeep,'\\','/','g')
+   if exists("{a:vt}netrw_dirkeep")  |exe "keepjumps lcd ".fnameescape(dirkeep)|unlet {a:vt}netrw_dirkeep  |endif
+  endif
+  if exists("{a:vt}netrw_fokeep")   |let &l:fo     = {a:vt}netrw_fokeep      |unlet {a:vt}netrw_fokeep   |endif
+  if exists("{a:vt}netrw_gdkeep")   |let &l:gd     = {a:vt}netrw_gdkeep      |unlet {a:vt}netrw_gdkeep   |endif
+  if exists("{a:vt}netrw_hidkeep")  |let &l:hidden = {a:vt}netrw_hidkeep     |unlet {a:vt}netrw_hidkeep  |endif
+  if exists("{a:vt}netrw_magic")    |let &l:magic  = {a:vt}netrw_magic       |unlet {a:vt}netrw_magic    |endif
+  if exists("{a:vt}netrw_repkeep")  |let &l:report = {a:vt}netrw_repkeep     |unlet {a:vt}netrw_repkeep  |endif
+  if exists("{a:vt}netrw_spellkeep")|let &l:spell  = {a:vt}netrw_spellkeep   |unlet {a:vt}netrw_spellkeep|endif
+  if exists("{a:vt}netrw_twkeep")   |let &l:tw     = {a:vt}netrw_twkeep      |unlet {a:vt}netrw_twkeep   |endif
+  if exists("{a:vt}netrw_wigkeep")  |let &l:wig    = {a:vt}netrw_wigkeep     |unlet {a:vt}netrw_wigkeep  |endif
+  if exists("s:yykeep")             |let  @@       = s:yykeep                |unlet s:yykeep             |endif
+  if exists("{a:vt}netrw_swfkeep")
    if &directory == ""
     " user hasn't specified a swapfile directory;
     " netrw will temporarily set the swapfile directory
     " to the current directory as returned by getcwd().
     let &l:directory   = getcwd()
-    silent! let &l:swf = w:netrw_swfkeep
+    silent! let &l:swf = {a:vt}netrw_swfkeep
     setlocal directory=
-    unlet w:netrw_swfkeep
-   elseif &l:swf != w:netrw_swfkeep
-    " following line causes a Press ENTER in windows -- can't seem to work around it!!! (COMBAK)
-    silent! let &l:swf= w:netrw_swfkeep
-    unlet w:netrw_swfkeep
+    unlet {a:vt}netrw_swfkeep
+   elseif &l:swf != {a:vt}netrw_swfkeep
+    " following line causes a Press ENTER in windows -- can't seem to work around it!!!
+    silent! let &l:swf= {a:vt}netrw_swfkeep
+    unlet {a:vt}netrw_swfkeep
    endif
   endif
-  if exists("w:netrw_regstar") |silent! let @*= w:netrw_regstar |unlet w:netrw_regstar |endif
-  if exists("w:netrw_regslash")|silent! let @/= w:netrw_regslash|unlet w:netrw_regslash|endif
+  if exists("{a:vt}netrw_regstar") |silent! let @*= {a:vt}netrw_regstar |unlet {a:vt}netrw_regstar |endif
+  if exists("{a:vt}netrw_regslash")|silent! let @/= {a:vt}netrw_regslash|unlet {a:vt}netrw_regslash|endif
 
-"  call Dret("s:NetOptionRestore : win#".winnr()." buf#".bufnr("."))
+"  call Decho("g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd)
+"  call Decho("fo=".&fo.(exists("&acd")? " acd=".&acd : " acd doesn't exist"))
+"  call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
+"  call Dret("s:NetrwOptionRestore : win#".winnr()." buf#".bufnr("%"))
 endfun
 
 " ---------------------------------------------------------------------
-" NetrwSafeOptions: sets options to help netrw do its job {{{2
+" s:NetrwSafeOptions: sets options to help netrw do its job {{{2
 fun! s:NetrwSafeOptions()
-"  call Dfunc("s:NetrwSafeOptions()")
+"  call Dfunc("s:NetrwSafeOptions() win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%")).">")
+"  call Decho("window's ft=".&ft)
   setlocal cino=
   setlocal com=
   setlocal cpo-=aA
-  if exists("&acd")
-   setlocal noacd nocin noai noci magic nospell nohid wig= noaw
-   setlocal fo=nroql2
-  else
-   setlocal nocin noai noci magic nospell nohid wig= noaw
-   setlocal fo=nroql2
-  endif
+  if exists("&acd") | setlocal noacd | endif
+  setlocal nocin noai noci magic nospell nohid wig= noaw
+  setlocal fo=nroql2
   setlocal tw=0
   setlocal report=10000
   if g:netrw_use_noswf && has("win32") && !has("win95")
    setlocal noswf
   endif
+"  call Decho("fo=".&fo.(exists("&acd")? " acd=".&acd : " acd doesn't exist"))
 "  call Dret("s:NetrwSafeOptions")
 endfun
 
+" ---------------------------------------------------------------------
+" netrw#NetrwClean: remove netrw {{{2
+" supports :NetrwClean  -- remove netrw from first directory on runtimepath
+"          :NetrwClean! -- remove netrw from all directories on runtimepath
+fun! netrw#NetrwClean(sys)
+"  call Dfunc("netrw#NetrwClean(sys=".a:sys.")")
+
+  if a:sys
+   let choice= confirm("Remove personal and system copies of netrw?","&Yes\n&No")
+  else
+   let choice= confirm("Remove personal copy of netrw?","&Yes\n&No")
+  endif
+"  call Decho("choice=".choice)
+  let diddel= 0
+  let diddir= ""
+
+  if choice == 1
+   for dir in split(&rtp,',')
+    if filereadable(dir."/plugin/netrwPlugin.vim")
+"     call Decho("removing netrw-related files from ".dir)
+     if s:System("delete",dir."/plugin/netrwPlugin.vim")        |call netrw#ErrorMsg(1,"unable to remove ".dir."/plugin/netrwPlugin.vim",55)        |endif
+     if s:System("delete",dir."/autoload/netrwFileHandlers.vim")|call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwFileHandlers.vim",55)|endif
+     if s:System("delete",dir."/autoload/netrwSettings.vim")    |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwSettings.vim",55)    |endif
+     if s:System("delete",dir."/autoload/netrw.vim")            |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrw.vim",55)            |endif
+     if s:System("delete",dir."/syntax/netrw.vim")              |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrw.vim",55)              |endif
+     if s:System("delete",dir."/syntax/netrwlist.vim")          |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrwlist.vim",55)          |endif
+     let diddir= dir
+     let diddel= diddel + 1
+     if !a:sys|break|endif
+    endif
+   endfor
+  endif
+
+   echohl WarningMsg
+  if diddel == 0
+   echomsg "netrw is either not installed or not removable"
+  elseif diddel == 1
+   echomsg "removed one copy of netrw from <".diddir.">"
+  else
+   echomsg "removed ".diddel." copies of netrw"
+  endif
+   echohl None
+
+"  call Dret("netrw#NetrwClean")
+endfun
+
 " ------------------------------------------------------------------------
 "  Netrw Transfer Functions: {{{1
 " ===============================
 
 " ------------------------------------------------------------------------
-" NetRead: responsible for reading a file over the net {{{2
+" netrw#NetRead: responsible for reading a file over the net {{{2
 "   mode: =0 read remote file and insert before current line
 "         =1 read remote file and insert after current line
 "         =2 replace with remote file
@@ -513,7 +577,8 @@
 "  call Dfunc("netrw#NetRead(mode=".a:mode.",...) a:0=".a:0." ".g:loaded_netrw)
 
   " save options {{{3
-  call s:NetOptionSave()
+  call s:NetrwOptionSave("w:")
+  call s:NetrwSafeOptions()
 
   " interpret mode into a readcmd {{{3
   if     a:mode == 0 " read remote file before current line
@@ -599,14 +664,14 @@
    let ichoice= ichoice + 1
 
    " Determine method of read (ftp, rcp, etc) {{{3
-   call s:NetMethod(choice)
+   call s:NetrwMethod(choice)
    let tmpfile= s:GetTempfile(b:netrw_fname) " apply correct suffix
 
-   " Check if NetBrowse() should be handling this request
-"   call Decho("checking if NetBrowse() should handle choice<".choice."> with netrw_list_cmd<".g:netrw_list_cmd.">")
+   " Check if NetrwBrowse() should be handling this request
+"   call Decho("checking if NetrwBrowse() should handle choice<".choice."> with netrw_list_cmd<".g:netrw_list_cmd.">")
    if choice =~ "^.*[\/]$" && b:netrw_method != 5 && choice !~ '^http://'
 "    call Decho("yes, choice matches '^.*[\/]$'")
-    keepjumps call s:NetBrowse(0,choice)
+    keepjumps call s:NetrwBrowse(0,choice)
 "    call Dret("netrw#NetRead :3 getcwd<".getcwd().">")
     return
    endif
@@ -640,9 +705,9 @@
      let uid_machine = g:netrw_machine
     endif
    endif
-"   call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".uid_machine.":".escape(b:netrw_fname,' ?&;')." ".tmpfile)
-   exe g:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".uid_machine.":".escape(b:netrw_fname,' ?&;')." ".tmpfile
-   let result           = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
+"   call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".escape(b:netrw_fname,' ?&;')." ".tmpfile)
+   exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1))
+   let result           = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
    let b:netrw_lastfile = choice
 
    ".........................................
@@ -650,22 +715,22 @@
    elseif b:netrw_method  == 2		" read with ftp + <.netrc>
 "     call Decho("read via ftp+.netrc (method #2)")
      let netrw_fname= b:netrw_fname
-     new
+     call s:SaveBufVars()|new|call s:RestoreBufVars()
      setlocal ff=unix
-     exe "put ='".g:netrw_ftpmode."'"
-"     call Decho("filter input: ".getline("."))
+     put =g:netrw_ftpmode
+"     call Decho("filter input: ".getline('.'))
      if exists("g:netrw_ftpextracmd")
-      exe "put ='".g:netrw_ftpextracmd."'"
-"      call Decho("filter input: ".getline("."))
+      put =g:netrw_ftpextracmd
+"      call Decho("filter input: ".getline('.'))
      endif
-     exe "put ='".'get \"'.netrw_fname.'\" '.tmpfile."'"
-"     call Decho("filter input: ".getline("."))
+     call setline(line("$")+1,'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
+      exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine." ".g:netrw_port,1)
      else
 "      call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine)
-      exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine
+      exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)
      endif
      " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
      if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying '
@@ -674,8 +739,8 @@
       call netrw#ErrorMsg(s:ERROR,getline(1),4)
       let &debug= debugkeep
      endif
-     bd!
-     let result           = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
+     call s:SaveBufVars()|bd!|call s:RestoreBufVars()
+     let result           = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
      let b:netrw_lastfile = choice
 
    ".........................................
@@ -684,36 +749,36 @@
     " Construct execution string (four lines) which will be passed through filter
 "    call Decho("read via ftp+mipf (method #3)")
     let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
-    new
+    call s:SaveBufVars()|new|call s:RestoreBufVars()
     setlocal ff=unix
     if exists("g:netrw_port") && g:netrw_port != ""
      put ='open '.g:netrw_machine.' '.g:netrw_port
-"     call Decho("filter input: ".getline("."))
+"     call Decho("filter input: ".getline('.'))
     else
      put ='open '.g:netrw_machine
-"     call Decho("filter input: ".getline("."))
+"     call Decho("filter input: ".getline('.'))
     endif
 
     if exists("g:netrw_ftp") && g:netrw_ftp == 1
      put =g:netrw_uid
-"     call Decho("filter input: ".getline("."))
-     put ='\"'.g:netrw_passwd.'\"'
-"     call Decho("filter input: ".getline("."))
+"     call Decho("filter input: ".getline('.'))
+     put ='\"'.s:netrw_passwd.'\"'
+"     call Decho("filter input: ".getline('.'))
     else
-     put ='user \"'.g:netrw_uid.'\" \"'.g:netrw_passwd.'\"'
-"     call Decho("filter input: ".getline("."))
+     put ='user \"'.g:netrw_uid.'\" \"'.s: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("."))
+"     call Decho("filter input: ".getline('.'))
     endif
     if exists("g:netrw_ftpextracmd")
-     exe "put ='".g:netrw_ftpextracmd."'"
-"     call Decho("filter input: ".getline("."))
+     put =g:netrw_ftpextracmd
+"     call Decho("filter input: ".getline('.'))
     endif
     put ='get \"'.netrw_fname.'\" '.tmpfile
-"    call Decho("filter input: ".getline("."))
+"    call Decho("filter input: ".getline('.'))
 
     " perform ftp:
     " -i       : turns off interactive prompting from ftp
@@ -721,7 +786,7 @@
     " -n  win32: quit being obnoxious about password
     norm! 1Gdd
 "    call Decho("executing: %!".g:netrw_ftp_cmd." -i -n")
-    exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n"
+    exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n"
     " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
     if getline(1) !~ "^$"
 "     call Decho("error<".getline(1).">")
@@ -729,8 +794,8 @@
       call netrw#ErrorMsg(s:ERROR,getline(1),5)
      endif
     endif
-    bd!
-    let result           = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
+    call s:SaveBufVars()|bd!|call s:RestoreBufVars()
+    let result           = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
     let b:netrw_lastfile = choice
 
    ".........................................
@@ -742,9 +807,9 @@
     else
      let useport= ""
     endif
-"    call  Decho("executing: !".g:netrw_scp_cmd.useport." '".g:netrw_machine.":".escape(b:netrw_fname,g:netrw_fname_escape)."' ".tmpfile)
-    exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_shq.g:netrw_machine.":".escape(b:netrw_fname,g:netrw_fname_escape).g:netrw_shq." ".tmpfile
-    let result           = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
+"    call Decho("exe s:netrw_silentxfer.!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".escape(b:netrw_fname,g:netrw_fname_escape))." ".tmpfile)
+    exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)
+    let result           = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
     let b:netrw_lastfile = choice
 
    ".........................................
@@ -761,20 +826,21 @@
 
     if match(b:netrw_fname,"#") == -1
      " simple wget
-     let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
-"     call Decho("executing: !".g:netrw_http_cmd." ".tmpfile." http://".g:netrw_machine.netrw_fname)
-     exe g:netrw_silentxfer."!".g:netrw_http_cmd." ".tmpfile." http://".g:netrw_machine.netrw_fname
-     let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
+"     call Decho('using simple wget (# not in b:netrw_fname<'.b:netrw_fname.">)")
+"     call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile)." ".shellescape("http://".g:netrw_machine.netrw_fname))
+     exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1)
+     let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
 
     else
      " wget plus a jump to an in-page marker (ie. http://abc/def.html#aMarker)
-     let netrw_html= substitute(netrw_fname,"#.*$","","")
-     let netrw_tag = substitute(netrw_fname,"^.*#","","")
+"     call Decho(("wget/curl plus jump (# in b:netrw_fname<".b:netrw_fname.">)")
+     let netrw_html= substitute(b:netrw_fname,"#.*$","","")
+     let netrw_tag = substitute(b:netrw_fname,"^.*#","","")
 "     call Decho("netrw_html<".netrw_html.">")
 "     call Decho("netrw_tag <".netrw_tag.">")
-"     call Decho("executing: !".g:netrw_http_cmd." ".tmpfile." http://".g:netrw_machine.netrw_html)
-     exe g:netrw_silentxfer."!".g:netrw_http_cmd." ".tmpfile." http://".g:netrw_machine.netrw_html
-     let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
+"     call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile)." ".shellescape("http://".g:netrw_machine.netrw_html))
+     exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.netrw_html,1)
+     let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
 "     call Decho('<\s*a\s*name=\s*"'.netrw_tag.'"/')
      exe 'norm! 1G/<\s*a\s*name=\s*"'.netrw_tag.'"/'."\<CR>"
     endif
@@ -795,26 +861,25 @@
     else
      put ='open '.g:netrw_machine
     endif
-    put ='user '.g:netrw_uid.' '.g:netrw_passwd
+    put ='user '.g:netrw_uid.' '.s:netrw_passwd
     put ='get '.netrw_fname.' '.tmpfile
     put ='quit'
 
     " perform cadaver operation:
     norm! 1Gdd
 "    call Decho("executing: %!".g:netrw_dav_cmd)
-    exe g:netrw_silentxfer."%!".g:netrw_dav_cmd
+    exe s:netrw_silentxfer."%!".g:netrw_dav_cmd
     bd!
-    let result           = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
+    let result           = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
     let b:netrw_lastfile = choice
 
    ".........................................
    " rsync: NetRead Method #7 {{{3
    elseif     b:netrw_method  == 7
 "    call Decho("read via rsync (method #7)")
-    let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
-"    call Decho("executing: !".g:netrw_rsync_cmd." ".g:netrw_machine.":".netrw_fname." ".tmpfile)
-    exe g:netrw_silentxfer."!".g:netrw_rsync_cmd." ".g:netrw_machine.":".netrw_fname." ".tmpfile
-    let result		= s:NetGetFile(readcmd,tmpfile, b:netrw_method)
+"    call Decho("exe ".s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".netrw_fname)." ".tmpfile)
+    exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)
+    let result		 = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method)
     let b:netrw_lastfile = choice
 
    ".........................................
@@ -822,7 +887,6 @@
    "    fetch://[user@]host[:http]/path
    elseif     b:netrw_method  == 8
 "    call Decho("read via fetch (method #8)")
-    let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
     if g:netrw_fetch_cmd == ""
      if !exists("g:netrw_quiet")
       call netrw#ErrorMsg(s:ERROR,"fetch command not available",7)
@@ -836,15 +900,15 @@
     endif
 "    call Decho("read via fetch for ".netrw_option)
 
-    if exists("g:netrw_uid") && g:netrw_uid != "" && exists("g:netrw_passwd") && g:netrw_passwd != ""
-"     call Decho("executing: !".g:netrw_fetch_cmd." ".tmpfile." ".netrw_option."://".g:netrw_uid.':'.g:netrw_passwd.'@'.g:netrw_machine."/".netrw_fname)
-     exe g:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".netrw_option."://".g:netrw_uid.':'.g:netrw_passwd.'@'.g:netrw_machine."/".netrw_fname
+    if exists("g:netrw_uid") && g:netrw_uid != "" && exists("s:netrw_passwd") && s:netrw_passwd != ""
+"     call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".netrw_fname))
+     exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".b:netrw_fname,1)
     else
-"     call Decho("executing: !".g:netrw_fetch_cmd." ".tmpfile." ".netrw_option."://".g:netrw_machine."/".netrw_fname)
-     exe g:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".netrw_option."://".g:netrw_machine."/".netrw_fname
+"     call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".shellescape(netrw_option."://".g:netrw_machine."/".netrw_fname))
+     exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_machine."/".b:netrw_fname,1)
     endif
 
-    let result		= s:NetGetFile(readcmd,tmpfile, b:netrw_method)
+    let result		= s:NetrwGetFile(readcmd,tmpfile, b:netrw_method)
     let b:netrw_lastfile = choice
     setlocal ro
 
@@ -852,10 +916,9 @@
    " sftp: NetRead Method #9 {{{3
    elseif     b:netrw_method  == 9
 "    call Decho("read via sftp (method #9)")
-    let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
-"    call Decho("executing: !".g:netrw_sftp_cmd." ".g:netrw_machine.":".netrw_fname." ".tmpfile)
-    exe g:netrw_silentxfer."!".g:netrw_sftp_cmd." ".g:netrw_machine.":".netrw_fname." ".tmpfile
-    let result		= s:NetGetFile(readcmd, tmpfile, b:netrw_method)
+"    call Decho("exe ".s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".netrw_fname)." ".tmpfile)
+    exe s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".tmpfile
+    let result		= s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
     let b:netrw_lastfile = choice
 
    ".........................................
@@ -873,21 +936,22 @@
   endif
   if s:FileReadable(tmpfile) && tmpfile !~ '.tar.bz2$' && tmpfile !~ '.tar.gz$' && tmpfile !~ '.zip' && tmpfile !~ '.tar' && readcmd != 't'
 "   call Decho("cleanup by deleting tmpfile<".tmpfile.">")
-   call s:System("delete",tmpfile)
+   call s:System("delete",fnameescape(tmpfile))
   endif
-  call s:NetOptionRestore()
+  call s:NetrwOptionRestore("w:")
 
 "  call Dret("netrw#NetRead :5 getcwd<".getcwd().">")
 endfun
 
 " ------------------------------------------------------------------------
-" NetWrite: responsible for writing a file over the net {{{2
+" netrw#NetWrite: responsible for writing a file over the net {{{2
 fun! netrw#NetWrite(...) range
 "  call Dfunc("netrw#NetWrite(a:0=".a:0.") ".g:loaded_netrw)
 
   " option handling
   let mod= 0
-  call s:NetOptionSave()
+  call s:NetrwOptionSave("w:")
+  call s:NetrwSafeOptions()
 
   " Get Temporary Filename {{{3
   let tmpfile= s:GetTempfile("")
@@ -909,16 +973,16 @@
    " (line numbers don't really make sense for that).
    " Also supports the writing of tar and zip files.
 "   call Decho("(write entire file) silent exe w! ".v:cmdarg." ".tmpfile)
-   silent exe "w! ".v:cmdarg." ".tmpfile
+   silent exe "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile)
   elseif g:netrw_cygwin
    " write (selected portion of) file to temporary
    let cygtmpfile= substitute(tmpfile,'/cygdrive/\(.\)','\1:','')
 "   call Decho("(write selected portion) silent exe ".a:firstline."," . a:lastline . "w! ".v:cmdarg." ".cygtmpfile)
-   silent exe a:firstline."," . a:lastline . "w! ".v:cmdarg." ".cygtmpfile
+   silent exe a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile)
   else
    " write (selected portion of) file to temporary
 "   call Decho("(write selected portion) silent exe ".a:firstline."," . a:lastline . "w! ".v:cmdarg." ".tmpfile)
-   silent exe a:firstline."," . a:lastline . "w! ".v:cmdarg." ".tmpfile
+   silent exe a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile)
   endif
 
   if curbufname == ""
@@ -985,13 +1049,14 @@
 "   call Decho("choice<" . choice . "> ichoice=".ichoice)
 
    " Determine method of write (ftp, rcp, etc) {{{4
-   call s:NetMethod(choice)
+   call s:NetrwMethod(choice)
 
    " =============
    " Perform Protocol-Based Write {{{4
    " ============================
    if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1
     echo "(netrw) Processing your write request..."
+"    call Decho("(netrw) Processing your write request...")
    endif
 
    ".........................................
@@ -1011,9 +1076,8 @@
       let uid_machine = g:netrw_machine
      endif
     endif
-    let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
-"    call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".g:netrw_shq.tmpfile.g:netrw_shq." ".uid_machine.":".netrw_fname)
-    exe g:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".g:netrw_shq.tmpfile.g:netrw_shq." ".uid_machine.":".netrw_fname
+"    call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile)." ".shellescape(uid_machine.":".netrw_fname))
+    exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile,1)." ".shellescape(uid_machine.":".b:netrw_fname,1)
     let b:netrw_lastfile = choice
 
    ".........................................
@@ -1022,21 +1086,23 @@
 "    call Decho("write via ftp+.netrc (method #2)")
     let netrw_fname= b:netrw_fname
     new
+"    call Decho("filter input window#".winnr())
     setlocal ff=unix
-    exe "put ='".g:netrw_ftpmode."'"
-"    call Decho(" filter input: ".getline("."))
+    put =g:netrw_ftpmode
+"    call Decho("filter input: ".getline('.'))
     if exists("g:netrw_ftpextracmd")
-     exe "put ='".g:netrw_ftpextracmd."'"
-"     call Decho("filter input: ".getline("."))
+     put =g:netrw_ftpextracmd
+"     call Decho("filter input: ".getline('.'))
     endif
-    exe "put ='".'put \"'.tmpfile.'\" \"'.netrw_fname.'\"'."'"
-"    call Decho(" filter input: ".getline("."))
+    call setline(line("$")+1,'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
+     exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)
     else
+"     call Decho("filter input window#".winnr())
 "     call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine)
-     exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine
+     exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)
     endif
     " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
     if getline(1) !~ "^$"
@@ -1058,22 +1124,22 @@
     setlocal ff=unix
     if exists("g:netrw_port") && g:netrw_port != ""
      put ='open '.g:netrw_machine.' '.g:netrw_port
-"     call Decho("filter input: ".getline("."))
+"     call Decho("filter input: ".getline('.'))
     else
      put ='open '.g:netrw_machine
-"     call Decho("filter input: ".getline("."))
+"     call Decho("filter input: ".getline('.'))
     endif
     if exists("g:netrw_ftp") && g:netrw_ftp == 1
      put =g:netrw_uid
-"     call Decho("filter input: ".getline("."))
-     put ='\"'.g:netrw_passwd.'\"'
-"     call Decho("filter input: ".getline("."))
+"     call Decho("filter input: ".getline('.'))
+     put ='\"'.s:netrw_passwd.'\"'
+"     call Decho("filter input: ".getline('.'))
     else
-     put ='user \"'.g:netrw_uid.'\" \"'.g:netrw_passwd.'\"'
-"     call Decho("filter input: ".getline("."))
+     put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
+"     call Decho("filter input: ".getline('.'))
     endif
     put ='put \"'.tmpfile.'\" \"'.netrw_fname.'\"'
-"    call Decho("filter input: ".getline("."))
+"    call Decho("filter input: ".getline('.'))
     " save choice/id/password for future use
     let b:netrw_lastfile = choice
 
@@ -1083,7 +1149,7 @@
     " -n  win32: quit being obnoxious about password
     norm! 1Gdd
 "    call Decho("executing: %!".g:netrw_ftp_cmd." -i -n")
-    exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n"
+    exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n"
     " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
     if getline(1) !~ "^$"
      if  !exists("g:netrw_quiet")
@@ -1097,14 +1163,13 @@
    " scp: NetWrite Method #4 {{{4
    elseif     b:netrw_method == 4
 "    call Decho("write via scp (method #4)")
-    let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
     if exists("g:netrw_port") && g:netrw_port != ""
-     let useport= " ".g:netrw_scpport." ".g:netrw_port
+     let useport= " ".g:netrw_scpport." ".fnameescape(g:netrw_port)
     else
      let useport= ""
     endif
-"    call Decho("exe ".g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_shq.tmpfile.g:netrw_shq." ".g:netrw_shq.g:netrw_machine.":".netrw_fname.g:netrw_shq)
-    exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_shq.tmpfile.g:netrw_shq." ".g:netrw_shq.g:netrw_machine.":".netrw_fname.g:netrw_shq
+"    call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile)." ".shellescape(g:netrw_machine.":".netrw_fname))
+    exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)
     let b:netrw_lastfile = choice
 
    ".........................................
@@ -1129,13 +1194,15 @@
     else
      put ='open '.g:netrw_machine
     endif
-    put ='user '.g:netrw_uid.' '.g:netrw_passwd
+    if exists("g:netrw_uid") && exists("s:netrw_passwd")
+     put ='user '.g:netrw_uid.' '.s:netrw_passwd
+    endif
     put ='put '.tmpfile.' '.netrw_fname
 
     " perform cadaver operation:
     norm! 1Gdd
 "    call Decho("executing: %!".g:netrw_dav_cmd)
-    exe g:netrw_silentxfer."%!".g:netrw_dav_cmd
+    exe s:netrw_silentxfer."%!".g:netrw_dav_cmd
     bd!
     let b:netrw_lastfile = choice
 
@@ -1143,9 +1210,8 @@
    " rsync: NetWrite Method #7 {{{4
    elseif     b:netrw_method == 7
 "    call Decho("write via rsync (method #7)")
-    let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
 "    call Decho("executing: !".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".netrw_fname)
-    exe g:netrw_silentxfer."!".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".netrw_fname
+    exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)
     let b:netrw_lastfile = choice
 
    ".........................................
@@ -1161,10 +1227,10 @@
     new
     setlocal ff=unix
     put ='put \"'.escape(tmpfile,'\').'\" '.netrw_fname
-"    call Decho("filter input: ".getline("."))
+"    call Decho("filter input: ".getline('.'))
     norm! 1Gdd
 "    call Decho("executing: %!".g:netrw_sftp_cmd.' '.uid_machine)
-    exe g:netrw_silentxfer."%!".g:netrw_sftp_cmd.' '.uid_machine
+    exe s:netrw_silentxfer."%!".g:netrw_sftp_cmd.' '.shellescape(uid_machine,1)
     bd!
     let b:netrw_lastfile= choice
 
@@ -1181,7 +1247,7 @@
 "   call Decho("tmpfile<".tmpfile."> readable, will now delete it")
    call s:System("delete",tmpfile)
   endif
-  call s:NetOptionRestore()
+  call s:NetrwOptionRestore("w:")
 
   if a:firstline == 1 && a:lastline == line("$")
    " restore modifiability; usually equivalent to set nomod
@@ -1192,7 +1258,7 @@
 endfun
 
 " ---------------------------------------------------------------------
-" NetSource: source a remotely hosted vim script {{{2
+" netrw#NetSource: source a remotely hosted vim script {{{2
 " uses NetRead to get a copy of the file into a temporarily file,
 "              then sources that file,
 "              then removes that file.
@@ -1217,7 +1283,7 @@
 "    call Decho("s:netread_tmpfile<".s:netrw_tmpfile.">")
     if s:FileReadable(s:netrw_tmpfile)
 "     call Decho("exe so ".s:netrw_tmpfile)
-     exe "so ".s:netrw_tmpfile
+     exe "so ".fnameescape(s:netrw_tmpfile)
      call delete(s:netrw_tmpfile)
      unlet s:netrw_tmpfile
     else
@@ -1230,17 +1296,18 @@
 endfun
 
 " ===========================================
-" NetGetFile: Function to read temporary file "tfile" with command "readcmd". {{{2
+" s:NetrwGetFile: Function to read temporary file "tfile" with command "readcmd". {{{2
 "    readcmd == %r : replace buffer with newly read file
 "            == 0r : read file at top of buffer
 "            == r  : read file after current line
 "            == t  : leave file in temporary form (ie. don't read into buffer)
-fun! s:NetGetFile(readcmd, tfile, method)
-"  call Dfunc("NetGetFile(readcmd<".a:readcmd.">,tfile<".a:tfile."> method<".a:method.">)")
+fun! s:NetrwGetFile(readcmd, tfile, method)
+"  call Dfunc("NetrwGetFile(readcmd<".a:readcmd.">,tfile<".a:tfile."> method<".a:method.">)")
 
   " readcmd=='t': simply do nothing
   if a:readcmd == 't'
-"   call Dret("NetGetFile : skip read of <".a:tfile.">")
+"   call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
+"   call Dret("NetrwGetFile : skip read of <".a:tfile.">")
    return
   endif
 
@@ -1263,8 +1330,8 @@
    else
     let tfile= a:tfile
    endif
-"   call Decho("keepalt exe file ".tfile)
-   keepalt exe "silent! keepalt file ".tfile
+"   "   call Decho("exe silent! keepalt file ".tfile)
+   exe "silent! keepalt file ".fnameescape(tfile)
 
    " edit temporary file (ie. read the temporary file in)
    if     rfile =~ '\.zip$'
@@ -1285,8 +1352,13 @@
    endif
 
    " rename buffer back to remote filename
-   exe "silent! keepalt file ".escape(rfile,' ')
-   filetype detect
+"   call Decho("exe silent! keepalt file ".escape(rfile,' '))
+   exe "silent! keepalt file ".fnameescape(rfile)
+   if a:method == 5
+    set ft=html
+   else
+    filetype detect
+   endif
 "   call Dredir("renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">","ls!")
    let line1 = 1
    let line2 = line("$")
@@ -1297,15 +1369,16 @@
    let curline = line(".")
    let lastline= line("$")
 "   call Decho("exe<".a:readcmd." ".v:cmdarg." ".a:tfile.">  line#".curline)
-   exe a:readcmd." ".v:cmdarg." ".a:tfile
+   exe a:readcmd." ".fnameescape(v:cmdarg)." ".fnameescape(a:tfile)
    let line1= curline + 1
    let line2= line("$") - lastline + 1
 
   else
    " not readable
+"   call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
 "   call Decho("tfile<".a:tfile."> not readable")
    call netrw#ErrorMsg(s:WARNING,"file <".a:tfile."> not readable",9)
-"   call Dret("NetGetFile : tfile<".a:tfile."> not readable")
+"   call Dret("NetrwGetFile : tfile<".a:tfile."> not readable")
    return
   endif
 
@@ -1317,20 +1390,22 @@
 "   call Decho("NetReadFixup() not called, doesn't exist  (line1=".line1." line2=".line2.")")
   endif
 
-  " update the Buffers menu
-  if has("gui") && has("gui_running")
-   silent! emenu Buffers.Refresh\ menu
+  if has("gui") && has("menu") && has("gui_running") && &go =~ 'm'
+   " update the Buffers menu
+   call s:UpdateBuffersMenu()
   endif
 
 "  call Decho("readcmd<".a:readcmd."> cmdarg<".v:cmdarg."> tfile<".a:tfile."> readable=".s:FileReadable(a:tfile))
 
  " make sure file is being displayed
-  redraw!
-"  call Dret("NetGetFile")
+"  redraw!
+
+"  call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
+"  call Dret("NetrwGetFile")
 endfun
 
 " ------------------------------------------------------------------------
-" NetMethod:  determine method of transfer {{{2
+" s:NetrwMethod:  determine method of transfer {{{2
 "  method == 1: rcp
 "	     2: ftp + <.netrc>
 "	     3: ftp + machine, id, password, and [path]filename
@@ -1340,8 +1415,8 @@
 "	     7: rsync
 "	     8: fetch
 "	     9: sftp
-fun! s:NetMethod(choice)  " globals: method machine id passwd fname
-"   call Dfunc("NetMethod(a:choice<".a:choice.">)")
+fun! s:NetrwMethod(choice)  " globals: method machine id passwd fname
+"   call Dfunc("NetrwMethod(a:choice<".a:choice.">)")
 
   " initialization
   let b:netrw_method  = 0
@@ -1352,13 +1427,13 @@
 
   " Patterns:
   " mipf     : a:machine a:id password filename	     Use ftp
-  " mf	    : a:machine filename		     Use ftp + <.netrc> or g:netrw_uid g:netrw_passwd
-  " ftpurm   : ftp://[user@]host[[#:]port]/filename  Use ftp + <.netrc> or g:netrw_uid g:netrw_passwd
+  " mf	    : a:machine filename		     Use ftp + <.netrc> or g:netrw_uid s:netrw_passwd
+  " ftpurm   : ftp://[user@]host[[#:]port]/filename  Use ftp + <.netrc> or g:netrw_uid s:netrw_passwd
   " rcpurm   : rcp://[user@]host/filename	     Use rcp
   " rcphf    : [user@]host:filename		     Use rcp
   " scpurm   : scp://[user@]host[[#:]port]/filename  Use scp
   " httpurm  : http://[user@]host/filename	     Use wget
-  " davurm   : [s]dav://host[:port]/path             Use cadaver
+  " davurm   : dav[s]://host[:port]/path             Use cadaver
   " rsyncurm : rsync://host[:port]/path              Use rsync
   " fetchurm : fetch://[user@]host[:http]/filename   Use fetch (defaults to ftp, override for http)
   " sftpurm  : sftp://[user@]host/filename  Use scp
@@ -1369,7 +1444,7 @@
   let rcphf    = '^\(\(\h\w*\)@\)\=\(\h\w*\):\([^@]\+\)$'
   let scpurm   = '^scp://\([^/#:]\+\)\%([#:]\(\d\+\)\)\=/\(.*\)$'
   let httpurm  = '^http://\([^/]\{-}\)\(/.*\)\=$'
-  let davurm   = '^s\=dav://\([^/]\+\)/\(.*/\)\([-_.~[:alnum:]]\+\)$'
+  let davurm   = '^davs\=://\([^/]\+\)/\(.*/\)\([-_.~[:alnum:]]\+\)$'
   let rsyncurm = '^rsync://\([^/]\{-}\)/\(.*\)\=$'
   let fetchurm = '^fetch://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\(:http\)\=/\(.*\)$'
   let sftpurm  = '^sftp://\([^/]\{-}\)/\(.*\)\=$'
@@ -1430,7 +1505,7 @@
    if userid != ""
     let g:netrw_uid= userid
    endif
-   if exists("g:netrw_uid") && exists("g:netrw_passwd")
+   if exists("g:netrw_uid") && exists("s:netrw_passwd")
     let b:netrw_method = 3
    else
     if s:FileReadable(expand("$HOME/.netrc")) && !g:netrw_ignorenetrc
@@ -1438,9 +1513,9 @@
     else
      if !exists("g:netrw_uid") || g:netrw_uid == ""
       call NetUserPass()
-     elseif !exists("g:netrw_passwd") || g:netrw_passwd == ""
+     elseif !exists("s:netrw_passwd") || s:netrw_passwd == ""
       call NetUserPass(g:netrw_uid)
-    " else just use current g:netrw_uid and g:netrw_passwd
+    " else just use current g:netrw_uid and s:netrw_passwd
      endif
      let b:netrw_method= 3
     endif
@@ -1460,13 +1535,13 @@
    let b:netrw_method  = 3
    let g:netrw_machine = substitute(a:choice,mipf,'\1',"")
    let g:netrw_uid     = substitute(a:choice,mipf,'\2',"")
-   let g:netrw_passwd  = substitute(a:choice,mipf,'\3',"")
+   let s:netrw_passwd  = substitute(a:choice,mipf,'\3',"")
    let b:netrw_fname   = substitute(a:choice,mipf,'\4',"")
 
   " Issue an ftp: "hostname [path/]filename"
   elseif match(a:choice,mf) == 0
 "   call Decho("(ftp) host file")
-   if exists("g:netrw_uid") && exists("g:netrw_passwd")
+   if exists("g:netrw_uid") && exists("s:netrw_passwd")
     let b:netrw_method  = 3
     let g:netrw_machine = substitute(a:choice,mf,'\1',"")
     let b:netrw_fname   = substitute(a:choice,mf,'\2',"")
@@ -1487,10 +1562,10 @@
   " Issue an rcp: hostname:filename"  (this one should be last)
   elseif match(a:choice,rcphf) == 0
 "   call Decho("(rcp) [user@]host:file) rcphf<".rcphf.">")
-   let b:netrw_method = 1
-   let userid	     = substitute(a:choice,rcphf,'\2',"")
-   let g:netrw_machine= substitute(a:choice,rcphf,'\3',"")
-   let b:netrw_fname  = substitute(a:choice,rcphf,'\4',"")
+   let b:netrw_method  = 1
+   let userid          = substitute(a:choice,rcphf,'\2',"")
+   let g:netrw_machine = substitute(a:choice,rcphf,'\3',"")
+   let b:netrw_fname   = substitute(a:choice,rcphf,'\4',"")
 "   call Decho('\1<'.substitute(a:choice,rcphf,'\1',"").">")
 "   call Decho('\2<'.substitute(a:choice,rcphf,'\2',"").">")
 "   call Decho('\3<'.substitute(a:choice,rcphf,'\3',"").">")
@@ -1518,11 +1593,11 @@
 "  if exists("g:netrw_uid")		"Decho
 "   call Decho("g:netrw_uid    <".g:netrw_uid.">")
 "  endif					"Decho
-"  if exists("g:netrw_passwd")		"Decho
-"   call Decho("g:netrw_passwd <".g:netrw_passwd.">")
+"  if exists("s:netrw_passwd")		"Decho
+"   call Decho("s:netrw_passwd <".s:netrw_passwd.">")
 "  endif					"Decho
 "  call Decho("b:netrw_fname  <".b:netrw_fname.">")
-"  call Dret("NetMethod : b:netrw_method=".b:netrw_method)
+"  call Dret("NetrwMethod : b:netrw_method=".b:netrw_method)
 endfun
 
 " ------------------------------------------------------------------------
@@ -1565,10 +1640,10 @@
  " get password
  if a:0 <= 1 " via prompt
 "  call Decho("a:0=".a:0." case <=1:")
-  let g:netrw_passwd= inputsecret("Enter Password: ")
+  let s:netrw_passwd= inputsecret("Enter Password: ")
  else " from command line
 "  call Decho("a:0=".a:0." case >1: a:2<".a:2.">")
-  let g:netrw_passwd=a:2
+  let s:netrw_passwd=a:2
  endif
 
 "  call Dret("NetUserPass")
@@ -1583,205 +1658,501 @@
 fun! s:BrowserMaps(islocal)
 "  call Dfunc("s:BrowserMaps(islocal=".a:islocal.") b:netrw_curdir<".b:netrw_curdir.">")
   if a:islocal
-   nnoremap <buffer> <silent> <cr>	:call netrw#LocalBrowseCheck(<SID>NetBrowseChgDir(1,<SID>NetGetWord()))<cr>
-   nnoremap <buffer> <silent> <leftmouse> <leftmouse>:call netrw#LocalBrowseCheck(<SID>NetBrowseChgDir(1,<SID>NetGetWord()))<cr>
-   nnoremap <buffer> <silent> <c-l>	:call <SID>NetRefresh(1,<SID>NetBrowseChgDir(1,'./'))<cr>
-   nnoremap <buffer> <silent> -		:exe "norm! 0"<bar>call netrw#LocalBrowseCheck(<SID>NetBrowseChgDir(1,'../'))<cr>
-   nnoremap <buffer> <silent> a		:call <SID>NetHide(1)<cr>
-   nnoremap <buffer> <silent> mb	:<c-u>call <SID>NetBookmarkDir(0,b:netrw_curdir)<cr>
-   nnoremap <buffer> <silent> gb	:<c-u>call <SID>NetBookmarkDir(1,b:netrw_curdir)<cr>
-   nnoremap <buffer> <silent> c		:exe "cd ".b:netrw_curdir<cr>
+   nnoremap <buffer> <silent> <cr>	:call netrw#LocalBrowseCheck(<SID>NetrwBrowseChgDir(1,<SID>NetrwGetWord()))<cr>
+   nnoremap <buffer> <silent> -		:exe "norm! 0"<bar>call netrw#LocalBrowseCheck(<SID>NetrwBrowseChgDir(1,'../'))<cr>
+   nnoremap <buffer> <silent> a		:call <SID>NetrwHide(1)<cr>
+   nnoremap <buffer> <silent> mb	:<c-u>call <SID>NetrwBookmarkDir(0,b:netrw_curdir)<cr>
+   nnoremap <buffer> <silent> mc	:<c-u>call <SID>NetrwMarkFileCopy(1)<cr>
+   nnoremap <buffer> <silent> md	:<c-u>call <SID>NetrwMarkFileDiff(1)<cr>
+   nnoremap <buffer> <silent> me	:<c-u>call <SID>NetrwMarkFileEdit(1)<cr>
+   nnoremap <buffer> <silent> mf	:<c-u>call <SID>NetrwMarkFile(1,<SID>NetrwGetWord())<cr>
+   nnoremap <buffer> <silent> mg	:<c-u>call <SID>NetrwMarkFileGrep(1)<cr>
+   nnoremap <buffer> <silent> mh	:<c-u>call <SID>NetrwMarkHideSfx(1)<cr>
+   nnoremap <buffer> <silent> mm	:<c-u>call <SID>NetrwMarkFileMove(1)<cr>
+   nnoremap <buffer> <silent> mp	:<c-u>call <SID>NetrwMarkFilePrint(1)<cr>
+   nnoremap <buffer> <silent> mr	:<c-u>call <SID>NetrwMarkFileRegexp(1)<cr>
+   nnoremap <buffer> <silent> ms	:<c-u>call <SID>NetrwMarkFileSource(1)<cr>
+   nnoremap <buffer> <silent> mT	:<c-u>call <SID>NetrwMarkFileTag(1)<cr>
+   nnoremap <buffer> <silent> mt	:<c-u>call <SID>NetrwMarkFileTgt(1)<cr>
+   nnoremap <buffer> <silent> mu	:<c-u>call <SID>NetrwUnMarkFile(1)<cr>
+   nnoremap <buffer> <silent> mx	:<c-u>call <SID>NetrwMarkFileExe(1)<cr>
+   nnoremap <buffer> <silent> mz	:<c-u>call <SID>NetrwMarkFileCompress(1)<cr>
+   nnoremap <buffer> <silent> gb	:<c-u>call <SID>NetrwBookmarkDir(1,b:netrw_curdir)<cr>
+   nnoremap <buffer> <silent> gh	:<c-u>call <SID>NetrwHidden(1)<cr>
+   nnoremap <buffer> <silent> c		:exe "keepjumps lcd ".fnameescape(b:netrw_curdir)<cr>
    nnoremap <buffer> <silent> C		:let g:netrw_chgwin= winnr()<cr>
-   nnoremap <buffer> <silent> d		:call <SID>NetMakeDir("")<cr>
-   nnoremap <buffer> <silent> <c-h>	:call <SID>NetHideEdit(1)<cr>
-   nnoremap <buffer> <silent> i		:call <SID>NetListStyle(1)<cr>
-   nnoremap <buffer> <silent> o		:call <SID>NetSplit(3)<cr>
-   nnoremap <buffer> <silent> O		:call <SID>LocalObtain()<cr>
-   nnoremap <buffer> <silent> p		:call <SID>NetPreview(<SID>NetBrowseChgDir(1,<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(1,<SID>NetBrowseChgDir(1,'./'))<cr>
-   nnoremap <buffer> <silent> s		:call <SID>NetSortStyle(1)<cr>
+   nnoremap <buffer> <silent> d		:call <SID>NetrwMakeDir("")<cr>
+   nnoremap <buffer> <silent> i		:call <SID>NetrwListStyle(1)<cr>
+   nnoremap <buffer> <silent> o		:call <SID>NetrwSplit(3)<cr>
+   nnoremap <buffer> <silent> O		:call <SID>NetrwObtain(1)<cr>
+   nnoremap <buffer> <silent> p		:call <SID>NetrwPreview(<SID>NetrwBrowseChgDir(1,<SID>NetrwGetWord(),1))<cr>
+   nnoremap <buffer> <silent> P		:call <SID>NetrwPrevWinOpen(1)<cr>
+   nnoremap <buffer> <silent> qb	:<c-u>call <SID>NetrwBookmarkDir(2,b:netrw_curdir)<cr>
+   nnoremap <buffer> <silent> mB	:<c-u>call <SID>NetrwBookmarkDir(6,b:netrw_curdir)<cr>
+   nnoremap <buffer> <silent> qf	:<c-u>call <SID>NetrwFileInfo(1,<SID>NetrwGetWord())<cr>
+   nnoremap <buffer> <silent> r		:let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetrwRefresh(1,<SID>NetrwBrowseChgDir(1,'./'))<cr>
+   nnoremap <buffer> <silent> s		:call <SID>NetrwSortStyle(1)<cr>
    nnoremap <buffer> <silent> S		:call <SID>NetSortSequence(1)<cr>
-   nnoremap <buffer> <silent> t		:call <SID>NetSplit(4)<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(5)<cr>
-   nnoremap <buffer> <silent> x		:call netrw#NetBrowseX(<SID>NetBrowseChgDir(1,<SID>NetGetWord(),0),0)"<cr>
+   nnoremap <buffer> <silent> t		:call <SID>NetrwSplit(4)<cr>
+   nnoremap <buffer> <silent> u		:<c-u>call <SID>NetrwBookmarkDir(4,expand("%"))<cr>
+   nnoremap <buffer> <silent> U		:<c-u>call <SID>NetrwBookmarkDir(5,expand("%"))<cr>
+   nnoremap <buffer> <silent> v		:call <SID>NetrwSplit(5)<cr>
+   nnoremap <buffer> <silent> x		:call netrw#NetrwBrowseX(<SID>NetrwBrowseChgDir(1,<SID>NetrwGetWord(),0),0)"<cr>
+   if !hasmapto('<Plug>NetrwHideEdit')
+    nmap <buffer> <unique> <c-h> <Plug>NetrwHideEdit
+   endif
+   nnoremap <buffer> <silent> <Plug>NetrwHideEdit	:call <SID>NetrwHideEdit(1)<cr>
+   if !hasmapto('<Plug>NetrwRefresh')
+    nmap <buffer> <unique> <c-l> <Plug>NetrwRefresh
+   endif
+   nnoremap <buffer> <silent> <Plug>NetrwRefresh		:call <SID>NetrwRefresh(1,<SID>NetrwBrowseChgDir(1,'./'))<cr>
    if s:didstarstar || !mapcheck("<s-down>","n")
     nnoremap <buffer> <silent> <s-down>	:Nexplore<cr>
    endif
    if s:didstarstar || !mapcheck("<s-up>","n")
     nnoremap <buffer> <silent> <s-up>	:Pexplore<cr>
    endif
-   exe 'nnoremap <buffer> <silent> <del>	:call <SID>LocalBrowseRm("'.b:netrw_curdir.'")<cr>'
-   exe 'vnoremap <buffer> <silent> <del>	:call <SID>LocalBrowseRm("'.b:netrw_curdir.'")<cr>'
-   exe 'nnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>LocalBrowseRm("'.b:netrw_curdir.'")<cr>'
-   exe 'vnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>LocalBrowseRm("'.b:netrw_curdir.'")<cr>'
-   exe 'nnoremap <buffer> <silent> D		:call <SID>LocalBrowseRm("'.b:netrw_curdir.'")<cr>'
-   exe 'vnoremap <buffer> <silent> D		:call <SID>LocalBrowseRm("'.b:netrw_curdir.'")<cr>'
-   exe 'nnoremap <buffer> <silent> R		:call <SID>LocalBrowseRename("'.b:netrw_curdir.'")<cr>'
-   exe 'vnoremap <buffer> <silent> R		:call <SID>LocalBrowseRename("'.b:netrw_curdir.'")<cr>'
-   exe 'nnoremap <buffer> <silent> <Leader>m	:call <SID>NetMakeDir("")<cr>'
-   nnoremap <buffer> <F1>		:he netrw-dir<cr>
+   let mapsafecurdir = escape(b:netrw_curdir, s:netrw_map_escape)
+   if g:netrw_mousemaps == 1
+    nnoremap <buffer> <silent> <leftmouse>   <leftmouse>:call <SID>NetrwLeftmouse(1)<cr>
+    nnoremap <buffer> <silent> <middlemouse> <leftmouse>:call <SID>NetrwPrevWinOpen(1)<cr>
+    nnoremap <buffer> <silent> <s-leftmouse> <leftmouse>:call <SID>NetrwMarkFile(1,<SID>NetrwGetWord())<cr>
+    exe 'nnoremap <buffer> <silent> <rightmouse>  <leftmouse>:call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
+    exe 'vnoremap <buffer> <silent> <rightmouse>  <leftmouse>:call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
+   endif
+   exe 'nnoremap <buffer> <silent> <del>	:call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
+   exe 'vnoremap <buffer> <silent> <del>	:call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
+   exe 'nnoremap <buffer> <silent> D		:call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
+   exe 'vnoremap <buffer> <silent> D		:call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
+   exe 'nnoremap <buffer> <silent> R		:call <SID>NetrwLocalRename("'.mapsafecurdir.'")<cr>'
+   exe 'vnoremap <buffer> <silent> R		:call <SID>NetrwLocalRename("'.mapsafecurdir.'")<cr>'
+   exe 'nnoremap <buffer> <silent> <Leader>m	:call <SID>NetrwMakeDir("")<cr>'
+   nnoremap <buffer> <F1>		:he netrw-quickhelp<cr>
 
   else " remote
    call s:RemotePathAnalysis(b:netrw_curdir)
-   nnoremap <buffer> <silent> <cr>	:call <SID>NetBrowse(0,<SID>NetBrowseChgDir(0,<SID>NetGetWord()))<cr>
-   nnoremap <buffer> <silent> <leftmouse> <leftmouse>:call <SID>NetBrowse(0,<SID>NetBrowseChgDir(0,<SID>NetGetWord()))<cr>
-   nnoremap <buffer> <silent> <c-l>	:call <SID>NetRefresh(0,<SID>NetBrowseChgDir(0,'./'))<cr>
-   nnoremap <buffer> <silent> -		:exe "norm! 0"<bar>call <SID>NetBrowse(0,<SID>NetBrowseChgDir(0,'../'))<cr>
-   nnoremap <buffer> <silent> a		:call <SID>NetHide(0)<cr>
-   nnoremap <buffer> <silent> mb	:<c-u>call <SID>NetBookmarkDir(0,b:netrw_curdir)<cr>
-   nnoremap <buffer> <silent> gb	:<c-u>call <SID>NetBookmarkDir(1,b:netrw_cur)<cr>
+   nnoremap <buffer> <silent> <cr>	:call <SID>NetrwBrowse(0,<SID>NetrwBrowseChgDir(0,<SID>NetrwGetWord()))<cr>
+   nnoremap <buffer> <silent> <c-l>	:call <SID>NetrwRefresh(0,<SID>NetrwBrowseChgDir(0,'./'))<cr>
+   nnoremap <buffer> <silent> -		:exe "norm! 0"<bar>call <SID>NetrwBrowse(0,<SID>NetrwBrowseChgDir(0,'../'))<cr>
+   nnoremap <buffer> <silent> a		:call <SID>NetrwHide(0)<cr>
+   nnoremap <buffer> <silent> mb	:<c-u>call <SID>NetrwBookmarkDir(0,b:netrw_curdir)<cr>
+   nnoremap <buffer> <silent> mc	:<c-u>call <SID>NetrwMarkFileCopy(0)<cr>
+   nnoremap <buffer> <silent> md	:<c-u>call <SID>NetrwMarkFileDiff(0)<cr>
+   nnoremap <buffer> <silent> me	:<c-u>call <SID>NetrwMarkFileEdit(0)<cr>
+   nnoremap <buffer> <silent> mf	:<c-u>call <SID>NetrwMarkFile(0,<SID>NetrwGetWord())<cr>
+   nnoremap <buffer> <silent> mg	:<c-u>call <SID>NetrwMarkFileGrep(0)<cr>
+   nnoremap <buffer> <silent> mh	:<c-u>call <SID>NetrwMarkHideSfx(0)<cr>
+   nnoremap <buffer> <silent> mm	:<c-u>call <SID>NetrwMarkFileMove(0)<cr>
+   nnoremap <buffer> <silent> mp	:<c-u>call <SID>NetrwMarkFilePrint(0)<cr>
+   nnoremap <buffer> <silent> mr	:<c-u>call <SID>NetrwMarkFileRegexp(0)<cr>
+   nnoremap <buffer> <silent> ms	:<c-u>call <SID>NetrwMarkFileSource(0)<cr>
+   nnoremap <buffer> <silent> mT	:<c-u>call <SID>NetrwMarkFileTag(0)<cr>
+   nnoremap <buffer> <silent> mt	:<c-u>call <SID>NetrwMarkFileTgt(0)<cr>
+   nnoremap <buffer> <silent> mu	:<c-u>call <SID>NetrwUnMarkFile(0)<cr>
+   nnoremap <buffer> <silent> mx	:<c-u>call <SID>NetrwMarkFileExe(0)<cr>
+   nnoremap <buffer> <silent> mz	:<c-u>call <SID>NetrwMarkFileCompress(0)<cr>
+   nnoremap <buffer> <silent> gb	:<c-u>call <SID>NetrwBookmarkDir(1,b:netrw_cur)<cr>
+   nnoremap <buffer> <silent> gh	:<c-u>call <SID>NetrwHidden(0)<cr>
    nnoremap <buffer> <silent> C		:let g:netrw_chgwin= winnr()<cr>
-   nnoremap <buffer> <silent> <c-h>	:call <SID>NetHideEdit(0)<cr>
-   nnoremap <buffer> <silent> i		:call <SID>NetListStyle(0)<cr>
-   nnoremap <buffer> <silent> o		:call <SID>NetSplit(0)<cr>
-   nnoremap <buffer> <silent> O		:call netrw#NetObtain(0)<cr>
-   vnoremap <buffer> <silent> O		:call netrw#NetObtain(1)<cr>
-   nnoremap <buffer> <silent> p		:call <SID>NetPreview(<SID>NetBrowseChgDir(1,<SID>NetGetWord(),1))<cr>
-   nnoremap <buffer> <silent> P		:call <SID>NetPrevWinOpen(0)<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>NetBrowse(0,<SID>NetBrowseChgDir(0,'./'))<cr>
-   nnoremap <buffer> <silent> s		:call <SID>NetSortStyle(0)<cr>
+   nnoremap <buffer> <silent> i		:call <SID>NetrwListStyle(0)<cr>
+   nnoremap <buffer> <silent> o		:call <SID>NetrwSplit(0)<cr>
+   nnoremap <buffer> <silent> O		:call <SID>NetrwObtain(0)<cr>
+   nnoremap <buffer> <silent> p		:call <SID>NetrwPreview(<SID>NetrwBrowseChgDir(1,<SID>NetrwGetWord(),1))<cr>
+   nnoremap <buffer> <silent> P		:call <SID>NetrwPrevWinOpen(0)<cr>
+   nnoremap <buffer> <silent> qb	:<c-u>call <SID>NetrwBookmarkDir(2,b:netrw_curdir)<cr>
+   nnoremap <buffer> <silent> mB	:<c-u>call <SID>NetrwBookmarkDir(6,b:netrw_curdir)<cr>
+   nnoremap <buffer> <silent> qf	:<c-u>call <SID>NetrwFileInfo(0,<SID>NetrwGetWord())<cr>
+   nnoremap <buffer> <silent> r		:let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetrwBrowse(0,<SID>NetrwBrowseChgDir(0,'./'))<cr>
+   nnoremap <buffer> <silent> s		:call <SID>NetrwSortStyle(0)<cr>
    nnoremap <buffer> <silent> S		:call <SID>NetSortSequence(0)<cr>
-   nnoremap <buffer> <silent> t		:call <SID>NetSplit(1)<cr>
-   nnoremap <buffer> <silent> u		:<c-u>call <SID>NetBookmarkDir(4,b:netrw_curdir)<cr>
-   nnoremap <buffer> <silent> U		:<c-u>call <SID>NetBookmarkDir(5,b:netrw_curdir)<cr>
-   nnoremap <buffer> <silent> v		:call <SID>NetSplit(2)<cr>
-   nnoremap <buffer> <silent> x		:call netrw#NetBrowseX(<SID>NetBrowseChgDir(0,<SID>NetGetWord()),1)<cr>
-   exe 'nnoremap <buffer> <silent> <del>	:call <SID>NetBrowseRm("'.s:user.s:machine.'","'.s:path.'")<cr>'
-   exe 'vnoremap <buffer> <silent> <del>	:call <SID>NetBrowseRm("'.s:user.s:machine.'","'.s:path.'")<cr>'
-   exe 'nnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetBrowseRm("'.s:user.s:machine.'","'.s:path.'")<cr>'
-   exe 'vnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetBrowseRm("'.s:user.s:machine.'","'.s:path.'")<cr>'
-   exe 'nnoremap <buffer> <silent> d	:call <SID>NetMakeDir("'.s:user.s:machine.'")<cr>'
-   exe 'nnoremap <buffer> <silent> D	:call <SID>NetBrowseRm("'.s:user.s:machine.'","'.s:path.'")<cr>'
-   exe 'vnoremap <buffer> <silent> D	:call <SID>NetBrowseRm("'.s:user.s:machine.'","'.s:path.'")<cr>'
-   exe 'nnoremap <buffer> <silent> R	:call <SID>NetBrowseRename("'.s:user.s:machine.'","'.s:path.'")<cr>'
-   exe 'vnoremap <buffer> <silent> R	:call <SID>NetBrowseRename("'.s:user.s:machine.'","'.s:path.'")<cr>'
+   nnoremap <buffer> <silent> t		:call <SID>NetrwSplit(1)<cr>
+   nnoremap <buffer> <silent> u		:<c-u>call <SID>NetrwBookmarkDir(4,b:netrw_curdir)<cr>
+   nnoremap <buffer> <silent> U		:<c-u>call <SID>NetrwBookmarkDir(5,b:netrw_curdir)<cr>
+   nnoremap <buffer> <silent> v		:call <SID>NetrwSplit(2)<cr>
+   nnoremap <buffer> <silent> x		:call netrw#NetrwBrowseX(<SID>NetrwBrowseChgDir(0,<SID>NetrwGetWord()),1)<cr>
+   if !hasmapto('<Plug>NetrwHideEdit')
+    nmap <buffer> <c-h> <Plug>NetrwHideEdit
+   endif
+   nnoremap <buffer> <silent> <Plug>NetrwHideEdit	:call <SID>NetrwHideEdit(0)<cr>
+   if !hasmapto('<Plug>NetrwRefresh')
+    nmap <buffer> <c-l> <Plug>NetrwRefresh
+   endif
+   let mapsafepath     = escape(s:path, s:netrw_map_escape)
+   let mapsafeusermach = escape(s:user.s:machine, s:netrw_map_escape)
+   nnoremap <buffer> <silent> <Plug>NetrwRefresh		:call <SID>NetrwRefresh(0,<SID>NetrwBrowseChgDir(0,'./'))<cr>
+   if g:netrw_mousemaps == 1
+    nnoremap <buffer> <silent> <leftmouse>   <leftmouse>:call <SID>NetrwLeftmouse(0)<cr>
+    nnoremap <buffer> <silent> <middlemouse> <leftmouse>:call <SID>NetrwPrevWinOpen(0)<cr>
+    nnoremap <buffer> <silent> <s-leftmouse> <leftmouse>:call <SID>NetrwMarkFile(0,<SID>NetrwGetWord())<cr>
+    exe 'nnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
+    exe 'vnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
+   endif
+   exe 'nnoremap <buffer> <silent> <del>	:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
+   exe 'vnoremap <buffer> <silent> <del>	:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
+   exe 'nnoremap <buffer> <silent> d	:call <SID>NetrwMakeDir("'.mapsafeusermach.'")<cr>'
+   exe 'nnoremap <buffer> <silent> D	:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
+   exe 'vnoremap <buffer> <silent> D	:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
+   exe 'nnoremap <buffer> <silent> R	:call <SID>NetrwRemoteRename("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
+   exe 'vnoremap <buffer> <silent> R	:call <SID>NetrwRemoteRename("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
    nnoremap <buffer> <F1>			:he netrw-browse-cmds<cr>
   endif
+  call s:SetRexDir(a:islocal,b:netrw_curdir)
 "  call Dret("s:BrowserMaps")
 endfun
 
 " ---------------------------------------------------------------------
-" s: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, USEPORT HOSTNAME, that needs to be substituted
-"  with the requested remote hostname first.
-fun! s:NetBrowse(islocal,dirname)
-  if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif
-"  call Dfunc("NetBrowse(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".w:netrw_liststyle." ".g:loaded_netrw." buf#".bufnr("%")."<".bufname("%").">")
-"  call Dredir("ls!")
-
-  if exists("s:netrw_skipbrowse")
-   unlet s:netrw_skipbrowse
-"   call Dret("NetBrowse : s:netrw_skipbrowse=".s:netrw_skipbrowse)
-   return
-  endif
-
-  call s:NetOptionSave()
-
-  if a:islocal && exists("w:netrw_acdkeep") && w:netrw_acdkeep
-"   call Decho("handle w:netrw_acdkeep:")
-"   call Decho("cd ".escape(a:dirname,s:netrw_cd_escape)." (due to 'acd')")
-   exe 'cd '.escape(a:dirname,s:netrw_cd_escape)
-"   call Decho("getcwd<".getcwd().">")
-
-  elseif !a:islocal && a:dirname !~ '[\/]$' && a:dirname !~ '^"'
-   " looks like a regular file, attempt transfer
-"   call Decho("attempt transfer as regular file<".a:dirname.">")
-
-   " remove any filetype indicator from end of dirname, except for the {{{3
-   " "this is a directory" indicator (/).
-   " There shouldn't be one of those here, anyway.
-   let path= substitute(a:dirname,'[*=@|]\r\=$','','e')
-"   call Decho("new path<".path.">")
-   call s:RemotePathAnalysis(a:dirname)
-
-   " remote-read the requested file into current buffer {{{3
-   mark '
-   call s:NetrwEnew(a:dirname)
-   let b:netrw_curdir= a:dirname
-   call s:NetrwSafeOptions()
-   setlocal ma noro
-"   call Decho("exe silent! keepalt file ".s:method."://".s:user.s:machine."/".escape(s:path,s:netrw_cd_escape)." (bt=".&bt.")")
-   exe "silent! keepalt file ".s:method."://".s:user.s:machine."/".escape(s:path,s:netrw_cd_escape)
-   exe "silent keepalt doau BufReadPre ".s:fname
-   silent call netrw#NetRead(2,s:method."://".s:user.s:machine."/".s:path)
-   exe "silent keepalt doau BufReadPost ".s:fname
-
-   " save certain window-oriented variables into buffer-oriented variables {{{3
-   call s:SetBufWinVars()
-   call s:NetOptionRestore()
-   setlocal nomod nowrap
-
-"   call Dret("NetBrowse : file<".s:fname.">")
-   return
-  endif
-
-  " use buffer-oriented WinVars if buffer ones exist but window ones don't {{{3
-  call s:UseBufWinVars()
-
-  " set up some variables {{{3
-  let b:netrw_browser_active = 1
-  let dirname                = a:dirname
-  let s:last_sort_by         = g:netrw_sort_by
+" s:ExplorePatHls: converts an Explore pattern into a regular expression search pattern {{{2
+fun! s:ExplorePatHls(pattern)
+"  call Dfunc("s:ExplorePatHls(pattern<".a:pattern.">)")
+  let repat= substitute(a:pattern,'^**/\{1,2}','','')
+"  call Decho("repat<".repat.">")
+  let repat= escape(repat,'][.\')
+"  call Decho("repat<".repat.">")
+  let repat= '\<'.substitute(repat,'\*','\\(\\S\\+ \\)*\\S\\+','g').'\>'
+"  call Dret("s:ExplorePatHls repat<".repat.">")
+  return repat
+endfun
 
-  call s:NetMenu(1)                      " set up menu {{{3
-  if s:NetGetBuffer(a:islocal,dirname)   " set up buffer {{{3
-"   call Dret("NetBrowse : re-using buffer")
-   return
-  endif
+" ---------------------------------------------------------------------
+"  s:NetrwBookmarkDir: {{{2
+"    0: (user: <mb>)   bookmark current directory
+"    1: (user: <gb>)   change to the bookmarked directory
+"    2: (user: <qb>)   list bookmarks
+"    3: (browsing)     record current directory history
+"    4: (user: <u>)    go up   (previous) bookmark
+"    5: (user: <U>)    go down (next)     bookmark
+"    6: (user: <mB>)   delete bookmark
+fun! s:NetrwBookmarkDir(chg,curdir)
+"  call Dfunc("NetrwBookmarkDir(chg=".a:chg." curdir<".a:curdir.">) cnt=".v:count." bookmarkcnt=".g:NETRW_BOOKMARKMAX." histcnt=".g:NETRW_DIRHIST_CNT." bookmax=".g:NETRW_BOOKMARKMAX." histmax=".g:netrw_dirhistmax)
 
-  " set b:netrw_curdir to the new directory name {{{3
-"  call Decho("set b:netrw_curdir to the new directory name:")
-   let b:netrw_curdir= dirname
-  if b:netrw_curdir =~ '[/\\]$'
-   let b:netrw_curdir= substitute(b:netrw_curdir,'[/\\]$','','e')
-  endif
-  if b:netrw_curdir == ''
-   if has("amiga")
-    " On the Amiga, the empty string connotes the current directory
-    let b:netrw_curdir= getcwd()
+  if a:chg == 0
+   " bookmark the current directory
+"   call Decho("(user: <b>) bookmark the current directory")
+   if v:count > 0
+    " handle bookmark# specified via the count
+    let g:NETRW_BOOKMARKDIR_{v:count}= a:curdir
+    if !exists("g:NETRW_BOOKMARKMAX")
+     let g:NETRW_BOOKMARKMAX= v:count
+    elseif v:count > g:NETRW_BOOKMARKMAX
+     let g:NETRW_BOOKMARKMAX= v:count
+    endif
    else
-    " under unix, when the root directory is encountered, the result
-    " from the preceding substitute is an empty string.
-    let b:netrw_curdir= '/'
+    " handle no count specified
+    let g:NETRW_BOOKMARKMAX                       = g:NETRW_BOOKMARKMAX + 1
+    let g:NETRW_BOOKMARKDIR_{g:NETRW_BOOKMARKMAX} = a:curdir
    endif
-  endif
-  if !a:islocal && b:netrw_curdir !~ '/$'
-   let b:netrw_curdir= b:netrw_curdir.'/'
-  endif
-"  call Decho("b:netrw_curdir<".b:netrw_curdir.">")
+   echo "bookmarked the current directory"
 
-  " ------------
-  " (local only) {{{3
-  " ------------
-  if a:islocal
-"   call Decho("local only:")
+  elseif a:chg == 1
+   " change to the bookmarked directory
+"   call Decho("(user: <B>) change to the bookmarked directory")
+   if exists("g:NETRW_BOOKMARKDIR_{v:count}")
+    exe "e ".fnameescape(g:NETRW_BOOKMARKDIR_{v:count})
+   else
+    echomsg "Sorry, bookmark#".v:count." doesn't exist!"
+   endif
 
-   " Set up ShellCmdPost handling.  Append current buffer to browselist
+  elseif a:chg == 2
+"   redraw!
+   let didwork= 0
+   " list user's bookmarks
+"   call Decho("(user: <q>) list user's bookmarks")
+   if exists("g:NETRW_BOOKMARKMAX")
+"    call Decho("list bookmarks [0,".g:NETRW_BOOKMARKMAX."]")
+    let cnt= 0
+    while cnt <= g:NETRW_BOOKMARKMAX
+     if exists("g:NETRW_BOOKMARKDIR_{cnt}")
+"      call Decho("Netrw Bookmark#".cnt.": ".g:NETRW_BOOKMARKDIR_{cnt})
+      echo "Netrw Bookmark#".cnt.": ".g:NETRW_BOOKMARKDIR_{cnt}
+      let didwork= 1
+     endif
+     let cnt= cnt + 1
+    endwhile
+   endif
+
+   " list directory history
+   let cnt     = g:NETRW_DIRHIST_CNT
+   let first   = 1
+   let histcnt = 0
+   while ( first || cnt != g:NETRW_DIRHIST_CNT )
+"    call Decho("first=".first." cnt=".cnt." dirhist_cnt=".g:NETRW_DIRHIST_CNT)
+    let histcnt= histcnt + 1
+    if exists("g:NETRW_DIRHIST_{cnt}")
+"     call Decho("Netrw  History#".histcnt.": ".g:NETRW_DIRHIST_{cnt})
+     echo "Netrw  History#".histcnt.": ".g:NETRW_DIRHIST_{cnt}
+     let didwork= 1
+    endif
+    let first = 0
+    let cnt   = ( cnt - 1 ) % g:netrw_dirhistmax
+    if cnt < 0
+     let cnt= cnt + g:netrw_dirhistmax
+    endif
+   endwhile
+   if didwork
+    call inputsave()|call input("Press <cr> to continue")|call inputrestore()
+   endif
+
+  elseif a:chg == 3
+   " saves most recently visited directories (when they differ)
+"   call Decho("(browsing) record curdir history")
+   if !exists("g:NETRW_DIRHIST_0") || g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT} != a:curdir
+    let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT + 1 ) % g:netrw_dirhistmax
+"    let g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}= substitute(a:curdir,'[/\\]$','','e')
+    let g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}= a:curdir
+"    call Decho("save dirhist#".g:NETRW_DIRHIST_CNT."<".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}.">")
+   endif
+
+  elseif a:chg == 4
+   " u: change to the previous directory stored on the history list
+"   call Decho("(user: <u>) chg to prev dir from history")
+   let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT - 1 ) % g:netrw_dirhistmax
+   if g:NETRW_DIRHIST_CNT < 0
+    let g:NETRW_DIRHIST_CNT= g:NETRW_DIRHIST_CNT + g:netrw_dirhistmax
+   endif
+   if exists("g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}")
+"    call Decho("changedir u#".g:NETRW_DIRHIST_CNT."<".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}.">")
+    if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")
+     setlocal ma noro
+"     call Decho("setlocal ma noro")
+     %d
+     setlocal nomod
+"     call Decho("setlocal nomod")
+    endif
+"    call Decho("exe e! ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT})
+    exe "e! ".fnameescape(g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT})
+   else
+    let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT + 1 ) % g:netrw_dirhistmax
+    echo "Sorry, no predecessor directory exists yet"
+   endif
+
+  elseif a:chg == 5
+   " U: change to the subsequent directory stored on the history list
+"   call Decho("(user: <U>) chg to next dir from history")
+   let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT + 1 ) % g:netrw_dirhistmax
+   if exists("g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}")
+"    call Decho("changedir U#".g:NETRW_DIRHIST_CNT."<".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}.">")
+    if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")
+     setlocal ma noro
+"     call Decho("setlocal ma noro")
+     %d
+"     call Decho("removed all lines from buffer (%d)")
+     setlocal nomod
+"     call Decho("setlocal nomod")
+    endif
+"    call Decho("exe e! ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT})
+    exe "e! ".fnameescape(g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT})
+   else
+    let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT - 1 ) % g:netrw_dirhistmax
+    if g:NETRW_DIRHIST_CNT < 0
+     let g:NETRW_DIRHIST_CNT= g:NETRW_DIRHIST_CNT + g:netrw_dirhistmax
+    endif
+    echo "Sorry, no successor directory exists yet"
+   endif
+
+  elseif a:chg == 6
+   if v:count > 0 && v:count == g:NETRW_BOOKMARKMAX
+    " delete the v:count'th bookmark
+"    call Decho("delete bookmark#".v:count."<".g:NETRW_BOOKMARKDIR_{g:NETRW_BOOKMARKMAX}.">")
+    unlet g:NETRW_BOOKMARKDIR_{g:NETRW_BOOKMARKMAX}
+    let g:NETRW_BOOKMARKMAX= g:NETRW_BOOKMARKMAX - 1
+
+   elseif v:count > 0
+"    call Decho("delete by shifting bookmark#".v:count."<".g:NETRW_BOOKMARKDIR_{v:count}.">")
+    let cnt= v:count
+    while cnt < g:NETRW_BOOKMARKMAX
+     let g:NETRW_BOOKMARKDIR_{cnt} = g:NETRW_BOOKMARKDIR_{(cnt+1)}
+     let cnt                       = cnt + 1
+    endwhile
+    unlet g:NETRW_BOOKMARKDIR_{g:NETRW_BOOKMARKMAX}
+    let g:NETRW_BOOKMARKMAX= g:NETRW_BOOKMARKMAX - 1
+
+   elseif exists("b:netrw_curdir")
+    " look for current directory amongst the bookmarks and remove that bookmark
+"    call Decho("search for bookmark<".b:netrw_curdir.">")
+    let cnt= 1
+    while cnt <= g:NETRW_BOOKMARKMAX
+"     call Decho("checking: g:NETRW_BOOKMARKDIR_".cnt."<".g:NETRW_BOOKMARKDIR_{cnt}.">")
+     if g:NETRW_BOOKMARKDIR_{cnt} == b:netrw_curdir
+      if cnt < g:NETRW_BOOKMARKMAX
+"       call Decho("delete bookmark#".cnt."<".b:netrw_curdir.">")
+       while cnt < g:NETRW_BOOKMARMAX
+        let g:NETRW_BOOKMARKDIR_{cnt} = g:NETRW_BOOKMARKDIR_{(cnt+1)}
+        let cnt                       = cnt + 1
+       endwhile
+      endif
+      unlet g:NETRW_BOOKMARKDIR_{g:NETRW_BOOKMARKMAX}
+      let g:NETRW_BOOKMARKMAX= g:NETRW_BOOKMARKMAX - 1
+     endif
+     let cnt= cnt + 1
+    endwhile
+   endif
+
+  endif
+  call s:NetrwBookmarkMenu()
+"  call Dret("NetrwBookmarkDir")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwBrowse: This function uses the command in g:netrw_list_cmd to provide a {{{2
+"  list of the contents of a local or remote directory.  It is assumed that the
+"  g:netrw_list_cmd has a string, USEPORT HOSTNAME, that needs to be substituted
+"  with the requested remote hostname first.
+fun! s:NetrwBrowse(islocal,dirname)
+  if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif
+"  call Dfunc("s:NetrwBrowse(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".w:netrw_liststyle." ".g:loaded_netrw." buf#".bufnr("%")."<".bufname("%").">")
+"  call Decho("tab#".tabpagenr()." win#".winnr())
+"  call Dredir("ls!")
+
+  if exists("s:netrw_skipbrowse")
+   unlet s:netrw_skipbrowse
+"   call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
+"   call Dret("s:NetrwBrowse : s:netrw_skipbrowse=".s:netrw_skipbrowse)
+   return
+  endif
+  if !exists("*shellescape")
+   call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing shellescape()",69)
+"   call Dret("s:NetrwBrowse : missing shellescape()")
+   return
+  endif
+  if !exists("*fnameescape")
+   call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing fnameescape()",70)
+"   call Dret("s:NetrwBrowse : missing fnameescape()")
+   return
+  endif
+
+  call s:NetrwOptionSave("w:")
+  call s:NetrwSafeOptions()
+
+  " re-instate any marked files
+  if exists("s:netrwmarkfilelist_{bufnr('%')}")
+"   call Decho("clearing marked files")
+   exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/"
+  endif
+
+  if a:islocal && exists("w:netrw_acdkeep") && w:netrw_acdkeep
+"   call Decho("handle w:netrw_acdkeep:")
+"   call Decho("keepjumps lcd ".fnameescape(a:dirname)." (due to w:netrw_acdkeep=".w:netrw_acdkeep." - acd=".&acd.")")
+   exe 'keepjumps lcd '.fnameescape(a:dirname)
+"   call Decho("getcwd<".getcwd().">")
+
+  elseif !a:islocal && a:dirname !~ '[\/]$' && a:dirname !~ '^"'
+   " looks like a regular file, attempt transfer
+"   call Decho("attempt transfer as regular file<".a:dirname.">")
+
+   " remove any filetype indicator from end of dirname, except for the {{{3
+   " "this is a directory" indicator (/).
+   " There shouldn't be one of those here, anyway.
+   let path= substitute(a:dirname,'[*=@|]\r\=$','','e')
+"   call Decho("new path<".path.">")
+   call s:RemotePathAnalysis(a:dirname)
+
+   " remote-read the requested file into current buffer {{{3
+   mark '
+   call s:NetrwEnew(a:dirname)
+   setlocal ma noro
+"   call Decho("setlocal ma noro")
+   let b:netrw_curdir= a:dirname
+"   call Decho("exe silent! keepalt file ".s:method."://".s:user.s:machine."/".fnameescape(s:path)." (bt=".&bt.")")
+   exe "silent! keepalt file ".fnameescape(s:method."://".s:user.s:machine."/".s:path)
+   exe "silent keepalt doau BufReadPre ".fnameescape(s:fname)
+   silent call netrw#NetRead(2,s:method."://".s:user.s:machine."/".s:path)
+   if s:path !~ '.tar.bz2$' && s:path !~ '.tar.gz'
+    " netrw.vim and tar.vim have already handled decompression of the tarball; avoiding gzip.vim error
+    exe "silent keepalt doau BufReadPost ".fnameescape(s:fname)
+   endif
+
+   " save certain window-oriented variables into buffer-oriented variables {{{3
+   call s:SetBufWinVars()
+   call s:NetrwOptionRestore("w:")
+   setlocal ma nomod
+
+"   call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
+"   call Dret("s:NetrwBrowse : file<".s:fname.">")
+   return
+  endif
+
+  " use buffer-oriented WinVars if buffer ones exist but window ones don't {{{3
+  call s:UseBufWinVars()
+
+  " set up some variables {{{3
+  let b:netrw_browser_active = 1
+  let dirname                = a:dirname
+  let s:last_sort_by         = g:netrw_sort_by
+
+  " set up menu {{{3
+  call s:NetrwMenu(1)
+
+  " set up buffer {{{3
+  let reusing= s:NetrwGetBuffer(a:islocal,dirname)
+  " maintain markfile highlighting
+  if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != ""
+"   call Decho("bufnr(%)=".bufnr('%'))
+"   call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/")
+   exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/"
+  else
+"   call Decho("2match none")
+   2match none
+  endif
+  if reusing
+   call s:NetrwOptionRestore("w:")
+   setlocal noma nomod nowrap
+"   call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
+"   call Dret("s:NetrwBrowse : re-using buffer")
+   return
+  endif
+
+  " set b:netrw_curdir to the new directory name {{{3
+"  call Decho("set b:netrw_curdir to the new directory name:")
+   let b:netrw_curdir= dirname
+  if b:netrw_curdir =~ '[/\\]$'
+   let b:netrw_curdir= substitute(b:netrw_curdir,'[/\\]$','','e')
+  endif
+  if b:netrw_curdir == ''
+   if has("amiga")
+    " On the Amiga, the empty string connotes the current directory
+    let b:netrw_curdir= getcwd()
+   else
+    " under unix, when the root directory is encountered, the result
+    " from the preceding substitute is an empty string.
+    let b:netrw_curdir= '/'
+   endif
+  endif
+  if !a:islocal && b:netrw_curdir !~ '/$'
+   let b:netrw_curdir= b:netrw_curdir.'/'
+  endif
+"  call Decho("b:netrw_curdir<".b:netrw_curdir.">")
+
+  " ------------
+  " (local only) {{{3
+  " ------------
+  if a:islocal
+"   call Decho("local only:")
+
+   " Set up ShellCmdPost handling.  Append current buffer to browselist
    call s:LocalFastBrowser()
 
   " handle g:netrw_keepdir: set vim's current directory to netrw's notion of the current directory {{{3
    if !g:netrw_keepdir
-"    call Decho("handle keepdir: (g:netrw_keepdir=".g:netrw_keepdir.")")
-"    call Decho('exe cd '.escape(b:netrw_curdir,s:netrw_cd_escape))
-    try
-     exe 'cd '.escape(b:netrw_curdir,s:netrw_cd_escape)
-    catch /^Vim\%((\a\+)\)\=:E472/
-     call netrw#ErrorMsg(s:ERROR,"unable to change directory to <".b:netrw_curdir."> (permissions?)",33)
-     if exists("w:netrw_prvdir")
-      let b:netrw_curdir= w:netrw_prvdir
-     else
-      call s:NetOptionRestore()
-      let b:netrw_curdir= dirname
-"      call Dret("NetBrowse : reusing buffer#".(exists("bufnum")? bufnum : 'N/A')."<".dirname."> getcwd<".getcwd().">")
-      return
-     endif
-    endtry
+"    call Decho("handle g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd)
+"    call Decho("l:acd".(exists("&l:acd")? "=".&l:acd : " doesn't exist"))
+    if !exists("&l:acd") || !&l:acd
+"     call Decho('exe keepjumps lcd '.fnameescape(b:netrw_curdir))
+     try
+      exe 'keepjumps lcd '.fnameescape(b:netrw_curdir)
+     catch /^Vim\%((\a\+)\)\=:E472/
+      call netrw#ErrorMsg(s:ERROR,"unable to change directory to <".b:netrw_curdir."> (permissions?)",61)
+      if exists("w:netrw_prvdir")
+       let b:netrw_curdir= w:netrw_prvdir
+      else
+       call s:NetrwOptionRestore("w:")
+       setlocal noma nomod nowrap
+       let b:netrw_curdir= dirname
+"       call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
+"       call Dret("s:NetrwBrowse : reusing buffer#".(exists("bufnum")? bufnum : 'N/A')."<".dirname."> getcwd<".getcwd().">")
+       return
+      endif
+     endtry
+    endif
    endif
 
   " --------------------------------
@@ -1792,9 +2163,9 @@
 
    " analyze a:dirname and g:netrw_list_cmd {{{4
 "   call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist")."> a:dirname<".a:dirname.">")
-   if a:dirname == "NetrwTreeListing"
+   if a:dirname =~ "^NetrwTreeListing\>"
     let dirname= b:netrw_curdir
-"    call Decho("(dirname was NetrwTreeListing) dirname<".dirname.">")
+"    call Decho("(dirname was ".a:dirname.") dirname<".dirname.">")
    elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")
     let dirname= substitute(b:netrw_curdir,'\\','/','g')
     if dirname !~ '/$'
@@ -1812,8 +2183,10 @@
     if !exists("g:netrw_quiet")
      call netrw#ErrorMsg(s:ERROR,"netrw doesn't understand your dirname<".dirname.">",20)
     endif
-     call s:NetOptionRestore()
-"    call Dret("NetBrowse : badly formatted dirname<".dirname.">")
+    call s:NetrwOptionRestore("w:")
+    setlocal noma nomod nowrap
+"    call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
+"    call Dret("s:NetrwBrowse : badly formatted dirname<".dirname.">")
     return
    endif
    let b:netrw_curdir= dirname
@@ -1823,47 +2196,116 @@
   " -----------------------
   " Directory Listing: {{{3
   " -----------------------
-  setlocal noro ma
   call s:BrowserMaps(a:islocal)
   call s:PerformListing(a:islocal)
 
-"  call Dret("NetBrowse")
+"  call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
+"  call Dret("s:NetrwBrowse : did PerformListing")
   return
 endfun
 
 " ---------------------------------------------------------------------
-" s:NetGetBuffer: {{{2
+" s:NetrwFileInfo: supports qf (query for file information) {{{2
+fun! s:NetrwFileInfo(islocal,fname)
+"  call Dfunc("s:NetrwFileInfo(islocal=".a:islocal." fname<".a:fname.">)")
+  if a:islocal
+   if (has("unix") || has("macunix")) && executable("/bin/ls")
+    if exists("b:netrw_curdir")
+"     call Decho('using ls with b:netrw_curdir<'.b:netrw_curdir.'>')
+     if b:netrw_curdir =~ '/$'
+      echo system("/bin/ls -lsad ".shellescape(b:netrw_curdir.a:fname))
+     else
+      echo system("/bin/ls -lsad ".shellescape(b:netrw_curdir."/".a:fname))
+     endif
+    else
+"     call Decho('using ls '.a:fname." using cwd<".getcwd().">")
+     echo system("/bin/ls -lsad ".shellescape(a:fname))
+    endif
+   else
+    " use vim functions to return information about file below cursor
+"    call Decho("using vim functions to query for file info")
+    if !isdirectory(a:fname) && !filereadable(a:fname) && a:fname =~ '[*@/]'
+     let fname= substitute(a:fname,".$","","")
+    else
+     let fname= a:fname
+    endif
+    let t  = getftime(fname)
+    let sz = getfsize(fname)
+    echo a:fname.":  ".sz."  ".strftime(g:netrw_timefmt,getftime(fname))
+"    call Decho(fname.":  ".sz."  ".strftime(g:netrw_timefmt,getftime(fname)))
+   endif
+  else
+   echo "sorry, \"qf\" not supported yet for remote files"
+  endif
+"  call Dret("s:NetrwFileInfo")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwGetBuffer: {{{2
 "   returns 0=cleared buffer
 "           1=re-used buffer
-fun! s:NetGetBuffer(islocal,dirname)
-"  call Dfunc("s:NetGetBuffer(islocal=".a:islocal." dirname<".a:dirname.">)")
+fun! s:NetrwGetBuffer(islocal,dirname)
+"  call Dfunc("s:NetrwGetBuffer(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".g:netrw_liststyle)
+  let dirname= a:dirname
 
   " re-use buffer if possible {{{3
+"  call Decho("--re-use a buffer if possible--")
   if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
    " find NetrwTreeList buffer if there is one
-   let dirname= "NetrwTreeListing"
-   let bufnum = bufnr('\<NetrwTreeListing\>')
-   if bufnum != -1
-"    call Dret("s:NetGetBuffer : bufnum#".bufnum."<NetrwTreeListing>")
+   if exists("w:netrw_treebufnr") && w:netrw_treebufnr > 0
+"    call Decho("  re-use w:netrw_treebufnr=".w:netrw_treebufnr)
+    let eikeep= &ei
+    set ei=all
+    exe "b ".w:netrw_treebufnr
+    let &ei= eikeep
+"    call Dret("s:NetrwGetBuffer : bufnum#".bufnum."<NetrwTreeListing>")
     return
    endif
+   let bufnum= -1
+"   call Decho("  liststyle=TREE but w:netrw_treebufnr doesn't exist")
 
   else
    " find buffer number of buffer named precisely the same as dirname {{{3
+"   call Decho("--find buffer numnber of buffer named precisely the same as dirname--")
 "   call Dredir("ls!")
-   let dirname= a:dirname
-"   call Decho("find buffer<".dirname.">'s number ")
-   let bufnum= bufnr(escape(dirname,'\'))
-"   call Decho("findbuf1: bufnum=bufnr('".escape(dirname,'\')."')=".bufnum." (initial)")
-   let ibuf= 1
-   if bufnum > 0 && bufname(bufnum) != dirname
+
+   " get dirname and associated buffer number
+   let bufnum  = bufnr(escape(dirname,'\'))
+"   call Decho("  find buffer<".dirname.">'s number ")
+"   call Decho("  bufnr(dirname<".escape(dirname,'\').">)=".bufnum)
+
+   if bufnum < 0 && dirname !~ '/$'
+    " trying appending a trailing /
+"    call Decho("  try appending a trailing / to dirname<".dirname.">")
+    let bufnum= bufnr(escape(dirname.'/','\'))
+    if bufnum > 0
+     let dirname= dirname.'/'
+    endif
+   endif
+
+   if bufnum < 0 && dirname =~ '/$'
+    " trying removing a trailing /
+"    call Decho("  try removing a trailing / from dirname<".dirname.">")
+    let bufnum= bufnr(escape(substitute(dirname,'/$','',''),'\'))
+    if bufnum > 0
+     let dirname= substitute(dirname,'/$','','')
+    endif
+   endif
+
+"   call Decho("  findbuf1: bufnum=bufnr('".dirname."')=".bufnum." bufname(".bufnum.")<".bufname(bufnum)."> (initial)")
+   " note: !~ was used just below, but that means using ../ to go back would match (ie. abc/def/  and abc/ matches)
+   if bufnum > 0 && bufname(bufnum) != dirname && bufname(bufnum) != '.'
+    " handle approximate matches
+"    call Decho("  handling approx match: bufnum#%d<".bufname(bufnum)."> approx= dirname<".dirname.">")
+    let ibuf    = 1
     let buflast = bufnr("$")
-"    call Decho("findbuf2: buflast=".buflast)
+"    call Decho("  findbuf2: buflast=".buflast)
     while ibuf <= buflast
-     let bname= bufname(ibuf)
-"     call Decho("findbuf3: dirname<".dirname."> bufname(".ibuf.")<".bname.">")
-     if bname != '' && bname !~ '/' && dirname =~ '/'.bname.'$' | break | endif
-     if bname =~ '^'.dirname.'\=$' | break | endif
+     let bname= substitute(bufname(ibuf),'\\','/','g')
+"     call Decho("  findbuf3: dirname<".dirname."> bufname(".ibuf.")<".bname.">")
+     if bname != '' && bname !~ '/' && dirname =~ '/'.bname.'/\=$' | break | endif
+     if bname   =~ '^'.dirname.'/\=$' | break | endif
+     if dirname =~ '^'.bname.'/$'     | break | endif
      let ibuf= ibuf + 1
     endwhile
     if ibuf > buflast
@@ -1871,54 +2313,71 @@
     else
      let bufnum= ibuf
     endif
-"    call Decho("findbuf4: bufnum=".bufnum)
+"    call Decho("  findbuf4: bufnum=".bufnum." (ibuf=".ibuf." buflast=".buflast.")")
    endif
   endif
 
   " get enew buffer and name it -or- re-use buffer {{{3
+"  call Decho("--get enew buffer and name it OR re-use buffer-- (bufnum=".bufnum.")")
   mark '
   if bufnum < 0 || !bufexists(bufnum)
-"   call Decho("get enew buffer")
    call s:NetrwEnew(dirname)
-   call s:NetrwSafeOptions()
+"   call Decho("  got enew buffer#".bufnr("%")." (altbuf<".expand("#").">)")
    " name the buffer
    if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
-"    call Decho('silent! keepalt file NetrwTreeListing')
-    silent! keepalt file NetrwTreeListing
+    " Got enew buffer; transform into a NetrwTreeListing
+"    call Decho("--transform enew buffer#".bufnr("%")." into a NetrwTreeListing --")
+    if !exists("s:netrw_treelistnum")
+     let s:netrw_treelistnum= 1
+    else
+     let s:netrw_treelistnum= s:netrw_treelistnum + 1
+    endif
+    let w:netrw_treebufnr= bufnr("%")
+"    call Decho("  exe silent! keepalt file NetrwTreeListing ".s:netrw_treelistnum)
+    exe 'silent! keepalt file NetrwTreeListing\ '.fnameescape(s:netrw_treelistnum)
+    nnoremap <silent> <buffer> [	:silent call <SID>TreeListMove('[')<cr>
+    nnoremap <silent> <buffer> ]	:silent call <SID>TreeListMove(']')<cr>
+    nnoremap <silent> <buffer> [[       :silent call <SID>TreeListMove('[')<cr>
+    nnoremap <silent> <buffer> ]]       :silent call <SID>TreeListMove(']')<cr>
+"    call Decho("  tree listing#".s:netrw_treelistnum." bufnr=".w:netrw_treebufnr)
    else
-"    call Decho('exe silent! keepalt file '.escape(dirname,s:netrw_cd_escape))
 "    let v:errmsg= "" " Decho
-    let escdirname= escape(dirname,s:netrw_cd_escape)
+    let escdirname= fnameescape(dirname)
+"    call Decho("  errmsg<".v:errmsg."> bufnr(".escdirname.")=".bufnr(escdirname)."<".bufname(bufnr(escdirname)).">")
+"    call Decho('  exe silent! keepalt file '.escdirname)
     exe 'silent! keepalt file '.escdirname
-"    call Decho("errmsg<".v:errmsg."> bufnr(".escdirname.")=".bufnr(escdirname)."<".bufname(bufnr(escdirname)).">")
+"    call Decho("  errmsg<".v:errmsg."> bufnr(".escdirname.")=".bufnr(escdirname)."<".bufname(bufnr(escdirname)).">")
    endif
-"   call Decho("named enew buffer#".bufnr("%")."<".bufname("%").">")
+"   call Decho("  named enew buffer#".bufnr("%")."<".bufname("%").">")
 
   else " Re-use the buffer
-
-"   call Decho("re-use buffer:")
+"   call Decho("--re-use buffer#".bufnum.": --")
    let eikeep= &ei
    set ei=all
    if getline(2) =~ '^" Netrw Directory Listing'
-"    call Decho("re-use buffer#".bufnum."<".((bufnum > 0)? bufname(bufnum) : "")."> using:  keepalt b ".bufnum)
+"    call Decho("  re-use buffer#".bufnum."<".((bufnum > 0)? bufname(bufnum) : "")."> using:  keepalt b ".bufnum)
     exe "keepalt b ".bufnum
    else
-"    call Decho("reusing buffer#".bufnum."<".((bufnum > 0)? bufname(bufnum) : "")."> using:  b ".bufnum)
+"    call Decho("  reusing buffer#".bufnum."<".((bufnum > 0)? bufname(bufnum) : "")."> using:  b ".bufnum)
     exe "b ".bufnum
    endif
+   if bufname("%") == '.'
+    exe "silent! keepalt file ".fnameescape(getcwd())
+   endif
    let &ei= eikeep
    if line("$") <= 1
     call s:NetrwListSettings(a:islocal)
-"    call Dret("s:NetGetBuffer 0 : re-using buffer#".bufnr("%").", but its empty, so refresh it")
+"    call Dret("s:NetrwGetBuffer 0 : re-using buffer#".bufnr("%").", but its empty, so refresh it")
     return 0
    elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
-"    call Decho("clear buffer<".expand("%")."> with :%d")
+"    call Decho("--re-use tree listing--")
+"    call Decho("  clear buffer<".expand("%")."> with :%d")
     silent %d
     call s:NetrwListSettings(a:islocal)
-"    call Dret("s:NetGetBuffer 0 : re-using buffer#".bufnr("%").", but treelist mode always needs a refresh")
+"    call Dret("s:NetrwGetBuffer 0 : re-using buffer#".bufnr("%").", but treelist mode always needs a refresh")
     return 0
    else
-"    call Dret("s:NetGetBuffer 1 : buf#".bufnr("%"))
+"    call Dret("s:NetrwGetBuffer 1 : buf#".bufnr("%"))
     return 1
    endif
   endif
@@ -1928,1348 +2387,3049 @@
   "  slow   0         D      D      Deleting a buffer implies it will not be re-used (slow)
   "  med    1         D      H
   "  fast   2         H      H
+"  call Decho("--do netrw settings: make this buffer not-a-file, modifiable, not line-numbered, etc--")
   let fname= expand("%")
   call s:NetrwListSettings(a:islocal)
-  exe "file ".escape(fname,' ')
+  exe "keepalt file ".fnameescape(fname)
 
   " delete all lines from buffer {{{3
-"  call Decho("clear buffer<".expand("%")."> with :%d")
+"  call Decho("--delete all lines from buffer--")
+"  call Decho("  clear buffer<".expand("%")."> with :%d")
   keepalt silent! %d
 
-"  call Dret("s:NetGetBuffer 0 : buf#".bufnr("%"))
+"  call Dret("s:NetrwGetBuffer 0 : buf#".bufnr("%"))
   return 0
 endfun
 
 " ---------------------------------------------------------------------
-" s:NetrwListSettings: {{{2
-fun! s:NetrwListSettings(islocal)
-"  call Dfunc("s:NetrwListSettings(islocal=".a:islocal.")")
-  let fname= bufname("%")
-  setlocal bt=nofile nobl ma nonu nowrap noro
-  exe "file ".escape(fname,' ')
-  if g:netrw_use_noswf
-   setlocal noswf
+" s:NetrwGetcwd: get the current directory. {{{2
+"   Change backslashes to forward slashes, if any.
+"   If doesc is true, escape certain troublesome characters
+fun! s:NetrwGetcwd(doesc)
+"  call Dfunc("NetrwGetcwd(doesc=".a:doesc.")")
+  let curdir= substitute(getcwd(),'\\','/','ge')
+  if curdir !~ '[\/]$'
+   let curdir= curdir.'/'
   endif
-"  call Dredir("ls!")
-"  call Decho("exe setlocal ts=".g:netrw_maxfilenamelen)
-  exe "setlocal ts=".g:netrw_maxfilenamelen
-  if g:netrw_fastbrowse > a:islocal
-   setlocal bh=hide
-  else
-   setlocal bh=delete
+  if a:doesc
+   let curdir= fnameescape(curdir)
   endif
-"  call Dret("s:NetrwListSettings")
+"  call Dret("NetrwGetcwd <".curdir.">")
+  return curdir
 endfun
 
 " ---------------------------------------------------------------------
-" s:PerformListing: {{{2
-fun! s:PerformListing(islocal)
-"  call Dfunc("s:PerformListing(islocal=".a:islocal.") buf(%)=".bufnr("%")."<".bufname("%").">")
-
-"   if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1	" Decho
-"    call Decho("(netrw) Processing your browsing request...")
-"   endif								" Decho
-
-"   call Decho('w:netrw_liststyle='.(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a'))
-   if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict")
-    " force a refresh for tree listings
-"    call Decho("force refresh for treelisting: clear buffer<".expand("%")."> with :%d")
-    setlocal ma noro
-    keepjumps %d
-   endif
+"  s:NetrwGetWord: it gets the directory/file named under the cursor {{{2
+fun! s:NetrwGetWord()
+"  call Dfunc("s:NetrwGetWord() line#".line(".")." liststyle=".g:netrw_liststyle." virtcol=".w:netrw_col)
+  call s:UseBufWinVars()
 
-  " save current directory on directory history list
-  call s:NetBookmarkDir(3,b:netrw_curdir)
+  " insure that w:netrw_liststyle is set up
+  if !exists("w:netrw_liststyle")
+   if exists("g:netrw_liststyle")
+    let w:netrw_liststyle= g:netrw_liststyle
+   else
+    let w:netrw_liststyle= s:THINLIST
+   endif
+"   call Decho("w:netrw_liststyle=".w:netrw_liststyle)
+  endif
 
-  " Set up the banner {{{3
-"  call Decho("set up banner")
-  keepjumps put ='\" ============================================================================'
-  keepjumps put ='\" Netrw Directory Listing                                        (netrw '.g:loaded_netrw.')'
-  keepjumps put ='\"   '.b:netrw_curdir
-  keepjumps 1d
-  let w:netrw_bannercnt= 3
-  exe w:netrw_bannercnt
+  if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt
+   " Active Banner support
+"   call Decho("active banner handling")
+   norm! 0
+   let dirname= "./"
+   let curline= getline('.')
 
-  let sortby= g:netrw_sort_by
-  if g:netrw_sort_direction =~ "^r"
-   let sortby= sortby." reversed"
-  endif
+   if curline =~ '"\s*Sorted by\s'
+    norm s
+    let s:netrw_skipbrowse= 1
+    echo 'Pressing "s" also works'
 
-  " Sorted by... {{{3
-"  call Decho("handle specified sorting: g:netrw_sort_by<".g:netrw_sort_by.">")
-  if g:netrw_sort_by =~ "^n"
-"   call Decho("directories will be sorted by name")
-   " sorted by name
-   keepjumps put ='\"   Sorted by      '.sortby
-   keepjumps put ='\"   Sort sequence: '.g:netrw_sort_sequence
-   let w:netrw_bannercnt= w:netrw_bannercnt + 2
-  else
-"   call Decho("directories will be sorted by size or time")
-   " sorted by size or date
-   keepjumps put ='\"   Sorted by '.sortby
-   let w:netrw_bannercnt= w:netrw_bannercnt + 1
-  endif
-  exe w:netrw_bannercnt
+   elseif curline =~ '"\s*Sort sequence:'
+    let s:netrw_skipbrowse= 1
+    echo 'Press "S" to edit sorting sequence'
 
-  " Hiding...  -or-  Showing... {{{3
-"  call Decho("handle hiding/showing (g:netrw_hide=".g:netrw_list_hide." g:netrw_list_hide<".g:netrw_list_hide.">)")
-  if g:netrw_list_hide != "" && g:netrw_hide
-   if g:netrw_hide == 1
-    keepjumps put ='\"   Hiding:        '.g:netrw_list_hide
-   else
-    keepjumps put ='\"   Showing:       '.g:netrw_list_hide
-   endif
-   let w:netrw_bannercnt= w:netrw_bannercnt + 1
-  endif
-  exe w:netrw_bannercnt
-  keepjumps put ='\"   Quick Help: <F1>:help  -:go up dir  D:delete  R:rename  s:sort-by  x:exec'
-  keepjumps put ='\" ============================================================================'
-  let w:netrw_bannercnt= w:netrw_bannercnt + 2
+   elseif curline =~ '"\s*Quick Help:'
+    norm ?
+    let s:netrw_skipbrowse= 1
+    echo 'Pressing "?" also works'
 
-  " bannercnt should index the line just after the banner
-  let w:netrw_bannercnt= w:netrw_bannercnt + 1
-  exe w:netrw_bannercnt
-"  call Decho("bannercnt=".w:netrw_bannercnt." (should index line just after banner) line($)=".line("$"))
+   elseif curline =~ '"\s*\%(Hiding\|Showing\):'
+    norm a
+    let s:netrw_skipbrowse= 1
+    echo 'Pressing "a" also works'
 
-  " set up syntax highlighting {{{3
-"  call Decho("set up syntax highlighting")
-  if has("syntax")
-   setlocal ft=netrw
-   if !exists("g:syntax_on") || !g:syntax_on
-    setlocal ft=
+   elseif line("$") > w:netrw_bannercnt
+    exe 'silent keepjumps '.w:netrw_bannercnt
    endif
-  endif
 
-  " get list of files
-  if a:islocal
-   call s:LocalListing()
-  else " remote
-   call s:RemoteListing()
-  endif
-"  call Decho("w:netrw_bannercnt=".w:netrw_bannercnt." (banner complete)")
+  elseif w:netrw_liststyle == s:THINLIST
+"   call Decho("thin column handling")
+   norm! 0
+   let dirname= getline('.')
 
-  " manipulate the directory listing (hide, sort) {{{3
-  if line("$") >= w:netrw_bannercnt
-"   call Decho("manipulate directory listing (hide)")
-"   call Decho("g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">")
-   if g:netrw_hide && g:netrw_list_hide != ""
-    call s:NetListHide()
-   endif
-   if line("$") >= w:netrw_bannercnt
-"    call Decho("manipulate directory listing (sort) : g:netrw_sort_by<".g:netrw_sort_by.">")
+  elseif w:netrw_liststyle == s:LONGLIST
+"   call Decho("long column handling")
+   norm! 0
+   let dirname= substitute(getline('.'),'^\(\%(\S\+ \)*\S\+\).\{-}$','\1','e')
 
-    if g:netrw_sort_by =~ "^n"
-     " sort by name
-     call s:SetSort()
+  elseif w:netrw_liststyle == s:TREELIST
+"   call Decho("treelist handling")
+   let dirname= substitute(getline('.'),'^\(| \)*','','e')
 
-     if w:netrw_bannercnt < line("$")
-"      call Decho("g:netrw_sort_direction=".g:netrw_sort_direction." (bannercnt=".w:netrw_bannercnt.")")
-      if g:netrw_sort_direction =~ 'n'
-       " normal direction sorting
-       exe 'silent keepjumps '.w:netrw_bannercnt.',$sort'
-      else
-       " reverse direction sorting
-       exe 'silent keepjumps '.w:netrw_bannercnt.',$sort!'
-      endif
-     endif
-     " remove priority pattern prefix
-"     call Decho("remove priority pattern prefix")
-     exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\d\{3}\///e'
+  else
+"   call Decho("obtain word from wide listing")
+   let dirname= getline('.')
 
-    elseif a:islocal
-     if w:netrw_bannercnt < line("$")
-"      call Decho("g:netrw_sort_direction=".g:netrw_sort_direction)
-      if g:netrw_sort_direction =~ 'n'
-"       call Decho('exe silent keepjumps '.w:netrw_bannercnt.',$sort')
-       exe 'silent keepjumps '.w:netrw_bannercnt.',$sort'
-      else
-"       call Decho('exe silent keepjumps '.w:netrw_bannercnt.',$sort!')
-       exe 'silent keepjumps '.w:netrw_bannercnt.',$sort!'
-      endif
-     endif
-     exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\d\{-}\///e'
-    endif
+   if !exists("b:netrw_cpf")
+    let b:netrw_cpf= 0
+    exe 'silent keepjumps '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif'
+"   call Decho("computed cpf=".b:netrw_cpf)
+   endif
 
-   elseif g:netrw_sort_direction =~ 'r'
-"    call Decho('reverse the sorted listing')
-    exe 'silent keepjumps '.w:netrw_bannercnt.'g/^/m '.w:netrw_bannercnt
+"   call Decho("buf#".bufnr("%")."<".bufname("%").">")
+   let filestart = (w:netrw_col/b:netrw_cpf)*b:netrw_cpf
+"   call Decho("filestart= ([virtcol=".w:netrw_col."]/[b:netrw_cpf=".b:netrw_cpf."])*b:netrw_cpf=".filestart."  bannercnt=".w:netrw_bannercnt)
+"   call Decho("1: dirname<".dirname.">")
+   if filestart == 0
+    norm! 0ma
+   else
+    call cursor(line("."),filestart+1)
+    norm! ma
    endif
+   let rega= @a
+   call cursor(line("."),filestart+b:netrw_cpf+1)
+   norm! "ay`a
+   let dirname = @a
+   let @a      = rega
+"   call Decho("2: dirname<".dirname.">")
+   let dirname= substitute(dirname,'\s\+$','','e')
+"   call Decho("3: dirname<".dirname.">")
   endif
 
-  " convert to wide/tree listing {{{3
-"  call Decho("modify display if wide/tree listing style")
-  call s:NetWideListing()
-  call s:NetTreeListing(b:netrw_curdir)
-
-  if exists("w:netrw_bannercnt") && line("$") > w:netrw_bannercnt
-   " place cursor on the top-left corner of the file listing
-"   call Decho("place cursor on top-left corner of file listing")
-   exe 'silent '.w:netrw_bannercnt
-   norm! 0
-  endif
+  " symlinks are indicated by a trailing "@".  Remove it before further processing.
+  let dirname= substitute(dirname,"@$","","")
 
-  " record previous current directory
-  let w:netrw_prvdir= b:netrw_curdir
-"  call Decho("record netrw_prvdir<".w:netrw_prvdir.">")
+  " executables are indicated by a trailing "*".  Remove it before further processing.
+  let dirname= substitute(dirname,"\*$","","")
 
-  " save certain window-oriented variables into buffer-oriented variables {{{3
-  call s:SetBufWinVars()
-  call s:NetOptionRestore()
+"  call Dret("s:NetrwGetWord <".dirname.">")
+  return dirname
+endfun
 
-  " set display to netrw display settings
-"  call Decho("set display to netrw display settings (noma nomod etc)")
-  setlocal noma nomod nonu nobl nowrap ro
-  if exists("s:treecurpos")
-   call setpos('.',s:treecurpos)
-   unlet s:treecurpos
+" ---------------------------------------------------------------------
+" s:NetrwListSettings: {{{2
+fun! s:NetrwListSettings(islocal)
+"  call Dfunc("s:NetrwListSettings(islocal=".a:islocal.")")
+  let fname= bufname("%")
+  setlocal bt=nofile nobl ma nonu nowrap noro
+"  call Decho("setlocal bt=nofile nobl ma nonu nowrap noro")
+  exe "keepalt file ".fnameescape(fname)
+  if g:netrw_use_noswf
+   setlocal noswf
   endif
-
-"  call Dret("s:PerformListing : curpos<".string(getpos(".")).">")
+"  call Dredir("ls!")
+"  call Decho("exe setlocal ts=".g:netrw_maxfilenamelen)
+  exe "setlocal ts=".g:netrw_maxfilenamelen
+  setlocal isk+=.,~,-
+  if g:netrw_fastbrowse > a:islocal
+   setlocal bh=hide
+  else
+   setlocal bh=delete
+  endif
+"  call Dret("s:NetrwListSettings")
 endfun
 
 " ---------------------------------------------------------------------
-"  s:NetBrowseChgDir: constructs a new directory based on the current {{{2
-"                     directory and a new directory name
-fun! s:NetBrowseChgDir(islocal,newdir,...)
-"  call Dfunc("s:NetBrowseChgDir(islocal=".a:islocal."> newdir<".a:newdir.">) a:0=".a:0." curpos<".string(getpos("."))."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "").">")
+"  s:NetrwListStyle: {{{2
+"  islocal=0: remote browsing
+"         =1: local browsing
+fun! s:NetrwListStyle(islocal)
+"  call Dfunc("NetrwListStyle(islocal=".a:islocal.") w:netrw_liststyle=".w:netrw_liststyle)
+  let fname             = s:NetrwGetWord()
+  if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif
+  let w:netrw_liststyle = (w:netrw_liststyle + 1) % s:MAXLIST
+"  call Decho("fname<".fname.">")
+"  call Decho("chgd w:netrw_liststyle to ".w:netrw_liststyle)
+"  call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist").">")
 
-  if !exists("b:netrw_curdir")
-"   call Decho("(NetBrowseChgDir) b:netrw_curdir doesn't exist!")
-   echoerr "(NetBrowseChgDir) b:netrw_curdir doesn't exist!"
-"   call Dret("s:NetBrowseChgDir")
-   return
-  endif
+  if w:netrw_liststyle == s:THINLIST
+   " use one column listing
+"   call Decho("use one column list")
+   let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge')
+
+  elseif w:netrw_liststyle == s:LONGLIST
+   " use long list
+"   call Decho("use long list")
+   let g:netrw_list_cmd = g:netrw_list_cmd." -l"
 
-  call netrw#NetSavePosn()
-  let nbcd_curpos = getpos('.')
-  let dirname     = substitute(b:netrw_curdir,'\\','/','ge')
-  let newdir      = a:newdir
+  elseif w:netrw_liststyle == s:WIDELIST
+   " give wide list
+"   call Decho("use wide list")
+   let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge')
+
+  elseif w:netrw_liststyle == s:TREELIST
+"   call Decho("use tree list")
+   let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge')
 
-  " set up o/s-dependent directory recognition pattern
-  if has("amiga")
-   let dirpat= '[\/:]$'
   else
-   let dirpat= '[\/]$'
+   call netrw#ErrorMsg(s:WARNING,"bad value for g:netrw_liststyle (=".w:netrw_liststyle.")",46)
+   let g:netrw_liststyle = s:THINLIST
+   let w:netrw_liststyle = g:netrw_liststyle
+   let g:netrw_list_cmd  = substitute(g:netrw_list_cmd,' -l','','ge')
   endif
-"  call Decho("dirname<".dirname.">  dirpat<".dirpat.">")
+  setlocal ma noro
+"  call Decho("setlocal ma noro")
 
-  if dirname !~ dirpat
-   " apparently vim is "recognizing" that it is in a directory and
-   " is removing the trailing "/".  Bad idea, so I have to put it back.
-   let dirname= dirname.'/'
-"   call Decho("adjusting dirname<".dirname.">")
+  " clear buffer - this will cause NetrwBrowse/LocalBrowseCheck to do a refresh
+"  call Decho("clear buffer<".expand("%")."> with :%d")
+  %d
+
+  " refresh the listing
+  let svpos= netrw#NetrwSavePosn()
+  call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+  call netrw#NetrwRestorePosn(svpos)
+
+  " keep cursor on the filename
+  silent keepjumps $
+  let result= search('\%(^\%(|\+\s\)\=\|\s\{2,}\)\zs'.escape(fname,'.\[]*$^').'\%(\s\{2,}\|$\)','bc')
+"  call Decho("search result=".result." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'N/A'))
+  if result <= 0 && exists("w:netrw_bannercnt")
+   exe "keepjumps ".w:netrw_bannercnt
   endif
 
-  if newdir !~ dirpat
-   " handling a file
-"   call Decho('case "handling a file": newdir<'.newdir.'> !~ dirpat<'.dirpat.">")
-   if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") && newdir !~ '^\(/\|\a:\)'
-    let dirname= s:NetTreeDir().newdir
-"    call Decho("tree listing")
-   elseif newdir =~ '^\(/\|\a:\)'
-    let dirname= newdir
-   else
-    let dirname= s:ComposePath(dirname,newdir)
+"  call Dret("NetrwListStyle".(exists("w:netrw_liststyle")? ' : w:netrw_liststyle='.w:netrw_liststyle : ""))
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwBookmarkMenu: Uses menu priorities {{{2
+"                      .2.[cnt] for bookmarks, and
+"                      .3.[cnt] for history
+"                      (see s:NetrwMenu())
+fun! s:NetrwBookmarkMenu()
+  if !exists("s:netrw_menucnt")
+   return
+  endif
+"  call Dfunc("NetrwBookmarkMenu() bookmarkcnt=".g:NETRW_BOOKMARKMAX." histcnt=".g:NETRW_DIRHIST_CNT." menucnt=".s:netrw_menucnt)
+
+  " the following test assures that gvim is running, has menus available, and has menus enabled.
+  if has("gui") && has("menu") && has("gui_running") && &go =~ 'm' && g:netrw_menu
+   if exists("g:NetrwTopLvlMenu")
+"    call Decho("removing ".g:NetrwTopLvlMenu."Bookmarks menu item(s)")
+    exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Bookmarks'
    endif
-"   call Decho("handling a file: dirname<".dirname."> (a:0=".a:0.")")
-   " this lets NetBrowseX avoid the edit
-   if a:0 < 1
-"    call Decho("dirname<".dirname."> netrw_cd_escape<".s:netrw_cd_escape."> browse_split=".g:netrw_browse_split)
-"    call Decho("about to edit<".escape(dirname,s:netrw_cd_escape).">  didsplit=".(exists("s:didsplit")? s:didsplit : "doesn't exist"))
-    if !exists("s:didsplit")
-     if     g:netrw_browse_split == 1
-      new
-      wincmd _
-     elseif g:netrw_browse_split == 2
+
+   " show bookmarked places
+   let cnt       = 1
+   while cnt <= g:NETRW_BOOKMARKMAX
+    if exists("g:NETRW_BOOKMARKDIR_{cnt}")
+     let bmdir= escape(g:NETRW_BOOKMARKDIR_{cnt},'. ')
+"     call Decho('silent! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmark.'.bmdir.'	:e '.bmdir)
+     exe 'silent! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks.'.bmdir.'	:e '.bmdir."\<cr>"
+    endif
+    let cnt= cnt + 1
+   endwhile
+
+   " show directory browsing history
+   let cnt     = g:NETRW_DIRHIST_CNT
+   let first   = 1
+   let histcnt = 0
+   while ( first || cnt != g:NETRW_DIRHIST_CNT )
+    let histcnt  = histcnt + 1
+    let priority = g:NETRW_DIRHIST_CNT + histcnt
+    if exists("g:NETRW_DIRHIST_{cnt}")
+     let bmdir= escape(g:NETRW_DIRHIST_{cnt},'/&? ')
+"     call Decho('silent! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.bmdir.'	:e '.bmdir)
+     exe 'silent! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.bmdir.'	:e '.bmdir."\<cr>"
+    endif
+    let first = 0
+    let cnt   = ( cnt - 1 ) % g:netrw_dirhistmax
+    if cnt < 0
+     let cnt= cnt + g:netrw_dirhistmax
+    endif
+   endwhile
+  endif
+"  call Dret("NetrwBookmarkMenu")
+endfun
+
+" ---------------------------------------------------------------------
+"  s:NetrwBrowseChgDir: constructs a new directory based on the current {{{2
+"                       directory and a new directory name.  Also, if the
+"                       "new directory name" is actually a file,
+"                       NetrwBrowseChgDir() edits the file.
+fun! s:NetrwBrowseChgDir(islocal,newdir,...)
+"  call Dfunc("s:NetrwBrowseChgDir(islocal=".a:islocal."> newdir<".a:newdir.">) a:0=".a:0." curpos<".string(getpos("."))."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "").">")
+
+  if !exists("b:netrw_curdir")
+   " Don't try to change-directory: this can happen, for example, when netrw#ErrorMsg has been called
+   " and the current window is the NetrwMessage window.
+"   call Decho("(NetrwBrowseChgDir) b:netrw_curdir doesn't exist!")
+"   call Decho("getcwd<".getcwd().">")
+"   call Dredir("ls!")
+"   call Dret("s:NetrwBrowseChgDir")
+   return
+  endif
+
+  call s:NetrwOptionSave("s:")
+  call s:NetrwSafeOptions()
+  let nbcd_curpos                = netrw#NetrwSavePosn()
+  let s:nbcd_curpos_{bufnr('%')} = nbcd_curpos
+  let dirname                    = substitute(b:netrw_curdir,'\\','/','ge')
+  let newdir                     = a:newdir
+  let dolockout                  = 0
+
+  " set up o/s-dependent directory recognition pattern
+  if has("amiga")
+   let dirpat= '[\/:]$'
+  else
+   let dirpat= '[\/]$'
+  endif
+"  call Decho("dirname<".dirname.">  dirpat<".dirpat.">")
+
+  if dirname !~ dirpat
+   " apparently vim is "recognizing" that it is in a directory and
+   " is removing the trailing "/".  Bad idea, so I put it back.
+   let dirname= dirname.'/'
+"   call Decho("adjusting dirname<".dirname.">")
+  endif
+
+  if newdir !~ dirpat
+   " ------------
+   " edit a file:
+   " ------------
+"   call Decho('case "handling a file": newdir<'.newdir.'> !~ dirpat<'.dirpat.">")
+   if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") && newdir !~ '^\(/\|\a:\)'
+    let dirname= s:NetrwTreeDir()
+    if dirname =~ '/$'
+     let dirname= dirname.newdir
+    else
+     let dirname= s:NetrwTreeDir()."/".newdir
+    endif
+"    call Decho("tree listing")
+   elseif newdir =~ '^\(/\|\a:\)'
+    let dirname= newdir
+   else
+    let dirname= s:ComposePath(dirname,newdir)
+   endif
+"   call Decho("handling a file: dirname<".dirname."> (a:0=".a:0.")")
+   " this lets NetrwBrowseX avoid the edit
+   if a:0 < 1
+"    call Decho("dirname<".dirname."> netrw_cd_escape<".g:netrw_cd_escape."> browse_split=".g:netrw_browse_split)
+"    call Decho("set up windows for editing<".fnameescape(dirname).">  didsplit=".(exists("s:didsplit")? s:didsplit : "doesn't exist"))
+    call s:NetrwOptionRestore("s:")
+    if !exists("s:didsplit")
+     if     g:netrw_browse_split == 1
+      new
+      wincmd _
+     elseif g:netrw_browse_split == 2
       rightb vert new
       wincmd |
      elseif g:netrw_browse_split == 3
       tabnew
+     elseif g:netrw_browse_split == 4
+      if s:NetrwPrevWinOpen(2) == 3
+"       call Dret("s:NetrwBrowseChgDir")
+       return
+      endif
      else
       " handling a file, didn't split, so remove menu
 "      call Decho("handling a file+didn't split, so remove menu")
-      call s:NetMenu(0)
+      call s:NetrwMenu(0)
       " optional change to window
-      if g:netrw_chgwin >= 1 
-       exe g:netrw_chgwin."wincmd w"
+      if g:netrw_chgwin >= 1
+       exe "keepjumps ".g:netrw_chgwin."wincmd w"
       endif
      endif
     endif
-    " edit the file
-    " its local only: LocalBrowseCheck() doesn't edit a file, but NetBrowse() will
+    " the point where netrw actually edits the (local) file
+    " if its local only: LocalBrowseCheck() doesn't edit a file, but NetrwBrowse() will
     if a:islocal
-"     call Decho("edit file: exe e! ".escape(dirname,s:netrw_cd_escape))
-     exe "e! ".escape(dirname,s:netrw_cd_escape)
+"     call Decho("edit local file: exe e! ".fnameescape(dirname))
+     exe "e! ".fnameescape(dirname)
+    else
+"     call Decho("remote file: NetrwBrowse will edit it")
     endif
-    setlocal ma nomod noro
+    let dolockout= 1
+   endif
+
+  elseif newdir =~ '^/'
+   " ---------------------------------
+   " just go to the new directory spec
+   " ---------------------------------
+"   call Decho('case "just go to new directory spec": newdir<'.newdir.'>')
+   let dirname= newdir
+   call s:SetRexDir(a:islocal,dirname)
+   call s:NetrwOptionRestore("s:")
+
+  elseif newdir == './'
+   " --------------------------
+   " refresh the directory list
+   " --------------------------
+"   call Decho('case "refresh directory listing": newdir == "./"')
+   call s:SetRexDir(a:islocal,dirname)
+
+  elseif newdir == '../'
+   " -------------------
+   " go up one directory
+   " -------------------
+"   call Decho('case "go up one directory": newdir == "../"')
+
+   if w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict")
+    " force a refresh
+"    call Decho("clear buffer<".expand("%")."> with :%d")
+    setlocal noro ma
+"    call Decho("setlocal noro ma")
+    keepjumps %d
    endif
 
-  elseif newdir =~ '^/'
-   " just go to the new directory spec
-"   call Decho('case "just go to new directory spec": newdir<'.newdir.'>')
-   let dirname= newdir
+   if has("amiga")
+    " amiga
+"    call Decho('case "go up one directory": newdir == "../" and amiga')
+    if a:islocal
+     let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+$\)','\1','')
+     let dirname= substitute(dirname,'/$','','')
+    else
+     let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+/$\)','\1','')
+    endif
+"    call Decho("amiga: dirname<".dirname."> (go up one dir)")
+
+   else
+    " unix or cygwin
+"    call Decho('case "go up one directory": newdir == "../" and unix or cygwin')
+    if a:islocal
+     let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','')
+     if dirname == ""
+      let dirname= '/'
+     endif
+    else
+     let dirname= substitute(dirname,'^\(\a\+://.\{-}/\{1,2}\)\(.\{-}\)\([^/]\+\)/$','\1\2','')
+    endif
+"    call Decho("unix: dirname<".dirname."> (go up one dir)")
+   endif
+   call s:SetRexDir(a:islocal,dirname)
+
+  elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict")
+"   call Decho('case liststyle is TREELIST and w:netrw_treedict exists')
+   " force a refresh (for TREELIST, wait for NetrwTreeDir() to force the refresh)
+   setlocal noro ma
+"   call Decho("setlocal noro ma")
+   if !(exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir"))
+"    call Decho("clear buffer<".expand("%")."> with :%d")
+    keepjumps %d
+   endif
+   let treedir      = s:NetrwTreeDir()
+   let s:treecurpos = nbcd_curpos
+   let haskey= 0
+"   call Decho("w:netrw_treedict<".string(w:netrw_treedict).">")
+
+   " search treedict for tree dir as-is
+   if has_key(w:netrw_treedict,treedir)
+"    call Decho('....searched for treedir<'.treedir.'> : found it!')
+    let haskey= 1
+   else
+"    call Decho('....searched for treedir<'.treedir.'> : not found')
+   endif
+
+   " search treedict for treedir with a / appended
+   if !haskey && treedir !~ '/$'
+    if has_key(w:netrw_treedict,treedir."/")
+     let treedir= treedir."/"
+"     call Decho('....searched.for treedir<'.treedir.'> found it!')
+     let haskey = 1
+    else
+"     call Decho('....searched for treedir<'.treedir.'/> : not found')
+    endif
+   endif
+
+   " search treedict for treedir with any trailing / elided
+   if !haskey && treedir =~ '/$'
+    let treedir= substitute(treedir,'/$','','')
+    if has_key(w:netrw_treedict,treedir)
+"     call Decho('....searched.for treedir<'.treedir.'> found it!')
+     let haskey = 1
+    else
+"     call Decho('....searched for treedir<'.treedir.'> : not found')
+    endif
+   endif
+
+   if haskey
+    " close tree listing for selected subdirectory
+"    call Decho("closing selected subdirectory<".dirname.">")
+    call remove(w:netrw_treedict,treedir)
+"    call Decho("removed     entry<".dirname."> from treedict")
+"    call Decho("yielding treedict<".string(w:netrw_treedict).">")
+    let dirname= w:netrw_treetop
+   else
+    " go down one directory
+    let dirname= substitute(treedir,'/*$','/','')
+"    call Decho("go down one dir: treedir<".treedir.">")
+   endif
+   call s:SetRexDir(a:islocal,dirname)
+
+  else
+   " go down one directory
+   let dirname= s:ComposePath(dirname,newdir)
+"   call Decho("go down one dir: dirname<".dirname."> newdir<".newdir.">")
+   call s:SetRexDir(a:islocal,dirname)
+  endif
+
+  call s:NetrwOptionRestore("s:")
+  if dolockout
+"   call Decho("doing modification lockout settings: ma nomod noro")
+   setlocal ma nomod noro
+"   call Decho("setlocal ma nomod noro")
+  endif
+
+"  call Dret("s:NetrwBrowseChgDir <".dirname."> : curpos<".string(getpos(".")).">")
+  return dirname
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwBrowseX:  allows users to write custom functions to operate on {{{2
+"              files given their extension.  Passes 0=local, 1=remote
+fun! netrw#NetrwBrowseX(fname,remote)
+"  call Dfunc("NetrwBrowseX(fname<".a:fname."> remote=".a:remote.")")
+
+  " set up the filename
+  " (lower case the extension, make a local copy of a remote file)
+  let exten= substitute(a:fname,'.*\.\(.\{-}\)','\1','e')
+  if has("win32") || has("win95") || has("win64") || has("win16")
+   let exten= substitute(exten,'^.*$','\L&\E','')
+  endif
+  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 "kdeinit" running, though...  (tnx Mikolaj Machowski)
+  if !exists("s:haskdeinit")
+   if has("unix")
+    let s:haskdeinit= s:System("system",'ps -e') =~ 'kdeinit'
+    if v:shell_error
+     let s:haskdeinit = 0
+    endif
+   else
+    let s:haskdeinit= 0
+   endif
+"   call Decho("setting s:haskdeinit=".s:haskdeinit)
+  endif
+
+  if a:remote == 1
+   " create a local copy
+   let fname= fnamemodify(tempname(),":r").".".exten
+"   call Decho("a:remote=".a:remote.": create a local copy of <".a:fname."> as <".fname.">")
+   exe "silent keepjumps bot 1new ".fnameescape(fname)
+   setlocal bh=delete
+"   call Decho("read <".fname.">, now writing: exe w! ".fname)
+   exe "silent! w! ".fnameescape(fname)
+   q
+  else
+   let fname= a:fname
+  endif
+"  call Decho("exten<".exten."> "."netrwFileHandlers#NFH_".exten."():exists=".exists("*netrwFileHandlers#NFH_".exten))
+
+  " set up redirection
+  if &srr =~ "%s"
+   if (has("win32") || has("win95") || has("win64") || has("win16"))
+    let redir= substitute(&srr,"%s","nul","")
+   else
+    let redir= substitute(&srr,"%s","/dev/null","")
+   endif
+  elseif (has("win32") || has("win95") || has("win64") || has("win16"))
+   let redir= &srr . "nul"
+  else
+   let redir= &srr . "/dev/null"
+  endif
+"  call Decho("redir{".redir."} srr{".&srr."}")
+
+  " extract any viewing options.  Assumes that they're set apart by quotes.
+  if exists("g:netrw_browsex_viewer")
+   if g:netrw_browsex_viewer =~ '\s'
+    let viewer  = substitute(g:netrw_browsex_viewer,'\s.*$','','')
+    let viewopt = substitute(g:netrw_browsex_viewer,'^\S\+\s*','','')." "
+    let oviewer = ''
+    let cnt     = 1
+    while !executable(viewer) && viewer != oviewer
+     let viewer  = substitute(g:netrw_browsex_viewer,'^\(\(^\S\+\s\+\)\{'.cnt.'}\S\+\)\(.*\)$','\1','')
+     let viewopt = substitute(g:netrw_browsex_viewer,'^\(\(^\S\+\s\+\)\{'.cnt.'}\S\+\)\(.*\)$','\3','')." "
+     let cnt     = cnt + 1
+     let oviewer = viewer
+"     call Decho("!exe: viewer<".viewer.">  viewopt<".viewopt.">")
+    endwhile
+   else
+    let viewer  = g:netrw_browsex_viewer
+    let viewopt = ""
+   endif
+"   call Decho("viewer<".viewer.">  viewopt<".viewopt.">")
+  endif
+
+  " execute the file handler
+  if exists("g:netrw_browsex_viewer") && g:netrw_browsex_viewer == '-'
+"   call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">")
+   let ret= netrwFileHandlers#Invoke(exten,fname)
+
+  elseif exists("g:netrw_browsex_viewer") && executable(viewer)
+"   call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">")
+"   call Decho("exe silent !".viewer." ".viewopt.shellescape(fname).redir)
+   exe "silent !".viewer." ".viewopt.shellescape(fname,1).redir
+   let ret= v:shell_error
+
+  elseif has("win32") || has("win64")
+"   call Decho('exe silent !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname))
+   exe 'silent !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname)
+   call inputsave()|call input("Press <cr> to continue")|call inputrestore()
+   let ret= v:shell_error
+
+  elseif has("unix") && executable("gnome-open") && !s:haskdeinit
+"   call Decho("exe silent !gnome-open ".shellescape(fname)." ".redir)
+   exe "silent !gnome-open ".shellescape(fname,1).redir
+   let ret= v:shell_error
+
+  elseif has("unix") && executable("kfmclient") && s:haskdeinit
+"   call Decho("exe silent !kfmclient exec ".shellescape(fname)." ".redir)
+   exe "silent !kfmclient exec ".shellescape(fname,1)." ".redir
+   let ret= v:shell_error
+
+  elseif has("macunix") && executable("open")
+"   call Decho("exe silent !open ".shellescape(fname)." ".redir)
+   exe "silent !open ".shellescape(fname)." ".redir
+   let ret= v:shell_error
+
+  else
+   " netrwFileHandlers#Invoke() always returns 0
+   let ret= netrwFileHandlers#Invoke(exten,fname)
+  endif
+
+  " if unsuccessful, attempt netrwFileHandlers#Invoke()
+  if ret
+   let ret= netrwFileHandlers#Invoke(exten,fname)
+  endif
+
+"  redraw!
+
+  " cleanup: remove temporary file,
+  "          delete current buffer if success with handler,
+  "          return to prior buffer (directory listing)
+  "          Feb 12, 2008: had to de-activiate removal of
+  "          temporary file because it wasn't getting seen.
+"  if a:remote == 1 && fname != a:fname
+"   call Decho("deleting temporary file<".fname.">")
+"   call s:System("delete",fname)
+"  endif
+
+  if a:remote == 1
+   setlocal bh=delete bt=nofile
+   if g:netrw_use_noswf
+    setlocal noswf
+   endif
+   exe "norm! \<c-o>"
+"   redraw!
+  endif
+
+"  call Dret("NetrwBrowseX")
+endfun
+
+" ---------------------------------------------------------------------
+" netrw#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
+"          dosplit==1: the window will be split before running the local
+"                      browser
+fun! netrw#Explore(indx,dosplit,style,...)
+"  call Dfunc("netrw#Explore(indx=".a:indx." dosplit=".a:dosplit." style=".a:style.",a:1<".a:1.">) &modified=".&modified." a:0=".a:0)
+  if !exists("b:netrw_curdir")
+   let b:netrw_curdir= getcwd()
+"   call Decho("set b:netrw_curdir<".b:netrw_curdir."> (used getcwd)")
+  endif
+  let curfile= b:netrw_curdir
+"  call Decho("curfile<".curfile.">")
+
+  " save registers
+  silent! let keepregstar = @*
+  silent! let keepregplus = @+
+  silent! let keepregslash= @/
+
+  " if dosplit or file has been modified
+  if a:dosplit || &modified || a:style == 6
+"   call Decho("case: dosplit=".a:dosplit." modified=".&modified." a:style=".a:style)
+   call s:SaveWinVars()
+
+   if a:style == 0      " Explore, Sexplore
+"    call Decho("style=0: Explore or Sexplore")
+    exe g:netrw_winsize."wincmd s"
+
+   elseif a:style == 1  "Explore!, Sexplore!
+"    call Decho("style=1: Explore! or Sexplore!")
+    exe g:netrw_winsize."wincmd v"
+
+   elseif a:style == 2  " Hexplore
+"    call Decho("style=2: Hexplore")
+    exe "bel ".g:netrw_winsize."wincmd s"
+
+   elseif a:style == 3  " Hexplore!
+"    call Decho("style=3: Hexplore!")
+    exe "abo ".g:netrw_winsize."wincmd s"
+
+   elseif a:style == 4  " Vexplore
+"    call Decho("style=4: Vexplore")
+    exe "lefta ".g:netrw_winsize."wincmd v"
+
+   elseif a:style == 5  " Vexplore!
+"    call Decho("style=5: Vexplore!")
+    exe "rightb ".g:netrw_winsize."wincmd v"
+
+   elseif a:style == 6  " Texplore
+    call s:SaveBufVars()
+"    call Decho("style  = 6: Texplore")
+    tabnew
+    call s:RestoreBufVars()
+   endif
+   call s:RestoreWinVars()
+  endif
+  norm! 0
+
+  if a:0 > 0
+"   call Decho("case [a:0=".a:0."]>0: a:1<".a:1.">")
+   if a:1 =~ '^\~' && (has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin))
+    let dirname= substitute(a:1,'\~',expand("$HOME"),'')
+"    call Decho("using dirname<".dirname.">  (case: ~ && unix||cygwin)")
+   elseif a:1 == '.'
+    let dirname= exists("b:netrw_curdir")? b:netrw_curdir : getcwd()
+    if dirname !~ '/$'
+     let dirname= dirname."/"
+    endif
+"    call Decho("using dirname<".dirname.">  (case: ".(exists("b:netrw_curdir")? "b:netrw_curdir" : "getcwd()").")")
+   elseif a:1 =~ '\$'
+    let dirname= expand(a:1)
+   else
+    let dirname= a:1
+"    call Decho("using dirname<".dirname.">")
+   endif
+  else
+   " clear explore
+"   call Decho("clearing explore variables")
+   2match none
+   if exists("s:explore_match")        |unlet s:explore_match        |endif
+   if exists("s:explore_indx")         |unlet s:explore_indx         |endif
+   if exists("s:dirstarstar")          |unlet s:dirstarstar          |endif
+   if exists("s:dirstarstar")          |unlet s:dirstarstar          |endif
+   if exists("w:netrw_explore_indx")   |unlet w:netrw_explore_indx   |endif
+   if exists("w:netrw_explore_listlen")|unlet w:netrw_explore_listlen|endif
+   if exists("w:netrw_explore_list")   |unlet w:netrw_explore_list   |endif
+   if exists("w:netrw_explore_bufnr")  |unlet w:netrw_explore_bufnr  |endif
+"   redraw!
+   echo " "
+   echo " "
+"   call Dret("netrw#Explore : cleared list")
+   return
+  endif
+
+  if dirname =~ '/\*\*/'
+   " handle .../**/.../filepat
+"   call Decho("case Explore .../**/.../filepat")
+   let prefixdir= substitute(dirname,'^\(.\{-}\)\*\*.*$','\1','')
+   if prefixdir =~ '^/' || (prefixdir =~ '^\a:/' && (has("win32") || has("win95") || has("win64") || has("win16")))
+    let b:netrw_curdir = prefixdir
+   else
+    let b:netrw_curdir= getcwd().'/'.prefixdir
+   endif
+   let dirname= substitute(dirname,'^.\{-}\(\*\*/.*\)$','\1','')
+   let starpat= 4;
+"   call Decho("pwd<".getcwd()."> dirname<".dirname.">")
+"   call Decho("case Explore ../**/../filepat (starpat=".starpat.")")
+
+  elseif dirname =~ '^\*//'
+   " starpat=1: Explore *//pattern   (current directory only search for files containing pattern)
+"   call Decho("case Explore *//pattern")
+   let pattern= substitute(dirname,'^\*//\(.*\)$','\1','')
+   let starpat= 1
+"   call Decho("Explore *//pat: (starpat=".starpat.") dirname<".dirname."> -> pattern<".pattern.">")
+   if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif
+
+  elseif dirname =~ '^\*\*//'
+   " starpat=2: Explore **//pattern  (recursive descent search for files containing pattern)
+"   call Decho("case Explore **//pattern")
+   let pattern= substitute(dirname,'^\*\*//','','')
+   let starpat= 2
+"   call Decho("Explore **//pat: (starpat=".starpat.") dirname<".dirname."> -> pattern<".pattern.">")
+
+  elseif dirname =~ '^\*/'
+   " starpat=3: Explore */filepat   (search in current directory for filenames matching filepat)
+   let starpat= 3
+"   call Decho("case Explore */filepat (starpat=".starpat.")")
+
+  elseif dirname=~ '^\*\*/'
+   " starpat=4: Explore **/filepat  (recursive descent search for filenames matching filepat)
+   let starpat= 4
+"   call Decho("case Explore **/filepat (starpat=".starpat.")")
+  else
+   let starpat= 0
+  endif
+
+  if starpat == 0 && a:indx >= 0
+   " [Explore Hexplore Vexplore Sexplore] [dirname]
+"   call Decho("case dirname<".dirname."> a:indx=".a:indx.": Explore Hexplore Vexplore Sexplore")
+   if dirname == ""
+    let dirname= substitute(expand("%:p"),'^\(.*[/\\]\)[^/\\]*$','\1','e')
+   endif
+   if dirname =~ '^scp:' || dirname =~ '^ftp:'
+"    call Decho("calling NetrwBrowse(0,dirname<".dirname.">)")
+    call s:NetrwBrowse(0,dirname)
+   else
+    if dirname == ""|let dirname= getcwd()|endif
+"    call Decho("calling LocalBrowseCheck(dirname<".dirname.">)")
+    call netrw#LocalBrowseCheck(dirname)
+   endif
+
+"   call Decho("curfile<".curfile.">")
+   if has("win32") || has("win95") || has("win64") || has("win16")
+    call search('\<'.substitute(curfile,'^.*[/\\]','','e').'\>','cW')
+   else
+    call search('\<'.substitute(curfile,'^.*/','','e').'\>','cW')
+   endif
+
+  " starpat=1: Explore *//pattern  (current directory only search for files containing pattern)
+  " starpat=2: Explore **//pattern (recursive descent search for files containing pattern)
+  " starpat=3: Explore */filepat   (search in current directory for filenames matching filepat)
+  " starpat=4: Explore **/filepat  (recursive descent search for filenames matching filepat)
+  elseif a:indx <= 0
+   " Nexplore, Pexplore, Explore: handle starpat
+"   call Decho("case Nexplore, Pexplore, <s-down>, <s-up>: starpat=".starpat." a:indx=".a:indx)
+   if !mapcheck("<s-up>","n") && !mapcheck("<s-down>","n") && exists("b:netrw_curdir")
+"    call Decho("set up <s-up> and <s-down> maps")
+    let s:didstarstar= 1
+    nnoremap <buffer> <silent> <s-up>	:Pexplore<cr>
+    nnoremap <buffer> <silent> <s-down>	:Nexplore<cr>
+   endif
+
+   if has("path_extra")
+"    call Decho("starpat=".starpat.": has +path_extra")
+    if !exists("w:netrw_explore_indx")
+     let w:netrw_explore_indx= 0
+    endif
+    let indx = a:indx
+"    call Decho("starpat=".starpat.": set indx= [a:indx=".indx."]")
+"
+    if indx == -1
+     " Nexplore
+"     call Decho("case Nexplore with starpat=".starpat.": (indx=".indx.")")
+     if !exists("w:netrw_explore_list") " sanity check
+      call netrw#ErrorMsg(s:WARNING,"using Nexplore or <s-down> improperly; see help for netrw-starstar",40)
+      silent! let @* = keepregstar
+      silent! let @+ = keepregstar
+      silent! let @/ = keepregslash
+"      call Dret("netrw#Explore")
+      return
+     endif
+     let indx= w:netrw_explore_indx
+     if indx < 0                        | let indx= 0                           | endif
+     if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif
+     let curfile= w:netrw_explore_list[indx]
+"     call Decho("indx=".indx." curfile<".curfile.">")
+     while indx < w:netrw_explore_listlen && curfile == w:netrw_explore_list[indx]
+      let indx= indx + 1
+"      call Decho("indx=".indx." (Nexplore while loop)")
+     endwhile
+     if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif
+"     call Decho("Nexplore: indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx)
+
+    elseif indx == -2
+     " Pexplore
+"     call Decho("case Pexplore with starpat=".starpat.": (indx=".indx.")")
+     if !exists("w:netrw_explore_list") " sanity check
+      call netrw#ErrorMsg(s:WARNING,"using Pexplore or <s-up> improperly; see help for netrw-starstar",41)
+      silent! let @* = keepregstar
+      silent! let @+ = keepregstar
+      silent! let @/ = keepregslash
+"      call Dret("netrw#Explore")
+      return
+     endif
+     let indx= w:netrw_explore_indx
+     if indx < 0                        | let indx= 0                           | endif
+     if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif
+     let curfile= w:netrw_explore_list[indx]
+"     call Decho("indx=".indx." curfile<".curfile.">")
+     while indx >= 0 && curfile == w:netrw_explore_list[indx]
+      let indx= indx - 1
+"      call Decho("indx=".indx." (Pexplore while loop)")
+     endwhile
+     if indx < 0                        | let indx= 0                           | endif
+"     call Decho("Pexplore: indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx)
+
+    else
+     " Explore -- initialize
+     " build list of files to Explore with Nexplore/Pexplore
+"     call Decho("starpat=".starpat.": case Explore: initialize (indx=".indx.")")
+     let w:netrw_explore_indx= 0
+     if !exists("b:netrw_curdir")
+      let b:netrw_curdir= getcwd()
+     endif
+"     call Decho("starpat=".starpat.": b:netrw_curdir<".b:netrw_curdir.">")
+
+     " switch on starpat to build the w:netrw_explore_list of files
+     if starpat == 1
+      " starpat=1: Explore *//pattern  (current directory only search for files containing pattern)
+"      call Decho("starpat=".starpat.": build *//pattern list")
+      exe "vimgrep /".pattern."/gj ".fnameescape(b:netrw_curdir)."/*"
+      let w:netrw_explore_list = map(getqflist(),'bufname(v:val.bufnr)')
+      if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif
+
+     elseif starpat == 2
+      " starpat=2: Explore **//pattern (recursive descent search for files containing pattern)
+"      call Decho("starpat=".starpat.": build **//pattern list")
+      try
+       exe "silent vimgrep /".pattern."/gj "."**/*"
+      catch /^Vim\%((\a\+)\)\=:E480/
+      	call netrw#ErrorMsg(s:WARNING,'no files matched pattern<'.pattern.'>',45)
+       if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif
+       silent! let @* = keepregstar
+       silent! let @+ = keepregstar
+       silent! let @/ = keepregslash
+"       call Dret("netrw#Explore : no files matched pattern")
+       return
+      endtry
+      let s:netrw_curdir       = b:netrw_curdir
+      let w:netrw_explore_list = getqflist()
+      let w:netrw_explore_list = map(w:netrw_explore_list,'s:netrw_curdir."/".bufname(v:val.bufnr)')
+
+     elseif starpat == 3
+      " starpat=3: Explore */filepat   (search in current directory for filenames matching filepat)
+"      call Decho("starpat=".starpat.": build */filepat list")
+      let dirname             = substitute(dirname,'^\*/','','')
+      let w:netrw_explore_list= split(expand(b:netrw_curdir."/".dirname),'\n')
+      if &hls | let keepregslash= s:ExplorePatHls(dirname) | endif
 
-  elseif newdir == './'
-   " refresh the directory list
-"   call Decho('case "refresh directory listing": newdir == "./"')
+     elseif starpat == 4
+      " starpat=4: Explore **/filepat  (recursive descent search for filenames matching filepat)
+"      call Decho("starpat=".starpat.": build **/filepat list")
+      let w:netrw_explore_list= split(expand(b:netrw_curdir."/".dirname),'\n')
+      if &hls | let keepregslash= s:ExplorePatHls(dirname) | endif
+     endif " switch on starpat to build w:netrw_explore_list
 
-  elseif newdir == '../'
-   " go up one directory
-"   call Decho('case "go up one directory": newdir == "../"')
+     let w:netrw_explore_listlen = len(w:netrw_explore_list)
+"     call Decho("w:netrw_explore_list<".string(w:netrw_explore_list).">")
+"     call Decho("w:netrw_explore_listlen=".w:netrw_explore_listlen)
 
-   if w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict")
-    " force a refresh
-"    call Decho("clear buffer<".expand("%")."> with :%d")
-    setlocal noro ma
-    keepjumps %d
-   endif
+     if w:netrw_explore_listlen == 0 || (w:netrw_explore_listlen == 1 && w:netrw_explore_list[0] =~ '\*\*\/')
+      call netrw#ErrorMsg(s:WARNING,"no files matched",42)
+      silent! let @* = keepregstar
+      silent! let @+ = keepregstar
+      silent! let @/ = keepregslash
+"      call Dret("netrw#Explore : no files matched")
+      return
+     endif
+    endif  " if indx ... endif
 
-   if has("amiga")
-    " amiga
-"    call Decho('case "go up one directory": newdir == "../" and amiga')
-    if a:islocal
-     let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+$\)','\1','')
-     let dirname= substitute(dirname,'/$','','')
-    else
-     let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+/$\)','\1','')
-    endif
-"    call Decho("amiga: dirname<".dirname."> (go up one dir)")
+    " NetrwStatusLine support - for exploring support
+    let w:netrw_explore_indx= indx
+"    call Decho("explorelist<".join(w:netrw_explore_list,',')."> len=".w:netrw_explore_listlen)
 
-   else
-    " unix or cygwin
-"    call Decho('case "go up one directory": newdir == "../" and unix or cygwin')
-    if a:islocal
-     let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','')
-     if dirname == ""
-      let dirname= '/'
-     endif
-    else
-     let dirname= substitute(dirname,'^\(\a\+://.\{-}/\{1,2}\)\(.\{-}\)\([^/]\+\)/$','\1\2','')
+    " wrap the indx around, but issue a note
+    if indx >= w:netrw_explore_listlen || indx < 0
+"     call Decho("wrap indx (indx=".indx." listlen=".w:netrw_explore_listlen.")")
+     let indx                = (indx < 0)? ( w:netrw_explore_listlen - 1 ) : 0
+     let w:netrw_explore_indx= indx
+     call netrw#ErrorMsg(s:NOTE,"no more files match Explore pattern",43)
+     sleep 1
     endif
-"    call Decho("unix: dirname<".dirname."> (go up one dir)")
-   endif
-
-  elseif w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict")
-"   call Decho('case liststyle is TREELIST and w:netrw_treedict exists')
-   " force a refresh (for TREELIST, wait for NetTreeDir() to force the refresh)
-   setlocal noro ma
-   if !(exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir"))
-"    call Decho("clear buffer<".expand("%")."> with :%d")
-    keepjumps %d
-   endif
-   let treedir      = s:NetTreeDir()
-   let s:treecurpos = nbcd_curpos
-   let haskey= 0
-"   call Decho("w:netrw_treedict<".string(w:netrw_treedict).">")
 
-   " search treedict for tree dir as-is
-   if has_key(w:netrw_treedict,treedir)
-"    call Decho('....searched for treedir<'.treedir.'> : found it!')
-    let haskey= 1
-   else
-"    call Decho('....searched for treedir<'.treedir.'> : not found')
-   endif
+    exe "let dirfile= w:netrw_explore_list[".indx."]"
+"    call Decho("dirfile=w:netrw_explore_list[indx=".indx."]= <".dirfile.">")
+    let newdir= substitute(dirfile,'/[^/]*$','','e')
+"    call Decho("newdir<".newdir.">")
 
-   " search treedict for treedir with a / appended
-   if !haskey && treedir !~ '/$'
-    if has_key(w:netrw_treedict,treedir."/")
-     let treedir= treedir."/"
-"     call Decho('....searched.for treedir<'.treedir.'> found it!')
-     let haskey = 1
+"    call Decho("calling LocalBrowseCheck(newdir<".newdir.">)")
+    call netrw#LocalBrowseCheck(newdir)
+    if !exists("w:netrw_liststyle")
+     let w:netrw_liststyle= g:netrw_liststyle
+    endif
+    if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:LONGLIST
+     call search('^'.substitute(dirfile,"^.*/","","").'\>',"W")
     else
-"     call Decho('....searched for treedir<'.treedir.'/> : not found')
+     call search('\<'.substitute(dirfile,"^.*/","","").'\>',"w")
     endif
-   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)
 
-   " search treedict for treedir with any trailing / elided
-   if !haskey && treedir =~ '/$'
-    let treedir= substitute(treedir,'/$','','')
-    if has_key(w:netrw_treedict,treedir)
-"     call Decho('....searched.for treedir<'.treedir.'> found it!')
-     let haskey = 1
-    else
-"     call Decho('....searched for treedir<'.treedir.'> : not found')
+   else
+"    call Decho("your vim does not have +path_extra")
+    if !exists("g:netrw_quiet")
+     call netrw#ErrorMsg(s:WARNING,"your vim needs the +path_extra feature for Exploring with **!",44)
     endif
+    silent! let @* = keepregstar
+    silent! let @+ = keepregstar
+    silent! let @/ = keepregslash
+"    call Dret("netrw#Explore : missing +path_extra")
+    return
    endif
 
-   if haskey
-    " close tree listing for selected subdirectory
-"    call Decho("closing selected subdirectory<".dirname.">")
-    call remove(w:netrw_treedict,treedir)
-"    call Decho("removed     entry<".dirname."> from treedict")
-"    call Decho("yielding treedict<".string(w:netrw_treedict).">")
-    let dirname= w:netrw_treetop
+  else
+"   call Decho("case Explore newdir<".dirname.">")
+   if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && dirname =~ '/'
+    silent! unlet w:netrw_treedict
+    silent! unlet w:netrw_treetop
+   endif
+   let newdir= dirname
+   if !exists("b:netrw_curdir")
+    call netrw#LocalBrowseCheck(getcwd())
    else
-    " go down one directory
-    let dirname= substitute(treedir,'/*$','/','')
-"    call Decho("go down one dir: treedir<".treedir.">")
+    call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,newdir))
    endif
+  endif
 
-  else
-   " go down one directory
-   let dirname= s:ComposePath(dirname,newdir)
-"   call Decho("go down one dir: dirname<".dirname."> newdir<".newdir.">")
+  " visual display of **/ **// */ Exploration files
+  if exists("w:netrw_explore_indx") && exists("b:netrw_curdir")
+   if !exists("s:explore_prvdir") || s:explore_prvdir != b:netrw_curdir
+    " only update match list if current directory isn't the same as before
+    let s:explore_prvdir = b:netrw_curdir
+    let s:explore_match  = ""
+    let dirlen           = strlen(b:netrw_curdir)
+    if b:netrw_curdir !~ '/$'
+     let dirlen= dirlen + 1
+    endif
+    let prvfname= ""
+    for fname in w:netrw_explore_list
+"     call Decho("fname<".fname.">")
+     if fname =~ '^'.b:netrw_curdir
+      if s:explore_match == ""
+       let s:explore_match= '\<'.escape(strpart(fname,dirlen),g:netrw_markfileesc."'".g:netrw_markfileesc."'").'\>'
+      else
+       let s:explore_match= s:explore_match.'\|\<'.escape(strpart(fname,dirlen),g:netrw_markfileesc."'".g:netrw_markfileesc."'").'\>'
+      endif
+     elseif fname !~ '^/' && fname != prvfname
+      if s:explore_match == ""
+       let s:explore_match= '\<'.escape(fname,g:netrw_markfileesc."'".g:netrw_markfileesc."'").'\>'
+      else
+       let s:explore_match= s:explore_match.'\|\<'.escape(fname,g:netrw_markfileesc."'".g:netrw_markfileesc."'").'\>'
+      endif
+     endif
+     let prvfname= fname
+    endfor
+"    call Decho("explore_match<".s:explore_match.">")
+    exe "2match netrwMarkFile /".s:explore_match."/"
+   endif
+   echo "<s-up>==Pexplore  <s-down>==Nexplore"
+  else
+   2match none
+   if exists("s:explore_match")  | unlet s:explore_match  | endif
+   if exists("s:explore_prvdir") | unlet s:explore_prvdir | endif
+   echo " "
+"   call Decho("cleared explore match list")
   endif
 
-"  call Dret("s:NetBrowseChgDir <".dirname."> : curpos<".string(getpos(".")).">")
-  return dirname
+  silent! let @* = keepregstar
+  silent! let @+ = keepregstar
+  silent! let @/ = keepregslash
+"  call Dret("netrw#Explore : @/<".@/.">")
 endfun
 
 " ---------------------------------------------------------------------
-" s:NetHide: this function is invoked by the "a" map for browsing {{{2
-"          and switches the hiding mode
-fun! s:NetHide(islocal)
-"  call Dfunc("NetHide(islocal=".a:islocal.")")
+" s:NetrwHide: this function is invoked by the "a" map for browsing {{{2
+"          and switches the hiding mode.  The actual hiding is done by
+"          s:NetrwListHide().
+"             g:netrw_hide= 0: show all
+"                           1: show not-hidden files
+"                           2: show hidden files only
+fun! s:NetrwHide(islocal)
+"  call Dfunc("NetrwHide(islocal=".a:islocal.") g:netrw_hide=".g:netrw_hide)
+  let svpos= netrw#NetrwSavePosn()
+
+  if exists("s:netrwmarkfilelist_{bufnr('%')}")
+"   call Decho(((g:netrw_hide == 1)? "unhide" : "hide")." files in markfilelist<".string(s:netrwmarkfilelist_{bufnr("%")}).">")
+"   call Decho("g:netrw_list_hide<".g:netrw_list_hide.">")
+
+   " hide the files in the markfile list
+   for fname in s:netrwmarkfilelist_{bufnr("%")}
+"    call Decho("match(g:netrw_list_hide<".g:netrw_list_hide.'> fname<\<'.fname.'\>>)='.match(g:netrw_list_hide,'\<'.fname.'\>')." isk=".&isk)
+    if match(g:netrw_list_hide,'\<'.fname.'\>') != -1
+     " remove fname from hiding list
+     let g:netrw_list_hide= substitute(g:netrw_list_hide,'..\<'.escape(fname,g:netrw_fname_escape).'\>..','','')
+     let g:netrw_list_hide= substitute(g:netrw_list_hide,',,',',','g')
+     let g:netrw_list_hide= substitute(g:netrw_list_hide,'^,\|,$','','')
+"     call Decho("unhide: g:netrw_list_hide<".g:netrw_list_hide.">")
+    else
+     " append fname to hiding list
+     if exists("g:netrw_list_hide") && g:netrw_list_hide != ""
+      let g:netrw_list_hide= g:netrw_list_hide.',\<'.escape(fname,g:netrw_fname_escape).'\>'
+     else
+      let g:netrw_list_hide= '\<'.escape(fname,g:netrw_fname_escape).'\>'
+     endif
+"     call Decho("hide: g:netrw_list_hide<".g:netrw_list_hide.">")
+    endif
+   endfor
+   unlet s:netrwmarkfilelist_{bufnr("%")}
+   unlet s:netrwmarkfilemtch_{bufnr("%")}
+   2match none
+   let g:netrw_hide= 1
+
+  else
+
+   " switch between show-all/show-not-hidden/show-hidden
    let g:netrw_hide=(g:netrw_hide+1)%3
    exe "norm! 0"
    if g:netrw_hide && g:netrw_list_hide == ""
     call netrw#ErrorMsg(s:WARNING,"your hiding list is empty!",49)
-"    call Dret("NetHide")
+"    call Dret("NetrwHide")
     return
    endif
-   call netrw#NetSavePosn()
-   call s:NetRefresh(a:islocal,s:NetBrowseChgDir(a:islocal,'./'))
-"  call Dret("NetHide")
+  endif
+
+  call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+  call netrw#NetrwRestorePosn(svpos)
+"  call Dret("NetrwHide")
 endfun
 
 " ---------------------------------------------------------------------
+" s:NetrwHidden: invoked by "gh" {{{2
+fun! s:NetrwHidden(islocal)
+"  call Dfunc("s:NetrwHidden()")
+  "  save current position
+  let svpos= netrw#NetrwSavePosn()
 
-" ===========================================
-" s:NetPreview: {{{2
-fun! s:NetPreview(path) range
-"  call Dfunc("NetPreview(path<".a:path.">)")
-  if has("quickfix")
-   if !isdirectory(a:path)
-    exe "pedit ".escape(a:path,g:netrw_fname_escape)
-   elseif !exists("g:netrw_quiet")
-    call netrw#ErrorMsg(s:WARNING,"sorry, cannot preview a directory such as <".a:path.">",38)
+  if g:netrw_list_hide =~ '\(^\|,\)\\(^\\|\\s\\s\\)\\zs\\.\\S\\+'
+   " remove pattern from hiding list
+   let g:netrw_list_hide= substitute(g:netrw_list_hide,'\(^\|,\)\\(^\\|\\s\\s\\)\\zs\\.\\S\\+','','')
+  elseif strlen(g:netrw_list_hide) >= 1
+   let g:netrw_list_hide= g:netrw_list_hide . ',\(^\|\s\s\)\zs\.\S\+'
+  else
+   let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+'
+  endif
+
+  " refresh screen and return to saved position
+  call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+  call netrw#NetrwRestorePosn(svpos)
+"  call Dret("s:NetrwHidden")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwLeftmouse: handles the <leftmouse> when in a netrw browsing window {{{2
+fun! s:NetrwLeftmouse(islocal)
+"  call Dfunc("s:NetrwLeftmouse(islocal=".a:islocal.")")
+  if a:islocal
+   if exists("b:netrw_curdir")
+    call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord()))
+   endif
+  else
+   if exists("b:netrw_curdir")
+    call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord()))
    endif
-  elseif !exists("g:netrw_quiet")
-   call netrw#ErrorMsg(s:WARNING,"sorry, to preview your vim needs the quickfix feature compiled in",39)
   endif
-"  call Dret("NetPreview")
+"  call Dret("s:NetrwLeftmouse")
 endfun
 
 " ---------------------------------------------------------------------
-" s:NetSortStyle: change sorting style (name - time - size) and refresh display {{{2
-fun! s:NetSortStyle(islocal)
-"  call Dfunc("s:NetSortStyle(islocal=".a:islocal.") netrw_sort_by<".g:netrw_sort_by.">")
-  call s:NetSaveWordPosn()
+" s: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() hide=".g:netrw_hide." listhide<".g:netrw_list_hide.">")
 
-  let g:netrw_sort_by= (g:netrw_sort_by =~ 'n')? 'time' : (g:netrw_sort_by =~ 't')? 'size' : 'name'
-  norm! 0
-  call netrw#NetSavePosn()
-  call s:NetRefresh(a:islocal,s:NetBrowseChgDir(a:islocal,'./'))
+  " find a character not in the "hide" string to use as a separator for :g and :v commands
+  " How-it-works: take the hiding command, convert it into a range.  Duplicate
+  " characters don't matter.  Remove all such characters from the '/~...90'
+  " string.  Use the first character left as a separator character.
+  let listhide= g:netrw_list_hide
+  let sep     = strpart(substitute('/~@#$%^&*{};:,<.>?|1234567890','['.escape(listhide,'-]^\').']','','ge'),1,1)
+"  call Decho("sep=".sep)
+
+  while listhide != ""
+   if listhide =~ ','
+    let hide     = substitute(listhide,',.*$','','e')
+    let listhide = substitute(listhide,'^.\{-},\(.*\)$','\1','e')
+   else
+    let hide     = listhide
+    let listhide = ""
+   endif
+
+   " Prune the list by hiding any files which match
+   if g:netrw_hide == 1
+"    call Decho("hiding<".hide."> listhide<".listhide.">")
+    exe 'silent keepjumps '.w:netrw_bannercnt.',$g'.sep.hide.sep.'d'
+   elseif g:netrw_hide == 2
+"    call Decho("showing<".hide."> listhide<".listhide.">")
+    exe 'silent keepjumps '.w:netrw_bannercnt.',$g'.sep.hide.sep.'s@^@ /-KEEP-/ @'
+   endif
+  endwhile
+  if g:netrw_hide == 2
+   exe 'silent keepjumps '.w:netrw_bannercnt.',$v@^ /-KEEP-/ @d'
+   exe 'silent keepjumps '.w:netrw_bannercnt.',$s@^\%( /-KEEP-/ \)\+@@e'
+  endif
 
-"  call Dret("s:NetSortStyle : netrw_sort_by<".g:netrw_sort_by.">")
+"  call Dret("NetrwListHide")
 endfun
 
 " ---------------------------------------------------------------------
-"  Remote Directory Browsing Support:    {{{1
-" ===========================================
+" NetrwHideEdit: allows user to edit the file/directory hiding list
+fun! s:NetrwHideEdit(islocal)
+"  call Dfunc("NetrwHideEdit(islocal=".a:islocal.")")
+
+  " save current cursor position
+  let svpos= netrw#NetrwSavePosn()
+
+  " 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
+  silent call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,"./"))
+
+  " restore cursor position
+  call netrw#NetrwRestorePosn(svpos)
+
+"  call Dret("NetrwHideEdit")
+endfun
+
+" ---------------------------------------------------------------------
+" NetSortSequence: allows user to edit the sorting sequence
+fun! s:NetSortSequence(islocal)
+"  call Dfunc("NetSortSequence(islocal=".a:islocal.")")
+
+  let svpos= netrw#NetrwSavePosn()
+  call inputsave()
+  let newsortseq= input("Edit Sorting Sequence: ",g:netrw_sort_sequence)
+  call inputrestore()
+
+  " refresh the listing
+  let g:netrw_sort_sequence= newsortseq
+  call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+  call netrw#NetrwRestorePosn(svpos)
+
+"  call Dret("NetSortSequence")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMakeDir: this function makes a directory (both local and remote) {{{2
+fun! s:NetrwMakeDir(usrhost)
+"  call Dfunc("NetrwMakeDir(usrhost<".a:usrhost.">)")
+
+  " get name of new directory from user.  A bare <CR> will skip.
+  " if its currently a directory, also request will be skipped, but with
+  " a message.
+  call inputsave()
+  let newdirname= input("Please give directory name: ")
+  call inputrestore()
+"  call Decho("newdirname<".newdirname.">")
 
-" ---------------------------------------------------------------------
-" s:RemoteListing: {{{2
-fun! s:RemoteListing()
-"  call Dfunc("s:RemoteListing() b:netrw_curdir<".b:netrw_curdir.">)")
+  if newdirname == ""
+"   call Dret("NetrwMakeDir : user aborted with bare <cr>")
+   return
+  endif
 
-  call s:RemotePathAnalysis(b:netrw_curdir)
+  if a:usrhost == ""
+"   call Decho("local mkdir")
 
-  " sanity check:
-  if exists("b:netrw_method") && b:netrw_method =~ '[235]'
-"   call Decho("b:netrw_method=".b:netrw_method)
-   if !executable("ftp")
+   " Local mkdir:
+   " sanity checks
+   let fullnewdir= b:netrw_curdir.'/'.newdirname
+"   call Decho("fullnewdir<".fullnewdir.">")
+   if isdirectory(fullnewdir)
     if !exists("g:netrw_quiet")
-     call netrw#ErrorMsg(s:ERROR,"this system doesn't support remote directory listing via ftp",18)
+     call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a directory!",24)
     endif
-    call s:NetOptionRestore()
-"    call Dret("s:RemoteListing")
+"    call Dret("NetrwMakeDir : directory<".newdirname."> exists previously")
     return
    endif
-
-  elseif !exists("g:netrw_list_cmd") || g:netrw_list_cmd == ''
-   if !exists("g:netrw_quiet")
-    if g:netrw_list_cmd == ""
-     call netrw#ErrorMsg(s:ERROR,g:netrw_ssh_cmd." is not executable on your system",47)
-    else
-     call netrw#ErrorMsg(s:ERROR,"this system doesn't support remote directory listing via ".g:netrw_list_cmd,19)
+   if s:FileReadable(fullnewdir)
+    if !exists("g:netrw_quiet")
+     call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a file!",25)
     endif
+"    call Dret("NetrwMakeDir : file<".newdirname."> exists previously")
+    return
    endif
 
-   call s:NetOptionRestore()
-"   call Dret("s:RemoteListing")
-   return
-  endif  " (remote handling sanity check)
+   " requested new local directory is neither a pre-existing file or
+   " directory, so make it!
+   if exists("*mkdir")
+    call mkdir(fullnewdir,"p")
+   else
+    let netrw_origdir= s:NetrwGetcwd(1)
+    exe 'keepjumps lcd '.fnameescape(b:netrw_curdir)
+"    call Decho("netrw_origdir<".netrw_origdir.">: lcd b:netrw_curdir<".fnameescape(b:netrw_curdir).">")
+"    call Decho("exe silent! !".g:netrw_local_mkdir.' '.shellescape(newdirname))
+    exe "silent! !".g:netrw_local_mkdir.' '.shellescape(newdirname,1)
+    if !g:netrw_keepdir
+     exe 'keepjumps lcd '.fnameescape(netrw_origdir)
+"     call Decho("netrw_keepdir=".g:netrw_keepdir.": keepjumps lcd ".fnameescape(netrw_origdir)." getcwd<".getcwd().">")
+    endif
+   endif
 
-  if exists("b:netrw_method")
-"   call Decho("setting w:netrw_method<".b:netrw_method.">")
-   let w:netrw_method= b:netrw_method
-  endif
+   if v:shell_error == 0
+    " refresh listing
+"    call Decho("refresh listing")
+    let svpos= netrw#NetrwSavePosn()
+    call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./'))
+    call netrw#NetrwRestorePosn(svpos)
+   elseif !exists("g:netrw_quiet")
+    call netrw#ErrorMsg(s:ERROR,"unable to make directory<".newdirname.">",26)
+   endif
+"   redraw!
 
-  if s:method == "ftp"
-   " use ftp to get remote file listing
-"   call Decho("use ftp to get remote file listing")
-   let s:method  = "ftp"
-   let listcmd = g:netrw_ftp_list_cmd
-   if g:netrw_sort_by =~ '^t'
-    let listcmd= g:netrw_ftp_timelist_cmd
-   elseif g:netrw_sort_by =~ '^s'
-    let listcmd= g:netrw_ftp_sizelist_cmd
+  elseif !exists("b:netrw_method") || b:netrw_method == 4
+   " Remote mkdir:
+"   call Decho("remote mkdir")
+   let mkdircmd  = s:MakeSshCmd(g:netrw_mkdir_cmd)
+   let newdirname= substitute(b:netrw_curdir,'^\%(.\{-}/\)\{3}\(.*\)$','\1','').newdirname
+"   call Decho("exe silent! !".mkdircmd." ".shellescape(newdirname))
+   exe "silent! !".mkdircmd." ".shellescape(newdirname,1)
+   if v:shell_error == 0
+    " refresh listing
+    let svpos= netrw#NetrwSavePosn()
+    call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./'))
+    call netrw#NetrwRestorePosn(svpos)
+   elseif !exists("g:netrw_quiet")
+    call netrw#ErrorMsg(s:ERROR,"unable to make directory<".newdirname.">",27)
    endif
-"   call Decho("listcmd<".listcmd."> (using g:netrw_ftp_list_cmd)")
-   call s:NetBrowseFtpCmd(s:path,listcmd)
-"   exe "keepjumps ".w:netrw_bannercnt.',$g/^./call Decho("raw listing: ".getline("."))'
+"   redraw!
 
-   if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:WIDELIST || w:netrw_liststyle == s:TREELIST
-    " shorten the listing
-"    call Decho("generate short listing")
-    exe "keepjumps ".w:netrw_bannercnt
+  elseif b:netrw_method == 2
+   " COMBAK -- future work
+   call netrw#ErrorMsg(s:ERROR,"making directories via ftp not currently supported",68)
+  elseif b:netrw_method == 3
+   " COMBAK -- future work
+   call netrw#ErrorMsg(s:ERROR,"making directories via ftp not currently supported",68)
+  endif
+
+"  call Dret("NetrwMakeDir")
+endfun
 
-    " cleanup
-    if g:netrw_ftp_browse_reject != ""
-     exe "silent! g/".g:netrw_ftp_browse_reject."/keepjumps d"
+" ---------------------------------------------------------------------
+" s:NetrwMarkFile: (invoked by mf) This function is used to both {{{2
+"                  mark and unmark files.  If a markfile list exists,
+"                  then the rename and delete functions will use it instead
+"                  of whatever may happen to be under the cursor at that
+"                  moment.  When the mouse and gui are available,
+"                  shift-leftmouse may also be used to mark files.
+fun! s:NetrwMarkFile(islocal,fname)
+"  call Dfunc("s:NetrwMarkFile(islocal=".a:islocal." fname<".a:fname.">)")
+  let curbufnr= bufnr("%")
+  let curdir  = b:netrw_curdir
+  if exists("s:netrwmarkfilelist_{curbufnr}")
+   " markfile list exists
+"   call Decho("starting s:netrwmarkfilelist_{curbufnr}<".string(s:netrwmarkfilelist_{curbufnr}).">")
+"   call Decho("starting s:netrwmarkfilemtch_{curbufnr}<".s:netrwmarkfilemtch_{curbufnr}.">")
+
+   if index(s:netrwmarkfilelist_{curbufnr},a:fname) == -1
+    " append filename to local-directory markfilelist
+"    call Decho("append filename<".a:fname."> to local markfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">")
+    call add(s:netrwmarkfilelist_{curbufnr},a:fname)
+    let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.'\|\<'.escape(a:fname,g:netrw_markfileesc."'".g:netrw_markfileesc."'").'\>'
+
+   else
+    " remove filename from local markfilelist
+"    call Decho("remove filename<".a:fname."> from local markfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">")
+    call filter(s:netrwmarkfilelist_{curbufnr},'v:val != a:fname')
+    if s:netrwmarkfilelist_{curbufnr} == []
+     " local markfilelist is empty; remove it entirely
+"     call Decho("markfile list now empty, unlet s:netrwmarkfilelist_".curbufnr." and ...mtch_".curbufnr)
+     call s:NetrwUnmarkList(curbufnr,curdir)
+    else
+     " rebuild match list to display markings correctly
+"     call Decho("rebuild s:netrwmarkfilemtch_".curbufnr)
+     let s:netrwmarkfilemtch_{curbufnr}= ""
+     let first                           = 1
+     for fname in s:netrwmarkfilelist_{curbufnr}
+      if first
+       let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.'\<'.escape(fname,g:netrw_markfileesc."'".g:netrw_markfileesc."'").'\>'
+      else
+       let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.'\|\<'.escape(fname,g:netrw_markfileesc."'".g:netrw_markfileesc."'").'\>'
+      endif
+      let first= 0
+     endfor
+"     call Decho("ending s:netrwmarkfilelist_"curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">")
+"     call Decho("ending s:netrwmarkfilemtch_"curbufnr."<".s:netrwmarkfilemtch_{curbufnr}.">")
     endif
-    silent! keepjumps %s/\r$//e
+   endif
 
-    " if there's no ../ listed, then put ./ and ../ in
-    let line1= line(".")
-    exe "keepjumps ".w:netrw_bannercnt
-    let line2= search('^\.\.\/\%(\s\|$\)','cnW')
-    if line2 == 0
-"     call Decho("netrw is putting ./ and ../ into listing")
-     keepjumps put='../'
-     keepjumps put='./'
-    endif
-    exe "keepjumps ".line1
-    keepjumps norm! 0
+  else
+   " initialize new markfilelist
 
-"    call Decho("line1=".line1." line2=".line2." line(.)=".line("."))
-    if search('^\d\{2}-\d\{2}-\d\{2}\s','n') " M$ ftp site cleanup
-"     call Decho("M$ ftp cleanup")
-     exe 'silent! keepjumps '.w:netrw_bannercnt.',$s/^\d\{2}-\d\{2}-\d\{2}\s\+\d\+:\d\+[AaPp][Mm]\s\+\%(<DIR>\|\d\+\)\s\+//'
-    else " normal ftp cleanup
-"     call Decho("normal ftp cleanup")
-     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
+"   call Decho("add fname<".a:fname."> to new markfilelist_".curbufnr)
+   let s:netrwmarkfilelist_{curbufnr}= []
+   call add(s:netrwmarkfilelist_{curbufnr},a:fname)
+"   call Decho("ending s:netrwmarkfilelist_{curbufnr}<".string(s:netrwmarkfilelist_{curbufnr}).">")
+
+   " build initial markfile matching pattern
+   if a:fname =~ '/$'
+    let s:netrwmarkfilemtch_{curbufnr}= '\<'.escape(a:fname,g:netrw_markfileesc)
+   else
+    let s:netrwmarkfilemtch_{curbufnr}= '\<'.escape(a:fname,g:netrw_markfileesc).'\>'
    endif
+"   call Decho("ending s:netrwmarkfilemtch_".curbufnr."<".s:netrwmarkfilemtch_{curbufnr}.">")
+  endif
 
-  else
-   " use ssh to get remote file listing {{{3
-"   call Decho("use ssh to get remote file listing: s:netrw_shq<".g:netrw_shq."> s:path<".s:path."> s:netrw_cd_escape<".s:netrw_cd_escape.">")
-   let listcmd= s:MakeSshCmd(g:netrw_list_cmd)
-"   call Decho("listcmd<".listcmd."> (using g:netrw_list_cmd)")
-   if g:netrw_scp_cmd =~ '^pscp'
-"    call Decho("1: exe silent r! ".listcmd.g:netrw_shq.s:path.g:netrw_shq)
-    exe "silent r! ".listcmd.g:netrw_shq.s:path.g:netrw_shq
-    " remove rubbish and adjust listing format of 'pscp' to 'ssh ls -FLa' like
-    g/^Listing directory/d
-    g/^d[-rwx][-rwx][-rwx]/s+$+/+e
-    silent g/^l[-rwx][-rwx][-rwx]/s+$+@+e
-    if g:netrw_liststyle != s:LONGLIST 
-     g/^[dlsp-][-rwx][-rwx][-rwx]/s/^.*\s\(\S\+\)$/\1/e
-    endif
+  " handle global markfilelist
+  if exists("s:netrwmarkfilelist")
+   let dname= s:ComposePath(b:netrw_curdir,a:fname)
+   if index(s:netrwmarkfilelist,dname) == -1
+    " append new filename to global markfilelist
+    call add(s:netrwmarkfilelist,s:ComposePath(b:netrw_curdir,a:fname))
+"    call Decho("append filename<".a:fname."> to global markfilelist<".string(s:netrwmarkfilelist).">")
    else
-    if s:path == ""
-"     call Decho("2: exe silent r! ".listcmd)
-     exe "silent r! ".listcmd
-    else
-"     call Decho("3: exe silent r! ".listcmd." ".g:netrw_shq.s:path.g:netrw_shq)
-     exe "silent r! ".listcmd." ".g:netrw_shq.s:path.g:netrw_shq
+    " remove new filename from global markfilelist
+"    call Decho("filter(".string(s:netrwmarkfilelist).",'v:val != '.".dname.")")
+    call filter(s:netrwmarkfilelist,'v:val != "'.dname.'"')
+"    call Decho("ending s:netrwmarkfilelist  <".string(s:netrwmarkfilelist).">")
+    if s:netrwmarkfilelist == []
+     unlet s:netrwmarkfilelist
     endif
    endif
+  else
+   " initialize new global-directory markfilelist
+   let s:netrwmarkfilelist= []
+   call add(s:netrwmarkfilelist,s:ComposePath(b:netrw_curdir,a:fname))
+"   call Decho("init s:netrwmarkfilelist<".string(s:netrwmarkfilelist).">")
+  endif
 
-   " cleanup
-   if g:netrw_ftp_browse_reject != ""
-"    call Decho("(cleanup) exe silent! g/".g:netrw_ssh_browse_reject."/keepjumps d")
-    exe "silent! g/".g:netrw_ssh_browse_reject."/keepjumps d"
-   endif
+  " set up 2match'ing to netrwmarkfilemtch list
+  if exists("s:netrwmarkfilemtch_{curbufnr}") && s:netrwmarkfilemtch_{curbufnr} != ""
+"   call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{curbufnr}."/")
+   exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{curbufnr}."/"
+  else
+"   call Decho("2match none")
+   2match none
   endif
+"  call Dret("s:NetrwMarkFile : netrwmarkfilelist_".curbufnr."<".(exists("s:netrwmarkfilelist_{curbufnr}")? string(s:netrwmarkfilelist_{curbufnr}) : " doesn't exist").">")
+endfun
 
-  if w:netrw_liststyle == s:LONGLIST
-   " do a long listing; these substitutions need to be done prior to sorting {{{3
-"   call Decho("fix long listing:")
+" ---------------------------------------------------------------------
+" s:NetrwMarkFileCompress: (invoked by mz) This function is used to {{{2
+"                          compress/decompress files using the programs
+"                          in g:netrw_compress and g:netrw_uncompress,
+"                          using g:netrw_compress_suffix to know which to
+"                          do.  By default:
+"                            g:netrw_compress        = "gzip"
+"                            g:netrw_decompress      = { ".gz" : "gunzip" , ".bz2" : "bunzip2" , ".zip" : "unzip" , ".tar" : "tar -xf"}
+fun! s:NetrwMarkFileCompress(islocal)
+"  call Dfunc("s:NetrwMarkFileCompress(islocal=".a:islocal.")")
+  let svpos    = netrw#NetrwSavePosn()
+  let curdir   = b:netrw_curdir
+  let curbufnr = bufnr("%")
 
-   if s:method == "ftp"
-    " cleanup
-    exe "keepjumps ".w:netrw_bannercnt
-    while getline(".") =~ g:netrw_ftp_browse_reject
-     keepjumps d
-    endwhile
-    " if there's no ../ listed, then put ./ and ../ in
-    let line1= line(".")
-    keepjumps 1
-    silent keepjumps call search('^\.\.\/\%(\s\|$\)','W')
-    let line2= line(".")
-    if line2 == 0
-     exe 'keepjumps '.w:netrw_bannercnt."put='./'"
-     if b:netrw_curdir != '/'
-      exe 'keepjumps '.w:netrw_bannercnt."put='../'"
+  if exists("s:netrwmarkfilelist_{curbufnr}") && exists("g:netrw_compress") && exists("g:netrw_decompress")
+   for fname in s:netrwmarkfilelist_{curbufnr}
+    " for every filename in the marked list
+    for sfx in sort(keys(g:netrw_decompress))
+     if fname =~ '\'.sfx.'$'
+      " fname has a suffix indicating that its compressed; apply associated decompression routine
+      let exe= g:netrw_decompress[sfx]
+"      call Decho("fname<".fname."> is compressed so decompress with <".exe.">")
+      if a:islocal
+       if g:netrw_keepdir
+        let fname= shellescape(s:ComposePath(curdir,fname))
+       endif
+      else
+       let fname= shellescape(b:netrw_curdir.fname,1)
+      endif
+      if executable(exe)
+       if a:islocal
+	call system(exe." ".fname)
+       else
+        call s:RemoteSystem(exe." ".fname)
+       endif
+      else
+       call netrw#ErrorMsg(s:WARNING,"unable to apply<".exe."> to file<".fname.">",50)
+      endif
+      break
      endif
+    endfor
+    if exists("exe")
+     unlet exe
+    elseif a:islocal
+     " fname not a compressed file, so compress it
+     call system(g:netrw_compress." ".shellescape(s:ComposePath(b:netrw_curdir,fname)))
+    else
+     " fname not a compressed file, so compress it
+     call s:RemoteSystem(g:netrw_compress." ".shellescape(fname))
     endif
-   exe "keepjumps ".line1
-   keepjumps norm! 0
-   endif
-
-   if search('^\d\{2}-\d\{2}-\d\{2}\s','n') " M$ ftp site cleanup
-"    call Decho("M$ ftp site listing cleanup")
-    exe 'silent! keepjumps '.w:netrw_bannercnt.',$s/^\(\d\{2}-\d\{2}-\d\{2}\s\+\d\+:\d\+[AaPp][Mm]\s\+\%(<DIR>\|\d\+\)\s\+\)\(\w.*\)$/\2\t\1/'
-   elseif exists("w:netrw_bannercnt") && w:netrw_bannercnt <= line("$")
-"    call Decho("normal ftp site listing cleanup: bannercnt=".w:netrw_bannercnt." line($)=".line("$"))
-    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
-  endif
-
-"  if exists("w:netrw_bannercnt") && w:netrw_bannercnt <= line("$") " Decho
-"   exe "keepjumps ".w:netrw_bannercnt.',$g/^./call Decho("listing: ".getline("."))'
-"  endif " Decho
-"  call Dret("s:RemoteListing")
+   endfor
+   call s:NetrwUnmarkList(curbufnr,curdir)
+   call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+   call netrw#NetrwRestorePosn(svpos)
+  endif
+"  call Dret("s:NetrwMarkFileCompress")
 endfun
 
 " ---------------------------------------------------------------------
-"  NetGetWord: it gets the directory named under the cursor {{{2
-fun! s:NetGetWord()
-"  call Dfunc("NetGetWord() line#".line(".")." liststyle=".g:netrw_liststyle." virtcol=".virtcol("."))
-  call s:UseBufWinVars()
-
-  " insure that w:netrw_liststyle is set up
-  if !exists("w:netrw_liststyle")
-   if exists("g:netrw_liststyle")
-    let w:netrw_liststyle= g:netrw_liststyle
+" s:NetrwMarkFileCopy: (invoked by mc) copy marked files to target {{{2
+"                      If no marked files, then set up directory as the
+"                      target.  Currently does not support copying entire
+"                      directories.  Uses the local-buffer marked file list.
+"                      Returns 1=success  (used by NetrwMarkFileMove())
+"                              0=failure
+fun! s:NetrwMarkFileCopy(islocal)
+"  call Dfunc("s:NetrwMarkFileCopy(islocal=".a:islocal.") target<".(exists("s:netrwmftgt")? s:netrwmftgt : '---').">")
+
+  " sanity checks
+  if !exists("s:netrwmarkfilelist_{bufnr('%')}") || empty(s:netrwmarkfilelist_{bufnr('%')})
+   call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66)
+"   call Dret("s:NetrwMarkFileCopy 0")
+   return 0
+  endif
+"  call Decho("sanity chk passed: s:netrwmarkfilelist_".bufnr('%')."<".string(s:netrwmarkfilelist_{bufnr('%')}))
+  if !exists("s:netrwmftgt")
+   call netrw#ErrorMsg(2,"your marked file target is empty! (:help netrw-mt)",67)
+"   call Dret("s:NetrwMarkFileCopy 0")
+   return 0
+  endif
+"  call Decho("sanity chk passed: s:netrwmftgt<".s:netrwmftgt.">")
+  let curdir   = b:netrw_curdir
+  let curbufnr = bufnr("%")
+
+  if      a:islocal &&  s:netrwmftgt_islocal
+   " Copy marked files, local directory to local directory
+"   call Decho("copy from local to local")
+   let args= join(map(copy(s:netrwmarkfilelist_{bufnr('%')}),"shellescape(b:netrw_curdir.\"/\".v:val)"))
+"   call Decho("system(".g:netrw_localcopycmd." ".args." ".shellescape(s:netrwmftgt).")")
+   call system(g:netrw_localcopycmd." ".args." ".shellescape(s:netrwmftgt))
+
+  elseif  a:islocal && !s:netrwmftgt_islocal
+   " Copy marked files, local directory to remote directory
+"   call Decho("copy from local to remote")
+   call s:NetrwUpload(s:netrwmarkfilelist_{bufnr('%')},s:netrwmftgt)
+
+  elseif !a:islocal &&  s:netrwmftgt_islocal
+"   call Decho("copy from remote to local")
+   call netrw#NetrwObtain(a:islocal,s:netrwmarkfilelist_{bufnr('%')},s:netrwmftgt)
+
+  elseif !a:islocal && !s:netrwmftgt_islocal
+"   call Decho("copy from remote to remote")
+   let curdir = getcwd()
+   let tmpdir = s:GetTempfile("")
+   if tmpdir !~ '/'
+    let tmpdir= curdir."/".tmpdir
+   endif
+   if exists("*mkdir")
+    call mkdir(tmpdir)
    else
-    let w:netrw_liststyle= s:THINLIST
+    exe "silent! !".g:netrw_local_mkdir.' '.shellescape(tmpdir,1)
+   endif
+   if isdirectory(tmpdir)
+    exe "keepjumps lcd ".fnameescape(tmpdir)
+    call netrw#NetrwObtain(a:islocal,s:netrwmarkfilelist_{bufnr('%')},tmpdir)
+    let localfiles= map(copy(s:netrwmarkfilelist_{bufnr('%')}),'substitute(v:val,"^.*/","","")')
+    call s:NetrwUpload(localfiles,s:netrwmftgt)
+    if getcwd() == tmpdir
+     for fname in s:netrwmarkfilelist_{bufnr('%')}
+      call s:System("delete",fname)
+     endfor
+     exe "keepjumps lcd ".fnameescape(curdir)
+     exe "silent !".g:netrw_local_rmdir." ".shellescape(tmpdir,1)
+    else
+     exe "keepjumps lcd ".fnameescape(curdir)
+    endif
    endif
-"   call Decho("w:netrw_liststyle=".w:netrw_liststyle)
   endif
 
-  if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt
-   " Active Banner support
-"   call Decho("active banner handling")
-   norm! 0
-   let dirname= "./"
-   let curline= getline(".")
+  " -------
+  " cleanup
+  " -------
+"  call Decho("cleanup")
 
-   if curline =~ '"\s*Sorted by\s'
-    norm s
-    let s:netrw_skipbrowse= 1
-    echo 'Pressing "s" also works'
+  " remove markings from local buffer
+  call s:NetrwUnmarkList(curbufnr,curdir)
 
-   elseif curline =~ '"\s*Sort sequence:'
-    let s:netrw_skipbrowse= 1
-    echo 'Press "S" to edit sorting sequence'
+  " refresh buffers
+  if !s:netrwmftgt_islocal
+   call s:NetrwRefreshDir(s:netrwmftgt_islocal,s:netrwmftgt)
+  endif
+  if a:islocal
+   call s:NetrwRefreshDir(a:islocal,b:netrw_curdir)
+  endif
+  call s:LocalBrowseShellCmdRefresh()
+  
+"  call Dret("s:NetrwMarkFileCopy 1")
+  return 1
+endfun
 
-   elseif curline =~ '"\s*Quick Help:'
-    norm ?
-    let s:netrw_skipbrowse= 1
-    echo 'Pressing "?" also works'
+" ---------------------------------------------------------------------
+" s:NetrwMarkFileDiff: (invoked by md) This function is used to {{{2
+"                      invoke vim's diff mode on the marked files.
+"                      Either two or three files can be so handled.
+"                      Uses the global marked file list.
+fun! s:NetrwMarkFileDiff(islocal)
+"  call Dfunc("s:NetrwMarkFileDiff(islocal=".a:islocal.") b:netrw_curdir<".b:netrw_curdir.">")
+  let curbufnr= bufnr("%")
+  if exists("s:netrwmarkfilelist_{curbufnr}")
 
-   elseif curline =~ '"\s*\%(Hiding\|Showing\):'
-    norm a
-    let s:netrw_skipbrowse= 1
-    echo 'Pressing "a" also works'
+   let cnt    = 0
+   let curdir = b:netrw_curdir
+   for fname in s:netrwmarkfilelist
+    let cnt= cnt + 1
+    if !a:islocal
+     let fname= curdir.fname
+    endif
+    if cnt == 1
+"     call Decho("diffthis: ".fname)
+     exe "e ".fnameescape(fname)
+     diffthis
+    elseif cnt == 2 || cnt == 3
+     vsplit
+     wincmd l
+"     call Decho("diffthis: ".fname)
+     exe "e ".fnameescape(fname)
+     diffthis
+    else
+     break
+    endif
+   endfor
+   call s:NetrwUnmarkList(curbufnr,curdir)
+  endif
+"  call Dret("s:NetrwMarkFileDiff")
+endfun
 
-   elseif line("$") > w:netrw_bannercnt
-    exe 'silent keepjumps '.w:netrw_bannercnt
-   endif
+" ---------------------------------------------------------------------
+" s:NetrwMarkFileEdit: (invoked by me) put marked files on arg list and start editing them {{{2
+"                       Uses global markfilelist
+fun! s:NetrwMarkFileEdit(islocal)
+"  call Dfunc("s:NetrwMarkFileEdit(islocal=".a:islocal.")")
 
-  elseif w:netrw_liststyle == s:THINLIST
-"   call Decho("thin column handling")
-   norm! 0
-   let dirname= getline(".")
+  let curdir   = b:netrw_curdir
+  let curbufnr = bufnr("%")
+  if exists("s:netrwmarkfilelist_{curbufnr}")
+   call s:SetRexDir(a:islocal,curdir)
+   let flist= join(map(deepcopy(s:netrwmarkfilelist), "fnameescape(v:val)"))
+   " unmark markedfile list
+"   call s:NetrwUnmarkList(curbufnr,curdir)
+   call s:NetrwUnmarkAll()
+"   call Decho("exe silent args ".flist)
+   exe "silent args ".flist
+  endif
+  
+"  call Dret("s:NetrwMarkFileEdit")
+endfun
 
-  elseif w:netrw_liststyle == s:LONGLIST
-"   call Decho("long column handling")
-   norm! 0
-   let dirname= substitute(getline("."),'^\(\%(\S\+ \)*\S\+\).\{-}$','\1','e')
+" ---------------------------------------------------------------------
+" s:NetrwMarkFileExe: (invoked by mx) execute arbitrary command on marked files, one at a time {{{2
+"                     Uses the local marked-file list.
+fun! s:NetrwMarkFileExe(islocal)
+"  call Dfunc("s:NetrwMarkFileExe(islocal=".a:islocal.")")
+  let svpos    = netrw#NetrwSavePosn()
+  let curdir   = b:netrw_curdir
+  let curbufnr = bufnr("%")
 
-  elseif w:netrw_liststyle == s:TREELIST
-"   call Decho("treelist handling")
-   let dirname= substitute(getline("."),'^\(| \)*','','e')
+  if exists("s:netrwmarkfilelist_{curbufnr}")
+   " get the command
+   call inputsave()
+   let cmd= input("Enter command: ","","file")
+   call inputrestore()
+"   call Decho("cmd<".cmd.">")
 
-  else
-"   call Decho("obtain word from wide listing")
-   let dirname= getline(".")
+   " apply command to marked files.  Substitute: filename -> %
+   " If no %, then append a space and the filename to the command
+   for fname in s:netrwmarkfilelist_{curbufnr}
+    if a:islocal
+     if g:netrw_keepdir
+      let fname= shellescape(s:ComposePath(curdir,fname))
+     endif
+    else
+     let fname= shellescape(b:netrw_curdir.fname)
+    endif
+    if cmd =~ '%'
+     let xcmd= substitute(cmd,'%',fname,'g')
+    else
+     let xcmd= cmd.' '.fname
+    endif
+    if a:islocal
+"     call Decho("local: xcmd<".xcmd.">")
+     let ret= system(xcmd)
+    else
+"     call Decho("remote: xcmd<".xcmd.">")
+     let ret= s:RemoteSystem(xcmd)
+    endif
+    if v:shell_error < 0
+     call netrw#ErrorMsg(s:ERROR,"command<".xcmd."> failed, aborting",54)
+     break
+    else
+     echo ret
+    endif
+   endfor
 
-   if !exists("b:netrw_cpf")
-    let b:netrw_cpf= 0
-    exe 'silent keepjumps '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif'
-"    call Decho("computed cpf")
-   endif
+   " unmark marked file list
+   call s:NetrwUnmarkList(curbufnr,curdir)
 
-"   call Decho("buf#".bufnr("%")."<".bufname("%").">")
-   let filestart = (virtcol(".")/b:netrw_cpf)*b:netrw_cpf
-"   call Decho("filestart= ([virtcol=".virtcol(".")."]/[b:netrw_cpf=".b:netrw_cpf."])*b:netrw_cpf=".filestart."  bannercnt=".w:netrw_bannercnt)
-"   call Decho("1: dirname<".dirname.">")
-   if filestart > 0|let dirname= substitute(dirname,'^.\{'.filestart.'}','','')|endif
-"   call Decho("2: dirname<".dirname.">")
-   let dirname   = substitute(dirname,'^\(.\{'.b:netrw_cpf.'}\).*$','\1','e')
-"   call Decho("3: dirname<".dirname.">")
-   let dirname   = substitute(dirname,'\s\+$','','e')
-"   call Decho("4: dirname<".dirname.">")
+   " refresh the listing
+   call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+   call netrw#NetrwRestorePosn(svpos)
+  else
+   call netrw#ErrorMsg(s:ERROR,"no files marked!",59)
   endif
-
-"  call Dret("NetGetWord <".dirname.">")
-  return dirname
+  
+"  call Dret("s:NetrwMarkFileExe")
 endfun
 
 " ---------------------------------------------------------------------
-" NetBrowseRm: remove/delete a remote file or directory {{{2
-fun! s:NetBrowseRm(usrhost,path) range
-"  call Dfunc("NetBrowseRm(usrhost<".a:usrhost."> path<".a:path.">) virtcol=".virtcol("."))
-"  call Decho("firstline=".a:firstline." lastline=".a:lastline)
+" s:NetrwMarkHideSfx: (invoked by mh) (un)hide files having same suffix
+"                  as the marked file(s) (toggles suffix presence)
+"                  Uses the local marked file list.
+fun! s:NetrwMarkHideSfx(islocal)
+"  call Dfunc("s:NetrwMarkHideSfx(islocal=".a:islocal.")")
+  let svpos    = netrw#NetrwSavePosn()
+  let curbufnr = bufnr("%")
 
-  " preparation for removing multiple files/directories
-  let ctr= a:firstline
-  let all= 0
+  " s:netrwmarkfilelist_{curbufnr}: the List of marked files
+  if exists("s:netrwmarkfilelist_{curbufnr}")
 
-  " remove multiple files and directories
-  while ctr <= a:lastline
-   exe ctr
-
-   let rmfile= s:NetGetWord()
-"   call Decho("rmfile<".rmfile.">")
-
-   if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '[\/]$')
-    " attempt to remove file
-"    call Decho("attempt to remove file")
-    if !all
-     echohl Statement
-     call inputsave()
-     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"
+   for fname in s:netrwmarkfilelist_{curbufnr}
+"     call Decho("s:NetrwMarkFileCopy: fname<".fname.">")
+     " construct suffix pattern
+     if fname =~ '\.'
+      let sfxpat= "^.*".substitute(fname,'^.*\(\.[^. ]\+\)$','\1','')
+     else
+      let sfxpat= '^\%(\%(\.\)\@!.\)*$'
      endif
-     let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e')
-     if ok =~ 'a\%[ll]'
-      let all= 1
+     " determine if its in the hiding list or not
+     let inhidelist= 0
+     if g:netrw_list_hide != ""
+      let itemnum = 0
+      let hidelist= split(g:netrw_list_hide,',')
+      for hidepat in hidelist
+       if sfxpat == hidepat
+        let inhidelist= 1
+        break
+       endif
+       let itemnum= itemnum + 1
+      endfor
      endif
-    endif
-
-    if all || ok =~ 'y\%[es]' || ok == ""
-     if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3)
-      silent! keepjumps .,$d
-      call s:NetBrowseFtpCmd(a:path,"delete ".rmfile)
+"     call Decho("fname<".fname."> inhidelist=".inhidelist." sfxpat<".sfxpat.">")
+     if inhidelist
+      " remove sfxpat from list
+      call remove(hidelist,itemnum)
+      let g:netrw_list_hide= join(hidelist,",")
+     elseif g:netrw_list_hide != ""
+      " append sfxpat to non-empty list
+      let g:netrw_list_hide= g:netrw_list_hide.",".sfxpat
      else
-      let netrw_rm_cmd= s:MakeSshCmd(g:netrw_rm_cmd)
-"      call Decho("attempt to remove file: system(".netrw_rm_cmd.")")
-      let ret= s:System("system",netrw_rm_cmd)
-"      call Decho("returned=".ret." errcode=".v:shell_error)
+      " set hiding list to sfxpat
+      let g:netrw_list_hide= sfxpat
      endif
-    elseif ok =~ 'q\%[uit]'
-     break
-    endif
+    endfor
 
-   else
-    " attempt to remove directory
-"    call Decho("attempt to remove directory")
-    if !all
-     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
-     endif
-    endif
+   " refresh the listing
+   call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+   call netrw#NetrwRestorePosn(svpos)
+  else
+   call netrw#ErrorMsg(s:ERROR,"no files marked!",59)
+  endif
 
-    if all || ok =~ 'y\%[es]' || ok == ""
-     if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3)
-      call s:NetBrowseFtpCmd(a:path,"rmdir ".rmfile)
-     else
-      let rmfile          = substitute(a:path.rmfile,'/$','','')
-      let netrw_rmdir_cmd = s:MakeSshCmd(g:netrw_rmdir_cmd).' '.rmfile
-"      call Decho("attempt to remove dir: system(".netrw_rmdir_cmd.")")
-      let ret= s:System("system",netrw_rmdir_cmd)
-"      call Decho("returned=".ret." errcode=".v:shell_error)
+"  call Dret("s:NetrwMarkHideSfx")
+endfun
 
-      if v:shell_error != 0
-"       call Decho("v:shell_error not 0")
-       let netrw_rmf_cmd= s:MakeSshCmd(g:netrw_rmf_cmd).' '.substitute(rmfile,'[\/]$','','e')
-"       call Decho("2nd attempt to remove dir: system(".netrw_rmf_cmd.")")
-       let ret= s:System("system",netrw_rmf_cmd)
-"       call Decho("returned=".ret." errcode=".v:shell_error)
+" ---------------------------------------------------------------------
+" s:NetrwMarkFileGrep: (invoked by mg) This function applies vimgrep to marked files {{{2
+"                     Uses the global markfilelist
+fun! s:NetrwMarkFileGrep(islocal)
+"  call Dfunc("s:NetrwMarkFileGrep(islocal=".a:islocal.")")
+  let svpos    = netrw#NetrwSavePosn()
+  let curdir   = b:netrw_curdir
+  let curbufnr = bufnr("%")
 
-       if v:shell_error != 0 && !exists("g:netrw_quiet")
-       	call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",22)
-       endif
-      endif
-     endif
+  if exists("s:netrwmarkfilelist")
+"  call Decho("s:netrwmarkfilelist".string(s:netrwmarkfilelist).">")
+   let netrwmarkfilelist= join(map(deepcopy(s:netrwmarkfilelist), "fnameescape(v:val)"))
+   call s:NetrwUnmarkAll()
 
-    elseif ok =~ 'q\%[uit]'
-     break
+   " ask user for pattern
+   call inputsave()
+   let pat= input("Enter pattern: ","")
+   call inputrestore()
+   if pat !~ '^\s'
+    if pat !~ '^/'
+     let pat= '/'.pat.'/'
     endif
+    let pat= " ".pat
    endif
 
-   let ctr= ctr + 1
-  endwhile
+   " use vimgrep for both local and remote
+"   call Decho("exe vimgrep".pat." ".netrwmarkfilelist)
+   exe "vimgrep".pat." ".netrwmarkfilelist
 
-  " refresh the (remote) directory listing
-"  call Decho("refresh remote directory listing")
-  call netrw#NetSavePosn()
-  call s:NetRefresh(0,s:NetBrowseChgDir(0,'./'))
+   2match none
+   call netrw#NetrwRestorePosn(svpos)
+  endif
 
-"  call Dret("NetBrowseRm")
+"  call Dret("s:NetrwMarkFileGrep")
 endfun
 
 " ---------------------------------------------------------------------
-" NetBrowseRename: rename a remote file or directory {{{2
-fun! s:NetBrowseRename(usrhost,path) range
-"  call Dfunc("NetBrowseRename(usrhost<".a:usrhost."> path<".a:path.">)")
+" s:NetrwMarkFileMove: (invoked by mm) execute arbitrary command on marked files, one at a time {{{2
+"                      uses the global marked file list
+"                      s:netrwmfloc= 0: target directory is remote
+"                                  = 1: target directory is local
+fun! s:NetrwMarkFileMove(islocal)
+"  call Dfunc("s:NetrwMarkFileMove(islocal=".a:islocal.")")
+  let curdir   = b:netrw_curdir
+  let curbufnr = bufnr("%")
 
-  " preparation for removing multiple files/directories
-  let ctr        = a:firstline
-  let rename_cmd = s:MakeSshCmd(g:netrw_rename_cmd)
+  " sanity check
+  if !exists("s:netrwmarkfilelist_{bufnr('%')}") || empty(s:netrwmarkfilelist_{bufnr('%')})
+   call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66)
+"   call Dret("s:NetrwMarkFileMove")
+   return
+  endif
+"  call Decho("sanity chk passed: s:netrwmarkfilelist_".bufnr('%')."<".string(s:netrwmarkfilelist_{bufnr('%')}))
+  if !exists("s:netrwmftgt")
+   call netrw#ErrorMsg(2,"your marked file target is empty! (:help netrw-mt)",67)
+"   call Dret("s:NetrwMarkFileCopy 0")
+   return 0
+  endif
+"  call Decho("sanity chk passed: s:netrwmftgt<".s:netrwmftgt.">")
+
+  if      a:islocal &&  s:netrwmftgt_islocal
+   " move: local -> local
+"   call Decho("move from local to local")
+"   call Decho("(s:NetrwMarkFileMove) local to local move")
+   if executable(g:netrw_localmovecmd)
+    for fname in s:netrwmarkfilelist_{bufnr("%")}
+"     call Decho("system(".g:netrw_localmovecmd." ".shellescape(fname)." ".shellescape(s:netrwmftgt).")")
+     let ret= system(g:netrw_localmovecmd." ".shellescape(fname)." ".shellescape(s:netrwmftgt))
+     if v:shell_error < 0
+      call netrw#ErrorMsg(s:ERROR,"command<".g:netrw_localmovecmd."> failed, aborting",54)
+      break
+     endif
+    endfor
+   else
+    call netrw#ErrorMsg(s:ERROR,"command<".g:netrw_localmovecmd."> is not executable!",57)
+   endif
 
-  " attempt to rename files/directories
-  while ctr <= a:lastline
-   exe "keepjumps ".ctr
+  elseif  a:islocal && !s:netrwmftgt_islocal
+   " move: local -> remote
+"   call Decho("move from local to remote")
+"   call Decho("copy")
+   let mflist= s:netrwmarkfilelist_{bufnr("%")}
+   call s:NetrwMarkFileCopy(a:islocal)
+"   call Decho("remove")
+   for fname in mflist
+    let barefname = substitute(fname,'^\(.*/\)\(.\{-}\)$','\2','')
+    let ok        = s:NetrwLocalRmFile(b:netrw_curdir,barefname,1)
+   endfor
+   unlet mflist
 
-   norm! 0
-   let oldname= s:NetGetWord()
-"   call Decho("oldname<".oldname.">")
+  elseif !a:islocal &&  s:netrwmftgt_islocal
+   " move: remote -> local
+"   call Decho("move from remote to local")
+"   call Decho("copy")
+   let mflist= s:netrwmarkfilelist_{bufnr("%")}
+   call s:NetrwMarkFileCopy(a:islocal)
+"   call Decho("remove")
+   for fname in mflist
+    let barefname = substitute(fname,'^\(.*/\)\(.\{-}\)$','\2','')
+    let ok        = s:NetrwRemoteRmFile(b:netrw_curdir,barefname,1)
+   endfor
+   unlet mflist
 
-   call inputsave()
-   let newname= input("Moving ".oldname." to : ",oldname)
-   call inputrestore()
+  elseif !a:islocal && !s:netrwmftgt_islocal
+   " move: remote -> remote
+"   call Decho("move from remote to remote")
+"   call Decho("copy")
+   let mflist= s:netrwmarkfilelist_{bufnr("%")}
+   call s:NetrwMarkFileCopy(a:islocal)
+"   call Decho("remove")
+   for fname in mflist
+    let barefname = substitute(fname,'^\(.*/\)\(.\{-}\)$','\2','')
+    let ok        = s:NetrwRemoteRmFile(b:netrw_curdir,barefname,1)
+   endfor
+   unlet mflist
+  endif
 
-   if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3)
-    call s:NetBrowseFtpCmd(a:path,"rename ".oldname." ".newname)
-   else
-    let oldname= a:path.oldname
-    let newname= a:path.newname
-"    call Decho("system(rename_cmd".' "'.escape(oldname," ").'" "'.escape(newname,s:netrw_cd_escape).'"')
-    let ret= s:System("system",rename_cmd.' "'.escape(oldname,s:netrw_cd_escape).'" "'.escape(newname,s:netrw_cd_escape).'"')
-   endif
+  " -------
+  " cleanup
+  " -------
+"  call Decho("cleanup")
 
-   let ctr= ctr + 1
-  endwhile
+  " remove markings from local buffer
+  call s:NetrwUnmarkList(curbufnr,curdir)                   " remove markings from local buffer
 
-  " refresh the directory
-  let curline= line(".")
-  call s:NetBrowse(0,s:NetBrowseChgDir(0,'./'))
-  exe "keepjumps ".curline
-"  call Dret("NetBrowseRename")
+  " refresh buffers
+  if !s:netrwmftgt_islocal
+   call s:NetrwRefreshDir(s:netrwmftgt_islocal,s:netrwmftgt)
+  endif
+  if a:islocal
+   call s:NetrwRefreshDir(a:islocal,b:netrw_curdir)
+  endif
+  call s:LocalBrowseShellCmdRefresh()
+  
+"  call Dret("s:NetrwMarkFileMove")
 endfun
 
 " ---------------------------------------------------------------------
-" NetRefresh: {{{2
-fun! s:NetRefresh(islocal,dirname)
-"  call Dfunc("NetRefresh(islocal<".a:islocal.">,dirname=".a:dirname.") hide=".g:netrw_hide." sortdir=".g:netrw_sort_direction)
-  " at the current time (Mar 19, 2007) all calls to NetRefresh() call NetBrowseChgDir() first.
-  " NetBrowseChgDir() may clear the display; hence a NetSavePosn() may not work if its placed here.
-  " Also, NetBrowseChgDir() now does a NetSavePosn() itself.
-  setlocal ma noro
-"  call Decho("clear buffer<".expand("%")."> with :%d")
-  %d
-  if a:islocal
-   call netrw#LocalBrowseCheck(a:dirname)
-  else
-   call s:NetBrowse(a:islocal,a:dirname)
+" s:NetrwMarkFilePrint: (invoked by mp) This function prints marked files {{{2
+"                       using the hardcopy command.  Local marked-file list only.
+fun! s:NetrwMarkFilePrint(islocal)
+"  call Dfunc("s:NetrwMarkFilePrint(islocal=".a:islocal.")")
+  let curbufnr= bufnr("%")
+  if exists("s:netrwmarkfilelist_{curbufnr}")
+   let netrwmarkfilelist = s:netrwmarkfilelist_{curbufnr}
+   let curdir            = b:netrw_curdir
+   call s:NetrwUnmarkList(curbufnr,curdir)
+   for fname in netrwmarkfilelist
+    if a:islocal
+     if g:netrw_keepdir
+      let fname= s:ComposePath(curdir,fname)
+     endif
+    else
+     let fname= curdir.fname
+    endif
+    1split
+    " the autocmds will handle both local and remote files
+"    call Decho("exe silent e ".escape(fname,' '))
+    exe "silent e ".fnameescape(fname)
+"    call Decho("hardcopy")
+    hardcopy
+    q
+   endfor
+   2match none
   endif
-  call netrw#NetRestorePosn()
-  redraw!
-"  call Dret("NetRefresh")
+"  call Dret("s:NetrwMarkFilePrint")
 endfun
 
 " ---------------------------------------------------------------------
-" NetSplit: mode {{{2
-"           =0 : net   and o
-"           =1 : net   and t
-"           =2 : net   and v
-"           =3 : local and o
-"           =4 : local and t
-"           =5 : local and v
-fun! s:NetSplit(mode)
-"  call Dfunc("NetSplit(mode=".a:mode.") alto=".g:netrw_alto." altv=".g:netrw_altv)
-
-  call s:SaveWinVars()
+" s:NetrwMarkFileRegexp: (invoked by mr) This function is used to mark {{{2
+"                        files when given a regexp (for which a prompt is
+"                        issued).
+fun! s:NetrwMarkFileRegexp(islocal)
+"  call Dfunc("s:NetrwMarkFileRegexp(islocal=".a:islocal.")")
 
-  if a:mode == 0
-   " remote and o
-   exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s"
-   let s:didsplit= 1
-   call s:RestoreWinVars()
-   call s:NetBrowse(0,s:NetBrowseChgDir(0,s:NetGetWord()))
-   unlet s:didsplit
+  " get the regular expression
+  call inputsave()
+  let regexp= input("Enter regexp: ","","file")
+  call inputrestore()
 
-  elseif a:mode == 1
-   " remote and t
-   let cursorword  = s:NetGetWord()
-   tabnew
-   let s:didsplit= 1
-   call s:RestoreWinVars()
-   call s:NetBrowse(0,s:NetBrowseChgDir(0,cursorword))
-   unlet s:didsplit
+  if a:islocal
+   " get the matching list of files using local glob()
+"   call Decho("handle local regexp")
+   let dirname  = escape(b:netrw_curdir,g:netrw_glob_escape)
+   let filelist = glob(s:ComposePath(dirname,regexp))
+   if filelist != ""
+    let filelist= filelist."\n"
+   endif
 
-  elseif a:mode == 2
-   " remote and v
-   exe (g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v"
-   let s:didsplit= 1
-   call s:RestoreWinVars()
-   call s:NetBrowse(0,s:NetBrowseChgDir(0,s:NetGetWord()))
-   unlet s:didsplit
+  " mark the list of files
+  while filelist != ""
+   if filelist =~ '\n'
+    let filename = substitute(filelist,'\n.*$','','e')
+    let filelist = substitute(filelist,'^.\{-}\n\(.*\)$','\1','e')
+   else
+    let filename = filelist
+    let filelist = ""
+   endif
+"   call Decho("filelist<".filelist.">")
+"   call Decho("filename<".filename.">")
+   call s:NetrwMarkFile(a:islocal,substitute(filename,'^.*/','',''))
+  endwhile
 
-  elseif a:mode == 3
-   " local and o
-   exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s"
-   let s:didsplit= 1
-   call s:RestoreWinVars()
-   call netrw#LocalBrowseCheck(s:NetBrowseChgDir(1,s:NetGetWord()))
-   unlet s:didsplit
+  else
+"   call Decho("handle remote regexp")
 
-  elseif a:mode == 4
-   " local and t
-   let netrw_curdir= b:netrw_curdir
-   let cursorword  = s:NetGetWord()
-   tabnew
-   let b:netrw_curdir= netrw_curdir
-   let s:didsplit= 1
-   call s:RestoreWinVars()
-   call netrw#LocalBrowseCheck(s:NetBrowseChgDir(1,cursorword))
-   unlet s:didsplit
+   " convert displayed listing into a filelist
+   let eikeep = &ei
+   let areg   = @a
+   silent %y a
+   set ei=all ma
+"   call Decho("set ei=all ma")
+   1split
+   enew
+   silent norm! "ap
+   2
+   let bannercnt= search('^" =====','W')
+   exe "silent 1,".bannercnt."d"
+   set bt=nofile
+   if     g:netrw_liststyle == s:LONGLIST
+    silent %s/\s\{2,}\S.*$//e
+   elseif g:netrw_liststyle == s:WIDELIST
+    silent %s/\s\{2,}/\r/ge
+   elseif g:netrw_liststyle == s:TREELIST
+    silent %s/^| //e
+    silent! g/^ .*$/d
+   endif
+   " convert regexp into the more usual glob-style format
+   let regexp= substitute(regexp,'\*','.*','g')
+"   call Decho("regexp<".regexp.">")
+   exe "silent! v/".escape(regexp,'/')."/d"
+   let filelist= getline(1,line("$"))
+   q!
+   for filename in filelist
+    call s:NetrwMarkFile(a:islocal,substitute(filename,'^.*/','',''))
+   endfor
+   unlet filelist
+   let @a  = areg
+   let &ei = eikeep
+  endif
 
-  elseif a:mode == 5
-   " local and v
-   exe (g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v"
-   let s:didsplit= 1
-   call s:RestoreWinVars()
-   call netrw#LocalBrowseCheck(s:NetBrowseChgDir(1,s:NetGetWord()))
-   unlet s:didsplit
+"  call Dret("s:NetrwMarkFileRegexp")
+endfun
 
-  else
-   call netrw#ErrorMsg(s:ERROR,"(NetSplit) unsupported mode=".a:mode,45)
+" ---------------------------------------------------------------------
+" s:NetrwMarkFileSource: (invoked by ms) This function sources marked files {{{2
+"                        Uses the local marked file list.
+fun! s:NetrwMarkFileSource(islocal)
+"  call Dfunc("s:NetrwMarkFileSource(islocal=".a:islocal.")")
+  let curbufnr= bufnr("%")
+  if exists("s:netrwmarkfilelist_{curbufnr}")
+   let netrwmarkfilelist = s:netrwmarkfilelist_{bufnr("%")}
+   let curdir            = b:netrw_curdir
+   call s:NetrwUnmarkList(curbufnr,curdir)
+   for fname in netrwmarkfilelist
+    if a:islocal
+     if g:netrw_keepdir
+      let fname= s:ComposePath(curdir,fname)
+     endif
+    else
+     let fname= curdir.fname
+    endif
+    " the autocmds will handle sourcing both local and remote files
+"    call Decho("exe so ".escape(fname,' '))
+    exe "so ".fnameescape(fname)
+   endfor
+   2match none
   endif
-
-"  call Dret("NetSplit")
+"  call Dret("s:NetrwMarkFileSource")
 endfun
 
 " ---------------------------------------------------------------------
-" NetBrowseX:  allows users to write custom functions to operate on {{{2
-"              files given their extension.  Passes 0=local, 1=remote
-fun! netrw#NetBrowseX(fname,remote)
-"  call Dfunc("NetBrowseX(fname<".a:fname."> remote=".a:remote.")")
+" s:NetrwMarkFileTag: (invoked by mT) This function applies g:netrw_ctags to marked files {{{2
+"                     Uses the global markfilelist
+fun! s:NetrwMarkFileTag(islocal)
+"  call Dfunc("s:NetrwMarkFileTag(islocal=".a:islocal.")")
+  let svpos    = netrw#NetrwSavePosn()
+  let curdir   = b:netrw_curdir
+  let curbufnr = bufnr("%")
 
-  " set up the filename
-  " (lower case the extension, make a local copy of a remote file)
-  let exten= substitute(a:fname,'.*\.\(.\{-}\)','\1','e')
-  if has("win32") || has("win95") || has("win64") || has("win16")
-   let exten= substitute(exten,'^.*$','\L&\E','')
-  endif
-  let fname= escape(a:fname,"%#")
-"  call Decho("fname<".fname."> after escape()")
+  if exists("s:netrwmarkfilelist")
+"   call Decho("s:netrwmarkfilelist".string(s:netrwmarkfilelist).">")
+   let netrwmarkfilelist= join(map(deepcopy(s:netrwmarkfilelist), "shellescape(v:val,".!a:islocal.")"))
+   call s:NetrwUnmarkAll()
 
-  " 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 "kdeinit" running, though...  (tnx Mikolaj Machowski)
-  if !exists("s:haskdeinit")
-   if has("unix")
-    let s:haskdeinit= s:System("system",'ps -e') =~ 'kdeinit'
-    if v:shell_error
-     let s:haskdeinit = 0
+   if a:islocal
+    if executable(g:netrw_ctags)
+"     call Decho("call system(".g:netrw_ctags." ".netrwmarkfilelist.")")
+     call system(g:netrw_ctags." ".netrwmarkfilelist)
+    else
+     call netrw#ErrorMsg(s:ERROR,"g:netrw_ctags<".g:netrw_ctags."> is not executable!",51)
     endif
    else
-    let s:haskdeinit= 0
+    let cmd= s:RemoteSystem(g:netrw_ctags." ".netrwmarkfilelist)
+    call netrw#NetrwObtain(a:islocal,"tags")
+    let curdir= b:netrw_curdir
+    1split
+    e tags
+    let path= substitute(curdir,'^\(.*\)/[^/]*$','\1/','')
+"    call Decho("curdir<".curdir."> path<".path.">")
+    exe '%s/\t\(\S\+\)\t/\t'.escape(path,'/\n\r\\').'\1\t/e'
+    wq!
+   endif
+   2match none
+   call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+   call netrw#NetrwRestorePosn(svpos)
+  endif
+
+"  call Dret("s:NetrwMarkFileTag")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMarkFileTgt:  (invoked by mt) This function sets up a marked file target {{{2
+"   Sets up two variables, 
+"     s:netrwmftgt : holds the target directory
+"     s:netrwmftgt_islocal : 0=target directory is remote
+"                    1=target directory is local
+fun! s:NetrwMarkFileTgt(islocal)
+"  call Dfunc("s:NetrwMarkFileTgt(islocal=".a:islocal.")")
+  let svpos  = netrw#NetrwSavePosn()
+  let curdir = b:netrw_curdir
+  let hadtgt = exists("s:netrwmftgt")
+  if !exists("w:netrw_bannercnt")
+   let w:netrw_bannercnt= b:netrw_bannercnt
+  endif
+
+  " set up target
+  if line(".") < w:netrw_bannercnt
+   " if cursor in banner region, use b:netrw_curdir for the target
+   let s:netrwmftgt= b:netrw_curdir
+"   call Decho("inbanner: s:netrwmftgt<".s:netrwmftgt.">")
+
+  else
+   " get word under cursor.
+   "  * If directory, use it for the target.
+   "  * If file, use b:netrw_curdir for the target
+   let curword= s:NetrwGetWord()
+   let tgtdir = s:ComposePath(curdir,curword)
+   if a:islocal && isdirectory(tgtdir)
+    let s:netrwmftgt = tgtdir
+"    call Decho("local isdir: s:netrwmftgt<".s:netrwmftgt.">")
+   elseif !a:islocal && tgtdir =~ '/$'
+    let s:netrwmftgt = tgtdir
+"    call Decho("remote isdir: s:netrwmftgt<".s:netrwmftgt.">")
+   else
+    let s:netrwmftgt = curdir
+"    call Decho("isfile: s:netrwmftgt<".s:netrwmftgt.">")
    endif
-"   call Decho("setting s:haskdeinit=".s:haskdeinit)
   endif
+  if a:islocal
+   " simplify the target (eg. /abc/def/../ghi -> /abc/ghi)
+   let s:netrwmftgt= simplify(s:netrwmftgt)
+"   call Decho("simplify: s:netrwmftgt<".s:netrwmftgt.">")
+  endif
+  if g:netrw_cygwin
+   let s:netrwmftgt= substitute(system("cygpath ".shellescape(s:netrwmftgt)),'\n$','','')
+   let s:netrwmftgt= substitute(s:netrwmftgt,'\n$','','')
+  endif
+  let s:netrwmftgt_islocal= a:islocal
 
-  if a:remote == 1
-   " create a local copy
-   let fname= fnamemodify(tempname(),":t:r").".".exten
-"   call Decho("a:remote=".a:remote.": create a local copy of <".a:fname."> as <".fname.">")
-   exe "silent keepjumps bot 1new ".a:fname
-   setlocal bh=delete
-"   call Decho("exe w! ".fname)
-   exe "w! ".fname
-   q
+  if g:netrw_fastbrowse > 0
+   call s:LocalBrowseShellCmdRefresh()
+  endif
+  call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+  call netrw#NetrwRestorePosn(svpos)
+  if !hadtgt
+   norm! j
   endif
-"  call Decho("exten<".exten."> "."netrwFileHandlers#NFH_".exten."():exists=".exists("*netrwFileHandlers#NFH_".exten))
 
-  " set up redirection
-  if &srr =~ "%s"
-   let redir= substitute(&srr,"%s","/dev/null","")
-  else
-   let redir= &srr . "/dev/null"
+"  call Dret("s:NetrwMarkFileTgt : netrwmftgt<".(exists("s:netrwmftgt")? s:netrwmftgt : "").">")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwUnmarkList: delete local marked file lists and remove their contents from the global marked-file list {{{2
+fun! s:NetrwUnmarkList(curbufnr,curdir)
+"  call Dfunc("s:NetrwUnmarkList(curbufnr=".a:curbufnr." curdir<".a:curdir.">)")
+
+  "  remove all files in local marked-file list from global list
+  if exists("s:netrwmarkfilelist_{a:curbufnr}")
+   for mfile in s:netrwmarkfilelist_{a:curbufnr}
+    let dfile = s:ComposePath(a:curdir,mfile)       " prepend directory to mfile
+    let idx   = index(s:netrwmarkfilelist,dfile)    " get index in list of dfile
+    call remove(s:netrwmarkfilelist,idx)            " remove from global list
+   endfor
+   if s:netrwmarkfilelist == []
+    unlet s:netrwmarkfilelist
+   endif
+ 
+   " getting rid of the local marked-file lists is easy
+   unlet s:netrwmarkfilelist_{a:curbufnr}
   endif
-"  call Decho("redir{".redir."} srr{".&srr."}")
+  if exists("s:netrwmarkfilemtch_{a:curbufnr}")
+   unlet s:netrwmarkfilemtch_{a:curbufnr}
+  endif
+  2match none
+"  call Dret("s:NetrwUnmarkList")
+endfun
 
-  " execute the file handler
-  if exists("g:netrw_browsex_viewer") && g:netrw_browsex_viewer == '-'
-"  call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">")
-   let ret= netrwFileHandlers#Invoke(exten,fname)
+" ---------------------------------------------------------------------
+" s:NetrwUnmarkAll: remove the global marked file list and all local ones {{{2
+fun! s:NetrwUnmarkAll()
+"  call Dfunc("s:NetrwUnmarkAll()")
+  if exists("s:netrwmarkfilelist")
+   unlet s:netrwmarkfilelist
+  endif
+  silent call s:NetrwUnmarkAll2()
+  2match none
+"  call Dret("s:NetrwUnmarkAll")
+endfun
 
-  elseif exists("g:netrw_browsex_viewer") && executable(g:netrw_browsex_viewer)
-"   call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">")
-"   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
+" ---------------------------------------------------------------------
+" s:NetrwUnmarkAll2: {{{2
+fun! s:NetrwUnmarkAll2()
+"  call Dfunc("s:NetrwUnmarkAll2()")
+  redir => netrwmarkfilelist_let
+  let
+  redir END
+  let netrwmarkfilelist_list= split(netrwmarkfilelist_let,'\n')          " convert let string into a let list
+  call filter(netrwmarkfilelist_list,"v:val =~ '^s:netrwmarkfilelist_'") " retain only those vars that start as s:netrwmarkfilelist_ 
+  call map(netrwmarkfilelist_list,"substitute(v:val,'\\s.*$','','')")    " remove what the entries are equal to
+  for flist in netrwmarkfilelist_list
+   let curbufnr= substitute(flist,'s:netrwmarkfilelist_','','')
+   unlet s:netrwmarkfilelist_{curbufnr}
+   unlet s:netrwmarkfilemtch_{curbufnr}
+  endfor
+"  call Dret("s:NetrwUnmarkAll2")
+endfun
 
-  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, '%#').'"'
-   call inputsave()|call input("Press <cr> to continue")|call inputrestore()
-   let ret= v:shell_error
+" ---------------------------------------------------------------------
+" s:NetrwUnMarkFile: {{{2
+fun! s:NetrwUnMarkFile(islocal)
+"  call Dfunc("s:NetrwUnMarkFile(islocal=".a:islocal.")")
+  let svpos    = netrw#NetrwSavePosn()
+  let curbufnr = bufnr("%")
 
-  elseif has("unix") && executable("gnome-open") && !s:haskdeinit
-"   call Decho("exe silent !gnome-open '".escape(fname,'%#')."' ".redir)
-   exe "silent !gnome-open '".escape(fname,'%#')."'".redir
-   let ret= v:shell_error
+  " unmark marked file list (although I expect s:NetrwUpload()
+  " to do it, I'm just making sure)
+  if exists("s:netrwmarkfilelist_{bufnr('%')}")
+"   call Decho("unlet'ing: s:netrwmarkfile[list|mtch]_".bufnr("%"))
+   unlet s:netrwmarkfilelist
+   unlet s:netrwmarkfilelist_{curbufnr}
+   unlet s:netrwmarkfilemtch_{curbufnr}
+   2match none
+  endif
+
+"  call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+  call netrw#NetrwRestorePosn(svpos)
+"  call Dret("s:NetrwUnMarkFile")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMenu: generates the menu for gvim and netrw {{{2
+fun! s:NetrwMenu(domenu)
+
+  if !exists("g:NetrwMenuPriority")
+   let g:NetrwMenuPriority= 80
+  endif
+
+  if has("menu") && has("gui_running") && &go =~ 'm' && g:netrw_menu
+"   call Dfunc("NetrwMenu(domenu=".a:domenu.")")
+
+   if !exists("s:netrw_menu_enabled") && a:domenu
+"    call Decho("initialize menu")
+    let s:netrw_menu_enabled= 1
+    exe 'silent! menu '.g:NetrwMenuPriority.'.1     '.g:NetrwTopLvlMenu.'Help<tab><F1>	<F1>'
+    call s:NetrwBookmarkMenu() " provide some history!  uses priorities 2,3, reserves 4
+    exe 'silent! menu '.g:NetrwMenuPriority.'.5     '.g:NetrwTopLvlMenu.'-Sep1-	:'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.6     '.g:NetrwTopLvlMenu.'Go\ Up\ Directory<tab>-	-'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.7     '.g:NetrwTopLvlMenu.'Apply\ Special\ Viewer<tab>x	x'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.8.1   '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Current\ Directory<tab>mb	mb'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.8.2   '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Delete<tab>mB	mB'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.8.3   '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Goto\ Bookmark<tab>gb	gb'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.8.4   '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Goto\ Prev\ Dir\ (History)<tab>u	u'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.8.5   '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Goto\ Next\ Dir\ (History)<tab>U	U'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.8.6   '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.List<tab>qb	qb'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.9.1   '.g:NetrwTopLvlMenu.'Browsing\ Control.Edit\ File\ Hiding\ List<tab>'."<ctrl-h>	\<Plug>NetrwHideEdit"
+    exe 'silent! menu '.g:NetrwMenuPriority.'.9.2   '.g:NetrwTopLvlMenu.'Browsing\ Control.Edit\ Sorting\ Sequence<tab>S	S'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.9.3   '.g:NetrwTopLvlMenu.'Browsing\ Control.Quick\ Hide/Unhide\ Dot\ Files<tab>'."gh	gh"
+    exe 'silent! menu '.g:NetrwMenuPriority.'.9.4   '.g:NetrwTopLvlMenu.'Browsing\ Control.Refresh\ Listing<tab>'."<ctrl-l>	\<Plug>NetrwRefresh"
+    exe 'silent! menu '.g:NetrwMenuPriority.'.9.5   '.g:NetrwTopLvlMenu.'Browsing\ Control.Settings/Options<tab>:NetrwSettings	'.":NetrwSettings\<cr>"
+    exe 'silent! menu '.g:NetrwMenuPriority.'.10    '.g:NetrwTopLvlMenu.'Delete\ File/Directory<tab>D	D'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.11.1  '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ Current\ Window<tab><cr>	'."\<cr>"
+    exe 'silent! menu '.g:NetrwMenuPriority.'.11.2  '.g:NetrwTopLvlMenu.'Edit\ File/Dir.Preview\ File/Directory<tab>p	p'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.11.3  '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ Previous\ Window<tab>P	P'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.11.4  '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ New\ Window<tab>o	o'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.11.5  '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ New\ Vertical\ Window<tab>v	v'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.12.1  '.g:NetrwTopLvlMenu.'Explore.Directory\ Name	:Explore '
+    exe 'silent! menu '.g:NetrwMenuPriority.'.12.2  '.g:NetrwTopLvlMenu.'Explore.Filenames\ Matching\ Pattern\ (curdir\ only)<tab>:Explore\ */	:Explore */'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.12.2  '.g:NetrwTopLvlMenu.'Explore.Filenames\ Matching\ Pattern\ (+subdirs)<tab>:Explore\ **/	:Explore **/'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.12.3  '.g:NetrwTopLvlMenu.'Explore.Files\ Containing\ Pattern\ (curdir\ only)<tab>:Explore\ *//	:Explore *//'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.12.4  '.g:NetrwTopLvlMenu.'Explore.Files\ Containing\ Pattern\ (+subdirs)<tab>:Explore\ **//	:Explore **//'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.12.4  '.g:NetrwTopLvlMenu.'Explore.Next\ Match<tab>:Nexplore	:Nexplore<cr>'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.12.4  '.g:NetrwTopLvlMenu.'Explore.Prev\ Match<tab>:Pexplore	:Pexplore<cr>'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.13    '.g:NetrwTopLvlMenu.'Make\ Subdirectory<tab>d	d'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.14.1  '.g:NetrwTopLvlMenu.'Marked\ Files.Mark\ File<tab>mf	mf'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.14.2  '.g:NetrwTopLvlMenu.'Marked\ Files.Mark\ Files\ by\ Regexp<tab>mr	mr'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.14.3  '.g:NetrwTopLvlMenu.'Marked\ Files.Hide-Show-List\ Control<tab>a	a'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.14.4  '.g:NetrwTopLvlMenu.'Marked\ Files.Copy\ To\ Target<tab>mc	mc'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.14.5  '.g:NetrwTopLvlMenu.'Marked\ Files.Delete<tab>D	D'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.14.6  '.g:NetrwTopLvlMenu.'Marked\ Files.Diff<tab>md	md'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.14.7  '.g:NetrwTopLvlMenu.'Marked\ Files.Edit<tab>me	me'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.14.8  '.g:NetrwTopLvlMenu.'Marked\ Files.Exe\ Cmd<tab>mx	mx'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.14.9  '.g:NetrwTopLvlMenu.'Marked\ Files.Move\ To\ Target<tab>mm	mm'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.14.10 '.g:NetrwTopLvlMenu.'Marked\ Files.Obtain<tab>O	O'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.14.11 '.g:NetrwTopLvlMenu.'Marked\ Files.Print<tab>mp	mp'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.14.12 '.g:NetrwTopLvlMenu.'Marked\ Files.Replace<tab>R	R'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.14.13 '.g:NetrwTopLvlMenu.'Marked\ Files.Set\ Target<tab>mt	mt'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.14.14 '.g:NetrwTopLvlMenu.'Marked\ Files.Tag<tab>mT	mT'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.14.15 '.g:NetrwTopLvlMenu.'Marked\ Files.Zip/Unzip/Compress/Uncompress<tab>mz	mz'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.15    '.g:NetrwTopLvlMenu.'Obtain\ File<tab>O	O'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.16.1  '.g:NetrwTopLvlMenu.'Style.Listing\ Style\ (thin-long-wide-tree)<tab>i	i'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.16.2  '.g:NetrwTopLvlMenu.'Style.Normal-Hide-Show<tab>a	a'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.16.3  '.g:NetrwTopLvlMenu.'Style.Reverse\ Sorting\ Order<tab>'."r	r"
+    exe 'silent! menu '.g:NetrwMenuPriority.'.16.4  '.g:NetrwTopLvlMenu.'Style.Sorting\ Method\ (name-time-size)<tab>s	s'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.17    '.g:NetrwTopLvlMenu.'Rename\ File/Directory<tab>R	R'
+    exe 'silent! menu '.g:NetrwMenuPriority.'.18    '.g:NetrwTopLvlMenu.'Set\ Current\ Directory<tab>c	c'
+    let s:netrw_menucnt= 28
+
+   elseif !a:domenu
+    let s:netrwcnt = 0
+    let curwin     = winnr()
+    windo if getline(2) =~ "Netrw" | let s:netrwcnt= s:netrwcnt + 1 | endif
+    exe curwin."wincmd w"
+
+    if s:netrwcnt <= 1
+"     call Decho("clear menus")
+     exe 'silent! unmenu '.g:NetrwTopLvlMenu
+"     call Decho('exe silent! unmenu '.g:NetrwTopLvlMenu.'*')
+     silent! unlet s:netrw_menu_enabled
+    endif
+   endif
+"   call Dret("NetrwMenu")
+  endif
+
+endfun
 
-  elseif has("unix") && executable("kfmclient") && s:haskdeinit
-"   call Decho("exe silent !kfmclient exec '".escape(fname,'%#')."' ".redir)
-   exe "silent !kfmclient exec '".escape(fname,'%#')."' ".redir
-   let ret= v:shell_error
+" ---------------------------------------------------------------------
+" s:NetrwObtain: obtain file under cursor or from markfile list {{{2
+"                Used by the O maps (as <SID>NetrwObtain())
+fun! s:NetrwObtain(islocal)
+"  call Dfunc("NetrwObtain(islocal=".a:islocal.")")
 
+  if exists("s:netrwmarkfilelist_{bufnr('%')}")
+   let islocal= s:netrwmarkfilelist_{bufnr("%")}[1] !~ '^\a\+://'
+   call netrw#NetrwObtain(islocal,s:netrwmarkfilelist_{bufnr("%")})
+   call s:NetrwUnmarkList(bufnr('%'),b:netrw_curdir)
   else
-   " netrwFileHandlers#Invoke() always returns 0
-   let ret= netrwFileHandlers#Invoke(exten,fname)
+   call netrw#NetrwObtain(a:islocal,expand("<cWORD>"))
   endif
 
-  " if unsuccessful, attempt netrwFileHandlers#Invoke()
-  if ret
-   let ret= netrwFileHandlers#Invoke(exten,fname)
-  endif
+"  call Dret("NetrwObtain")
+endfun
 
-  redraw!
+" ---------------------------------------------------------------------
+" netrw#NetrwObtain: {{{2
+"   netrw#NetrwObtain(islocal,fname[,tgtdirectory])
+"     islocal=0  obtain from remote source
+"            =1  obtain from local source
+"     fname  :   a filename or a list of filenames
+"     tgtdir :   optional place where files are to go  (not present, uses getcwd())
+fun! netrw#NetrwObtain(islocal,fname,...)
+"  call Dfunc("netrw#NetrwObtain(islocal=".a:islocal." fname<".((type(a:fname) == 1)? a:fname : string(a:fname)).">) a:0=".a:0)
+  " NetrwStatusLine support - for obtaining support
 
-  " cleanup: remove temporary file,
-  "          delete current buffer if success with handler,
-  "          return to prior buffer (directory listing)
-  if a:remote == 1 && fname != a:fname
-"   call Decho("deleting temporary file<".fname.">")
-   call s:System("delete",fname)
+  if type(a:fname) == 1
+   let fnamelist= [ a:fname ]
+  elseif type(a:fname) == 3
+   let fnamelist= a:fname
+  else
+   call netrw#ErrorMsg(s:ERROR,"attempting to use NetrwObtain on something not a filename or a list",62)
+"   call Dret("netrw#NetrwObtain")
+   return
+  endif
+"  call Decho("fnamelist<".string(fnamelist).">")
+  if a:0 > 0
+   let tgtdir= a:1
+  else
+   let tgtdir= getcwd()
   endif
+"  call Decho("tgtdir<".tgtdir.">")
 
-  if a:remote == 1
-   setlocal bh=delete bt=nofile
-   if g:netrw_use_noswf
-    setlocal noswf
+  if a:islocal
+   " obtain a file from b:netrw_curdir to getcwd()
+"   call Decho("obtain a local file from ".b:netrw_curdir." to ".tgtdir
+   if exists("b:netrw_curdir") && getcwd() != b:netrw_curdir
+    let topath= s:ComposePath(tgtdir,"")
+    if (has("win32") || has("win95") || has("win64") || has("win16"))
+     " transfer files one at time
+     for fname in fnamelist
+"      call Decho("system(".g:netrw_localcopycmd." ".fname." ".shellescape(topath).")")
+      call system(g:netrw_localcopycmd." ".fname." ".shellescape(topath))
+     endfor
+    else
+     " transfer files with one command
+     let filelist= join(map(copy(fname),"shellescape(v:val)"))
+"     call Decho("system(".g:netrw_localcopycmd." ".filelist." ".shellescape(topath).")")
+     call system(g:netrw_localcopycmd." ".filelist." ".shellescape(topath))
+    endif
+   elseif !exists("b:netrw_curdir")
+    call netrw#ErrorMsg(s:ERROR,"local browsing directory doesn't exist!",36)
+   else
+    call netrw#ErrorMsg(s:WARNING,"local browsing directory and current directory are identical",37)
    endif
-   exe "norm! \<c-o>"
-   redraw!
-  endif
 
-"  call Dret("NetBrowseX")
-endfun
+  else
+"   call Decho("obtain a remote file from ".b:netrw_curdir." to ".tgtdir)
+   if type(a:fname) == 1
+    call s:SetupNetrwStatusLine('%f %h%m%r%=%9*Obtaining '.a:fname)
+   endif
+   call s:NetrwMethod(b:netrw_curdir)
 
-" ---------------------------------------------------------------------
-" NetBrowseFtpCmd: unfortunately, not all ftp servers honor options for ls {{{2
-"  This function assumes that a long listing will be received.  Size, time,
-"  and reverse sorts will be requested of the server but not otherwise
-"  enforced here.
-fun! s:NetBrowseFtpCmd(path,listcmd)
-"  call Dfunc("NetBrowseFtpCmd(path<".a:path."> listcmd<".a:listcmd.">) netrw_method=".w:netrw_method)
-"  call Decho("line($)=".line("$")." bannercnt=".w:netrw_bannercnt)
+   if b:netrw_method == 4
+    " obtain file using scp
+"    call Decho("obtain via scp (method#4)")
+    if exists("g:netrw_port") && g:netrw_port != ""
+     let useport= " ".g:netrw_scpport." ".g:netrw_port
+    else
+     let useport= ""
+    endif
+    if b:netrw_fname =~ '/'
+     let path= substitute(b:netrw_fname,'^\(.*/\).\{-}$','\1','')
+    else
+     let path= ""
+    endif
+    let filelist= join(map(copy(fnamelist),'shellescape(g:netrw_machine.":".path.v:val,1)'))
+"    call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".filelist." ".shellescape(tgtdir))
+    exe s:netrw_silentxfer."!".g:netrw_scp_cmd.shellescape(useport,1)." ".filelist." ".shellescape(tgtdir,1)
 
-  " because WinXX ftp uses unix style input
-  let ffkeep= &ff
-  setlocal ma ff=unix noro
+   elseif b:netrw_method == 2
+    " obtain file using ftp + .netrc
+"     call Decho("obtain via ftp+.netrc (method #2)")
+     call s:SaveBufVars()|silent keepjumps new|call s:RestoreBufVars()
+     let tmpbufnr= bufnr("%")
+     setlocal ff=unix
+     if exists("g:netrw_ftpmode") && g:netrw_ftpmode != ""
+      exe "put ='".g:netrw_ftpmode."'"
+"      call Decho("filter input: ".getline('$'))
+     endif
 
-  " clear off any older non-banner lines
-  " note that w:netrw_bannercnt indexes the line after the banner
-"  call Decho('exe silent! keepjumps '.w:netrw_bannercnt.",$d  (clear off old non-banner lines)")
-  exe "silent! keepjumps ".w:netrw_bannercnt.",$d"
+     if exists("b:netrw_fname") && b:netrw_fname != ""
+      call setline(line("$")+1,'cd "'.b:netrw_fname.'"')
+"      call Decho("filter input: ".getline('$'))
+     endif
 
-  ".........................................
-  if w:netrw_method == 2 || w:netrw_method == 5 
-   " ftp + <.netrc>:  Method #2
-   if a:path != ""
-    put ='cd \"'.a:path.'\"'
-   endif
-   if exists("g:netrw_ftpextracmd")
-    exe "put ='".g:netrw_ftpextracmd."'"
-"    call Decho("filter input: ".getline("."))
-   endif
-   exe "put ='".a:listcmd."'"
-"   exe w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."))'
-   if exists("g:netrw_port") && g:netrw_port != ""
-"    call Decho("exe ".g:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
-    exe g:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port
-   else
-"    call Decho("exe ".g:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine)
-    exe g:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine
-   endif
+     if exists("g:netrw_ftpextracmd")
+      exe "put ='".g:netrw_ftpextracmd."'"
+"      call Decho("filter input: ".getline('$'))
+     endif
+     for fname in fnamelist
+      call setline(line("$")+1,'get "'.fname.'"')
+"      call Decho("filter input: ".getline('$'))
+     endfor
+     if exists("g:netrw_port") && g:netrw_port != ""
+"      call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
+      exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)
+     else
+"      call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine)
+      exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)
+     endif
+     " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
+     if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying '
+      let debugkeep= &debug
+      setlocal debug=msg
+      call netrw#ErrorMsg(s:ERROR,getline(1),4)
+      let &debug= debugkeep
+     endif
 
-   ".........................................
-  elseif w:netrw_method == 3
-   " ftp + machine,id,passwd,filename:  Method #3
+   elseif b:netrw_method == 3
+    " obtain with ftp + machine, id, passwd, and fname (ie. no .netrc)
+"    call Decho("obtain via ftp+mipf (method #3)")
+    call s:SaveBufVars()|silent keepjumps new|call s:RestoreBufVars()
+    let tmpbufnr= bufnr("%")
     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 ='\"'.s:netrw_passwd.'\"'
+"     call Decho("filter input: ".getline('$'))
     else
-     put ='user \"'.g:netrw_uid.'\" \"'.g:netrw_passwd.'\"'
+     put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
+"     call Decho("filter input: ".getline('$'))
     endif
 
-   if a:path != ""
-    put ='cd \"'.a:path.'\"'
-   endif
-   if exists("g:netrw_ftpextracmd")
-    exe "put ='".g:netrw_ftpextracmd."'"
-"    call Decho("filter input: ".getline("."))
-   endif
-   exe "put ='".a:listcmd."'"
+    if exists("g:netrw_ftpmode") && g:netrw_ftpmode != ""
+     put =g:netrw_ftpmode
+"     call Decho("filter input: ".getline('$'))
+    endif
+
+    if exists("b:netrw_fname") && b:netrw_fname != ""
+     call setline(line("$")+1,'cd "'.b:netrw_fname.'"')
+"     call Decho("filter input: ".getline('$'))
+    endif
+
+    if exists("g:netrw_ftpextracmd")
+     put =g:netrw_ftpextracmd
+"     call Decho("filter input: ".getline('$'))
+    endif
+
+    if exists("g:netrw_ftpextracmd")
+     exe "put ='".g:netrw_ftpextracmd."'"
+"     call Decho("filter input: ".getline('$'))
+    endif
+    for fname in fnamelist
+     call setline(line("$")+1,'get "'.fname.'"')
+    endfor
+"    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
-"    exe w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."))'
-"    call Decho("exe ".g:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i -n")
-    exe g:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i -n"
+    norm! 1Gdd
+"    call Decho("executing: %!".g:netrw_ftp_cmd." -i -n")
+    exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n"
+    " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
+    if getline(1) !~ "^$"
+"     call Decho("error<".getline(1).">")
+     if !exists("g:netrw_quiet")
+      call netrw#ErrorMsg(s:ERROR,getline(1),5)
+     endif
+    endif
+   endif
 
-   ".........................................
-  else
-   call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",23)
   endif
 
-  " cleanup for Windows
-  if has("win32") || has("win95") || has("win64") || has("win16")
-   silent! keepjumps %s/\r$//e
+  " cleanup
+  if exists("tmpbufnr")
+   if bufnr("%") != tmpbufnr
+    exe tmpbufnr."bw!"
+   else
+    q!
+   endif
   endif
-  if a:listcmd == "dir"
-   " infer directory/link based on the file permission string
-   silent! keepjumps g/d\%([-r][-w][-x]\)\{3}/s@$@/@
-   silent! keepjumps g/l\%([-r][-w][-x]\)\{3}/s/$/@/
-   if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:WIDELIST || w:netrw_liststyle == s:TREELIST
-    exe "silent! keepjumps ".w:netrw_bannercnt.',$s/^\%(\S\+\s\+\)\{8}//e'
+
+"  call Dret("netrw#NetrwObtain")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwPrevWinOpen: open file/directory in previous window.  {{{2
+"   If there's only one window, then the window will first be split.
+"   Returns:
+"     choice = 0 : didn't have to choose
+"     choice = 1 : saved modified file in window first
+"     choice = 2 : didn't save modified file, opened window
+"     choice = 3 : cancel open
+fun! s:NetrwPrevWinOpen(islocal)
+"  call Dfunc("NetrwPrevWinOpen(islocal=".a:islocal.")")
+
+  " grab a copy of the b:netrw_curdir to pass it along to newly split windows
+  let curdir    = b:netrw_curdir
+
+  " get last window number and the word currently under the cursor
+  let lastwinnr = winnr("$")
+  let curword   = s:NetrwGetWord()
+  let choice    = 0
+"  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.")")
+   if g:netrw_preview
+"    call Decho("exe ".(g:netrw_alto? "top " : "bot ")."vert ".g:netrw_winsize."wincmd s")
+    exe (g:netrw_alto? "top " : "bot ")."vert ".g:netrw_winsize."wincmd s"
+   else
+"    call Decho("exe ".(g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s")
+    exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s"
+   endif
+   let didsplit  = 1
+
+  else
+   call s:SaveBufVars()
+"   call Decho("wincmd p")
+   wincmd p
+   call s:RestoreBufVars()
+   " 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
+"    call Decho("detected: prev window's buffer has been modified: bnr=".bnr." winnr#".winnr())
+    let eikeep= &ei
+    set ei=all
+    windo if winbufnr(0) == bnr | let bnrcnt=bnrcnt+1 | endif
+    exe bnr."wincmd p"
+    let &ei= eikeep
+"    call Decho("bnr=".bnr." bnrcnt=".bnrcnt." buftype=".&bt." winnr#".winnr())
+    if bnrcnt == 1
+     let bufname= bufname(winbufnr(winnr()))
+     let choice= confirm("Save modified file<".bufname.">?","&Yes\n&No\n&Cancel")
+"     call Decho("bufname<".bufname."> choice=".choice." winnr#".winnr())
+
+     if choice == 1
+      " Yes -- write file & then browse
+      let v:errmsg= ""
+      silent w
+      if v:errmsg != ""
+       call netrw#ErrorMsg(s:ERROR,"unable to write <".bufname.">!",30)
+       if didsplit
+       	q
+       else
+       	wincmd p
+       endif
+"       call Dret("NetrwPrevWinOpen ".choice." : unable to write <".bufname.">")
+       return choice
+      endif
+
+     elseif choice == 2
+      " No -- don't worry about changed file, just browse anyway
+      setlocal nomod
+      call netrw#ErrorMsg(s:WARNING,bufname." changes to ".bufname." abandoned",31)
+      wincmd p
+
+     else
+      " Cancel -- don't do this
+      if didsplit
+       q
+      else
+       wincmd p
+      endif
+"      call Dret("NetrwPrevWinOpen ".choice." : cancelled")
+      return choice
+     endif
+    endif
    endif
   endif
 
-  " ftp's listing doesn't seem to include ./ or ../
-  if !search('^\.\/$\|\s\.\/$','wn')
-   exe 'keepjumps '.w:netrw_bannercnt
-   put ='./'
+  " restore b:netrw_curdir (window split/enew may have lost it)
+  let b:netrw_curdir= curdir
+  if a:islocal < 2
+   if a:islocal
+    call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(a:islocal,curword))
+   else
+    call s:NetrwBrowse(a:islocal,s:NetrwBrowseChgDir(a:islocal,curword))
+   endif
   endif
-  if !search('^\.\.\/$\|\s\.\.\/$','wn')
-   exe 'keepjumps '.w:netrw_bannercnt
-   put ='../'
+"  call Dret("NetrwPrevWinOpen ".choice)
+  return choice
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwUpload: load fname to tgt (used by NetrwMarkFileCopy()) {{{2
+"                Always assumed to be local -> remote
+"                call s:NetrwUpload(filename, target)
+"                call s:NetrwUpload(filename, target, fromdirectory)
+fun! s:NetrwUpload(fname,tgt,...)
+"  call Dfunc("s:NetrwUpload(fname<".((type(a:fname) == 1)? a:fname : string(a:fname))."> tgt<".a:tgt.">) a:0=".a:0)
+
+  if a:tgt =~ '^\a\+://'
+   let tgtdir= substitute(a:tgt,'^\a\+://[^/]\+/\(.\{-}\)$','\1','')
+  else
+   let tgtdir= substitute(a:tgt,'^\(.*\)/[^/]*$','\1','')
+  endif
+"  call Decho("tgtdir<".tgtdir.">")
+
+  if a:0 > 0
+   let fromdir= a:1
+  else
+   let fromdir= getcwd()
+  endif
+"  call Decho("fromdir<".fromdir.">")
+
+  if type(a:fname) == 1
+   " handle uploading a single file using NetWrite
+"   call Decho("handle uploading a single file via NetWrite")
+   1split
+"   call Decho("exe e ".efname)
+   exe "e ".fnameescape(a:fname)
+"   call Decho("now locally editing<".expand("%").">, has ".line("$")." lines")
+   if a:tgt =~ '/$'
+    let wfname= substitute(a:fname,'^.*/','','')
+"    call Decho("exe w! ".wfname)
+    exe "w! ".fnameescape(a:tgt.wfname)
+   else
+"    call Decho("writing local->remote: exe w ".wfname)
+    exe "w ".fnameescape(a:tgt)
+"    call Decho("done writing local->remote")
+   endif
+   q!
+
+  elseif type(a:fname) == 3
+   " handle uploading a list of files via scp
+"   call Decho("handle uploading a list of files via scp")
+   let curdir= getcwd()
+   if a:tgt =~ '^scp:'
+    exe "keepjumps silent lcd ".fnameescape(fromdir)
+    let filelist= copy(s:netrwmarkfilelist_{bufnr('%')})
+    let args    = join(map(filelist,"shellescape(v:val,1)"))
+    if exists("g:netrw_port") && g:netrw_port != ""
+     let useport= " ".g:netrw_scpport." ".g:netrw_port
+    else
+     let useport= ""
+    endif
+    let machine = substitute(a:tgt,'^scp://\([^/:]\+\).*$','\1','')
+    let tgt     = substitute(a:tgt,'^scp://[^/]\+/\(.*\)$','\1','')
+"    call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".args." ".shellescape(machine.":".escape(tgt,g:netrw_fname_escape)))
+    exe s:netrw_silentxfer."!".g:netrw_scp_cmd.shellescape(useport,1)." ".args." ".shellescape(machine.":".tgt,1)
+    exe "keepjumps silent lcd ".fnameescape(curdir)
+
+   elseif a:tgt =~ '^ftp:'
+    call s:NetrwMethod(a:tgt)
+
+    if b:netrw_method == 2
+     " handle uploading a list of files via ftp+.netrc
+     let netrw_fname = b:netrw_fname
+     silent keepjumps new
+"     call Decho("filter input window#".winnr())
+
+     put =g:netrw_ftpmode
+"     call Decho("filter input: ".getline('$'))
+
+     if exists("g:netrw_ftpextracmd")
+      put =g:netrw_ftpextracmd
+"      call Decho("filter input: ".getline('$'))
+     endif
+
+     call setline(line("$")+1,'lcd "'.fromdir.'"')
+"     call Decho("filter input: ".getline('$'))
+
+     call setline(line("$")+1,'cd "'.tgtdir.'"')
+"     call Decho("filter input: ".getline('$'))
+
+     for fname in a:fname
+      call setline(line("$")+1,'put "'.fname.'"')
+"      call Decho("filter input: ".getline('$'))
+     endfor
+
+     if exists("g:netrw_port") && g:netrw_port != ""
+"      call Decho("executing: ".s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
+      exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)
+     else
+"      call Decho("filter input window#".winnr())
+"      call Decho("executing: ".s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine)
+      exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)
+     endif
+     " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
+     silent g/Local directory now/d
+     if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying '
+      call netrw#ErrorMsg(s:ERROR,getline(1),14)
+     else
+      bw!|q
+     endif
+
+    elseif b:netrw_method == 3
+     " upload with ftp + machine, id, passwd, and fname (ie. no .netrc)
+     let netrw_fname= b:netrw_fname
+     call s:SaveBufVars()|silent keepjumps new|call s:RestoreBufVars()
+     let tmpbufnr= bufnr("%")
+     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
+"      call Decho("filter input: ".getline('$'))
+      call setline(line("$")+1,'"'.s:netrw_passwd.'"')
+"      call Decho("filter input: ".getline('$'))
+     else
+      put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
+"      call Decho("filter input: ".getline('$'))
+     endif
+
+     call setline(line("$")+1,'lcd "'.fromdir.'"')
+"     call Decho("filter input: ".getline('$'))
+
+     if exists("b:netrw_fname") && b:netrw_fname != ""
+      call setline(line("$")+1,'cd "'.b:netrw_fname.'"')
+"      call Decho("filter input: ".getline('$'))
+     endif
+
+     if exists("g:netrw_ftpextracmd")
+      put =g:netrw_ftpextracmd
+"      call Decho("filter input: ".getline('$'))
+     endif
+
+     for fname in a:fname
+      call setline(line("$")+1,'put "'.fname.'"')
+"      call Decho("filter input: ".getline('$'))
+     endfor
+
+     " 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
+     norm! 1Gdd
+"     call Decho("executing: ".s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n")
+     exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n"
+     " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
+     silent g/Local directory now/d
+     if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying '
+      let debugkeep= &debug
+      setlocal debug=msg
+      call netrw#ErrorMsg(s:ERROR,getline(1),15)
+      let &debug = debugkeep
+      let mod    = 1
+     else
+      bw!|q
+     endif
+    endif
+   else
+    call netrw#ErrorMsg(s:ERROR,"can't obtain files with protocol from<".a:tgt.">",63)
+   endif
   endif
 
-  " restore settings
-  let &ff= ffkeep
-"  call Dret("NetBrowseFtpCmd")
+"  call Dret("s:NetrwUpload")
 endfun
 
 " ---------------------------------------------------------------------
-" NetListHide: uses [range]g~...~d to delete files that match comma {{{2
-" separated patterns given in g:netrw_list_hide
-fun! s:NetListHide()
-"  call Dfunc("NetListHide() hide=".g:netrw_hide." listhide<".g:netrw_list_hide.">")
-
-  " find a character not in the "hide" string to use as a separator for :g and :v commands
-  " How-it-works: take the hiding command, convert it into a range.  Duplicate
-  " characters don't matter.  Remove all such characters from the '/~...90'
-  " string.  Use the first character left as a separator character.
-  let listhide= g:netrw_list_hide
-  let sep     = strpart(substitute('/~@#$%^&*{};:,<.>?|1234567890','['.escape(listhide,'-]^\').']','','ge'),1,1)
-"  call Decho("sep=".sep)
-
-  while listhide != ""
-   if listhide =~ ','
-    let hide     = substitute(listhide,',.*$','','e')
-    let listhide = substitute(listhide,'^.\{-},\(.*\)$','\1','e')
-   else
-    let hide     = listhide
-    let listhide= ""
-   endif
-
-   " Prune the list by hiding any files which match
-   if g:netrw_hide == 1
-"    call Decho("hiding<".hide."> listhide<".listhide.">")
-    exe 'silent keepjumps '.w:netrw_bannercnt.',$g'.sep.hide.sep.'d'
-   elseif g:netrw_hide == 2
-"    call Decho("showing<".hide."> listhide<".listhide.">")
-    exe 'silent keepjumps '.w:netrw_bannercnt.',$g'.sep.hide.sep.'s@^@ /-KEEP-/ @'
+" s:NetrwPreview: {{{2
+fun! s:NetrwPreview(path) range
+"  call Dfunc("NetrwPreview(path<".a:path.">)")
+  call s:NetrwOptionSave("s:")
+  call s:NetrwSafeOptions()
+  if has("quickfix")
+   if !isdirectory(a:path)
+    exe (g:netrw_preview? "vert " : "")."pedit ".fnameescape(a:path)
+   elseif !exists("g:netrw_quiet")
+    call netrw#ErrorMsg(s:WARNING,"sorry, cannot preview a directory such as <".a:path.">",38)
    endif
-  endwhile
-  if g:netrw_hide == 2
-   exe 'silent keepjumps '.w:netrw_bannercnt.',$v@^ /-KEEP-/ @d'
-   exe 'silent keepjumps '.w:netrw_bannercnt.',$s@^\%( /-KEEP-/ \)\+@@e'
+  elseif !exists("g:netrw_quiet")
+   call netrw#ErrorMsg(s:WARNING,"sorry, to preview your vim needs the quickfix feature compiled in",39)
   endif
-
-"  call Dret("NetListHide")
+  call s:NetrwOptionRestore("s:")
+"  call Dret("NetrwPreview")
 endfun
 
 " ---------------------------------------------------------------------
-" NetHideEdit: allows user to edit the file/directory hiding list
-fun! s:NetHideEdit(islocal)
-"  call Dfunc("NetHideEdit(islocal=".a:islocal.")")
-
-  " save current cursor position
-  let s:nhe_curpos= getpos(".")
-
-  " 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
-  silent call s:NetRefresh(a:islocal,s:NetBrowseChgDir(a:islocal,"./"))
+" s:NetrwRefresh: {{{2
+fun! s:NetrwRefresh(islocal,dirname)
+"  call Dfunc("NetrwRefresh(islocal<".a:islocal.">,dirname=".a:dirname.") hide=".g:netrw_hide." sortdir=".g:netrw_sort_direction)
+  " at the current time (Mar 19, 2007) all calls to NetrwRefresh() call NetrwBrowseChgDir() first.
+  " NetrwBrowseChgDir() may clear the display; hence a NetrwSavePosn() may not work if its placed here.
+  " Also, NetrwBrowseChgDir() now does a NetrwSavePosn() itself.
+  setlocal ma noro
+"  call Decho("setlocal ma noro")
+"  call Decho("clear buffer<".expand("%")."> with :%d")
+  %d
+  if a:islocal
+   call netrw#LocalBrowseCheck(a:dirname)
+  else
+   call s:NetrwBrowse(a:islocal,a:dirname)
+  endif
+  call netrw#NetrwRestorePosn()
 
-  " restore cursor position
-  call setpos('.',s:nhe_curpos)
-  unlet s:nhe_curpos
+  " restore file marks
+  if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != ""
+"   call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/")
+   exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/"
+  else
+"   call Decho("2match none")
+   2match none
+  endif
 
-"  call Dret("NetHideEdit")
+"  redraw!
+"  call Dret("NetrwRefresh")
 endfun
 
 " ---------------------------------------------------------------------
-" NetSortSequence: allows user to edit the sorting sequence
-fun! s:NetSortSequence(islocal)
-"  call Dfunc("NetSortSequence(islocal=".a:islocal.")")
+" s:NetrwRefreshDir: refreshes a directory by name {{{2
+"                    Called by NetrwMarkFileCopy()
+"                    Interfaces to s:NetrwRefresh() and s:LocalBrowseShellCmdRefresh()
+fun! s:NetrwRefreshDir(islocal,dirname)
+"  call Dfunc("s:NetrwRefreshDir(islocal=".a:islocal." dirname<".a:dirname.">) fastbrowse=".g:netrw_fastbrowse)
+  if g:netrw_fastbrowse == 0
+   " slowest mode (keep buffers refreshed, local or remote)
+"   call Decho("slowest mode: keep buffers refreshed, local or remote")
+   let tgtwin= bufwinnr(a:dirname)
+"   call Decho("tgtwin= bufwinnr(".a:dirname.")=".tgtwin)
 
-  call inputsave()
-  let newsortseq= input("Edit Sorting Sequence: ",g:netrw_sort_sequence)
-  call inputrestore()
+   if tgtwin > 0
+    " tgtwin is being displayed, so refresh it
+    let curwin= winnr()
+"    call Decho("refresh tgtwin#".tgtwin." (curwin#".curwin.")")
+    exe tgtwin."wincmd w"
+    call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) 
+    exe curwin."wincmd w"
 
-  " refresh the listing
-  let g:netrw_sort_sequence= newsortseq
-  call netrw#NetSavePosn()
-  call s:NetRefresh(a:islocal,s:NetBrowseChgDir(a:islocal,'./'))
+   elseif bufnr(a:dirname) > 0
+    let bn= bufnr(a:dirname)
+"    call Decho("bd bufnr(".a:dirname.")=".bn)
+    exe "silent bd ".bn
+   endif
 
-"  call Dret("NetSortSequence")
+  elseif g:netrw_fastbrowse <= 1
+"   call Decho("medium-speed mode: refresh local buffers only")
+   call s:LocalBrowseShellCmdRefresh()
+  endif
+"  call Dret("s:NetrwRefreshDir")
 endfun
 
 " ---------------------------------------------------------------------
-"  NetListStyle: {{{2
-"  islocal=0: remote browsing
-"         =1: local browsing
-fun! s:NetListStyle(islocal)
-"  call Dfunc("NetListStyle(islocal=".a:islocal.") w:netrw_liststyle=".w:netrw_liststyle)
-  let fname             = s:NetGetWord()
-  if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif
-  let w:netrw_liststyle = (w:netrw_liststyle + 1) % s:MAXLIST
-"  call Decho("fname<".fname.">")
-"  call Decho("chgd w:netrw_liststyle to ".w:netrw_liststyle)
-"  call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist").">")
+" s:NetrwSetSort: 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
+"          front.  An "*" pattern handles the default priority.
+fun! s:NetrwSetSort()
+"  call Dfunc("SetSort() bannercnt=".w:netrw_bannercnt)
+  if w:netrw_liststyle == s:LONGLIST
+   let seqlist  = substitute(g:netrw_sort_sequence,'\$','\\%(\t\\|\$\\)','ge')
+  else
+   let seqlist  = g:netrw_sort_sequence
+  endif
+  " sanity check -- insure that * appears somewhere
+  if seqlist == ""
+   let seqlist= '*'
+  elseif seqlist !~ '\*'
+   let seqlist= seqlist.',*'
+  endif
+  let priority = 1
+  while seqlist != ""
+   if seqlist =~ ','
+    let seq     = substitute(seqlist,',.*$','','e')
+    let seqlist = substitute(seqlist,'^.\{-},\(.*\)$','\1','e')
+   else
+    let seq     = seqlist
+    let seqlist = ""
+   endif
+   let sepchr= "\<Char-0xff>"
+   if priority < 10
+    let spriority= "00".priority.sepchr
+   elseif priority < 100
+    let spriority= "0".priority.sepchr
+   else
+    let spriority= priority.sepchr
+   endif
+"   call Decho("priority=".priority." spriority<".spriority."> seq<".seq."> seqlist<".seqlist.">")
 
-  if w:netrw_liststyle == s:THINLIST
-   " use one column listing
-"   call Decho("use one column list")
-   let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge')
+   " sanity check
+   if w:netrw_bannercnt > line("$")
+    " apparently no files were left after a Hiding pattern was used
+"    call Dret("SetSort : no files left after hiding")
+    return
+   endif
+   if seq == '*'
+    let starpriority= spriority
+   else
+    exe 'silent keepjumps '.w:netrw_bannercnt.',$g/'.seq.'/s/^/'.spriority.'/'
+    " sometimes multiple sorting patterns will match the same file or directory.
+    " The following substitute is intended to remove the excess matches.
+    exe 'silent keepjumps '.w:netrw_bannercnt.',$g/^\d\{3}'.sepchr.'\d\{3}\//s/^\d\{3}'.sepchr.'\(\d\{3}\/\).\@=/\1/e'
+   endif
+   let priority = priority + 1
+  endwhile
+  if exists("starpriority")
+   exe 'silent keepjumps '.w:netrw_bannercnt.',$v/^\d\{3}'.sepchr.'/s/^/'.starpriority.'/'
+  endif
 
-  elseif w:netrw_liststyle == s:LONGLIST
-   " use long list
-"   call Decho("use long list")
-   let g:netrw_list_cmd = g:netrw_list_cmd." -l"
+  " Following line associated with priority -- items that satisfy a priority
+  " pattern get prefixed by ###/ which permits easy sorting by priority.
+  " Sometimes files can satisfy multiple priority patterns -- only the latest
+  " priority pattern needs to be retained.  So, at this point, these excess
+  " priority prefixes need to be removed, but not directories that happen to
+  " be just digits themselves.
+  exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\(\d\{3}'.sepchr.'\)\%(\d\{3}'.sepchr.'\)\+\ze./\1/e'
 
-  elseif w:netrw_liststyle == s:WIDELIST
-   " give wide list
-"   call Decho("use wide list")
-   let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge')
+"  call Dret("SetSort")
+endfun
 
-  elseif w:netrw_liststyle == s:TREELIST
-"   call Decho("use tree list")
-   let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge')
+" =====================================================================
+" s:NetrwSortStyle: change sorting style (name - time - size) and refresh display {{{2
+fun! s:NetrwSortStyle(islocal)
+"  call Dfunc("s:NetrwSortStyle(islocal=".a:islocal.") netrw_sort_by<".g:netrw_sort_by.">")
+  call s:NetrwSaveWordPosn()
+  let svpos= netrw#NetrwSavePosn()
 
-  else
-   call netrw#ErrorMsg(s:WARNING,"bad value for g:netrw_liststyle (=".w:netrw_liststyle.")",46)
-   let g:netrw_liststyle = s:THINLIST
-   let w:netrw_liststyle = g:netrw_liststyle
-   let g:netrw_list_cmd  = substitute(g:netrw_list_cmd,' -l','','ge')
-  endif
-  setlocal ma noro
+  let g:netrw_sort_by= (g:netrw_sort_by =~ 'n')? 'time' : (g:netrw_sort_by =~ 't')? 'size' : 'name'
+  norm! 0
+  call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+  call netrw#NetrwRestorePosn(svpos)
 
-  " clear buffer - this will cause NetBrowse/LocalBrowseCheck to do a refresh
-"  call Decho("clear buffer<".expand("%")."> with :%d")
-  %d
+"  call Dret("s:NetrwSortStyle : netrw_sort_by<".g:netrw_sort_by.">")
+endfun
 
-  " refresh the listing
-  call netrw#NetSavePosn()
-  call s:NetRefresh(a:islocal,s:NetBrowseChgDir(a:islocal,'./'))
+" ---------------------------------------------------------------------
+" s:NetrwSplit: mode {{{2
+"           =0 : net   and o
+"           =1 : net   and t
+"           =2 : net   and v
+"           =3 : local and o
+"           =4 : local and t
+"           =5 : local and v
+fun! s:NetrwSplit(mode)
+"  call Dfunc("s:NetrwSplit(mode=".a:mode.") alto=".g:netrw_alto." altv=".g:netrw_altv)
 
-  " keep cursor on the filename
-  silent keepjumps $
-  let result= search('\%(^\%(|\+\s\)\=\|\s\{2,}\)\zs'.escape(fname,'.\[]*$^').'\%(\s\{2,}\|$\)','bc')
-"  call Decho("search result=".result." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'N/A'))
-  if result <= 0 && exists("w:netrw_bannercnt")
-   exe w:netrw_bannercnt
-  endif
+  call s:SaveWinVars()
 
-"  call Dret("NetListStyle".(exists("w:netrw_liststyle")? ' : w:netrw_liststyle='.w:netrw_liststyle : ""))
-endfun
+  if a:mode == 0
+   " remote and o
+"   call Decho("exe ".(g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s")
+   exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s"
+   let s:didsplit= 1
+   call s:RestoreWinVars()
+   call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord()))
+   unlet s:didsplit
 
-" ---------------------------------------------------------------------
-" NetWideListing: {{{2
-fun! s:NetWideListing()
+  elseif a:mode == 1
+   " remote and t
+   let cursorword  = s:NetrwGetWord()
+"   call Decho("tabnew")
+   tabnew
+   let s:didsplit= 1
+   call s:RestoreWinVars()
+   call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,cursorword))
+   unlet s:didsplit
 
-  if w:netrw_liststyle == s:WIDELIST
-"   call Dfunc("NetWideListing() w:netrw_liststyle=".w:netrw_liststyle.' fo='.&fo.' l:fo='.&l:fo)
-   " look for longest filename (cpf=characters per filename)
-   " cpf: characters per file
-   " fpl: files per line
-   " fpc: files per column
-   setlocal ma noro
-   let b:netrw_cpf= 0
-   if line("$") >= w:netrw_bannercnt
-    exe 'silent keepjumps '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif'
-   else
-"    call Dret("NetWideListing")
-    return
-   endif
-"   call Decho("max file strlen+1=".b:netrw_cpf)
-   let b:netrw_cpf= b:netrw_cpf + 1
+  elseif a:mode == 2
+   " remote and v
+"   call Decho("exe ".(g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v")
+   exe (g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v"
+   let s:didsplit= 1
+   call s:RestoreWinVars()
+   call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord()))
+   unlet s:didsplit
 
-   " determine qty files per line (fpl)
-   let w:netrw_fpl= winwidth(0)/b:netrw_cpf
-   if w:netrw_fpl <= 0
-    let w:netrw_fpl= 1
-   endif
-"   call Decho("fpl= ".winwidth(0)."/[b:netrw_cpf=".b:netrw_cpf.']='.w:netrw_fpl)
+  elseif a:mode == 3
+   " local and o
+"   call Decho("exe ".(g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s")
+   exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s"
+   let s:didsplit= 1
+   call s:RestoreWinVars()
+   call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord()))
+   unlet s:didsplit
 
-   " make wide display
-   exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^.*$/\=escape(printf("%-'.b:netrw_cpf.'s",submatch(0)),"\\")/'
-   let fpc         = (line("$") - w:netrw_bannercnt + w:netrw_fpl)/w:netrw_fpl
-   let newcolstart = w:netrw_bannercnt + fpc
-   let newcolend   = newcolstart + fpc - 1
-"   call Decho("bannercnt=".w:netrw_bannercnt." fpl=".w:netrw_fpl." fpc=".fpc." newcol[".newcolstart.",".newcolend."]")
-   silent! let keepregstar = @*
-   while line("$") >= newcolstart
-    if newcolend > line("$") | let newcolend= line("$") | endif
-    let newcolqty= newcolend - newcolstart
-    exe newcolstart
-    if newcolqty == 0
-     exe "silent keepjumps norm! 0\<c-v>$hx".w:netrw_bannercnt."G$p"
-    else
-     exe "silent keepjumps norm! 0\<c-v>".newcolqty.'j$hx'.w:netrw_bannercnt.'G$p'
-    endif
-    exe "silent keepjumps ".newcolstart.','.newcolend.'d'
-    exe 'silent keepjumps '.w:netrw_bannercnt
-   endwhile
-   silent! let @*= keepregstar
-   exe "silent keepjumps ".w:netrw_bannercnt.',$s/\s\+$//e'
-   setlocal noma nomod ro
-"   call Dret("NetWideListing")
+  elseif a:mode == 4
+   " local and t
+   let netrw_curdir= b:netrw_curdir
+   let cursorword  = s:NetrwGetWord()
+"   call Decho("tabnew")
+   tabnew
+   let b:netrw_curdir= netrw_curdir
+   let s:didsplit= 1
+   call s:RestoreWinVars()
+   call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,cursorword))
+   unlet s:didsplit
+
+  elseif a:mode == 5
+   " local and v
+"   call Decho("exe ".(g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v")
+   exe (g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v"
+   let s:didsplit= 1
+   call s:RestoreWinVars()
+   call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord()))
+   unlet s:didsplit
+
+  else
+   call netrw#ErrorMsg(s:ERROR,"(NetrwSplit) unsupported mode=".a:mode,45)
   endif
 
+"  call Dret("s:NetrwSplit")
+endfun
+
+" ---------------------------------------------------------------------
+" NetrwStatusLine: {{{2
+fun! NetrwStatusLine()
+
+" 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 &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 ""
+  else
+   return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen
+  endif
 endfun
 
 " ---------------------------------------------------------------------
-" NetTreeDir: determine tree directory given current cursor position {{{2
+" s:NetrwTreeDir: determine tree directory given current cursor position {{{2
 " (full path directory with trailing slash returned)
-fun! s:NetTreeDir()
-"  call Dfunc("NetTreeDir() curline#".line(".")."<".getline(".")."> b:netrw_curdir<".b:netrw_curdir."> tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%").">")
+fun! s:NetrwTreeDir()
+"  call Dfunc("NetrwTreeDir() curline#".line(".")."<".getline('.')."> b:netrw_curdir<".b:netrw_curdir."> tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%").">")
 
   let treedir= b:netrw_curdir
 "  call Decho("set initial treedir<".treedir.">")
-  let s:treecurpos= getpos(".")
+  let s:treecurpos= netrw#NetrwSavePosn()
 
   if w:netrw_liststyle == s:TREELIST
 "   call Decho("w:netrrw_liststyle is TREELIST:")
@@ -3288,7 +5448,7 @@
     " now force a refresh
 "    call Decho("clear buffer<".expand("%")."> with :%d")
     keepjumps %d
-"    call Dret("NetTreeDir <".treedir."> : (side effect) s:treecurpos<".string(s:treecurpos).">")
+"    call Dret("NetrwTreeDir <".treedir."> : (side effect) s:treecurpos<".string(s:treecurpos).">")
     return b:netrw_curdir
    endif
 
@@ -3303,7 +5463,7 @@
    " construct treedir by searching backwards at correct depth
 "   call Decho("constructing treedir<".treedir."> depth<".depth.">")
    while depth != "" && search('^'.depth.'[^|].\{-}/$','bW')
-    let dirname= substitute(getline("."),'^\(| \)*','','e')
+    let dirname= substitute(getline('.'),'^\(| \)*','','e')
     let treedir= dirname.treedir
     let depth  = substitute(depth,'^| ','','')
 "    call Decho("constructing treedir<".treedir.">: dirname<".dirname."> while depth<".depth.">")
@@ -3313,23 +5473,23 @@
    else
     let treedir= w:netrw_treetop.'/'.treedir
    endif
-"   call Decho("bufnr(.)=".bufnr(".")." line($)=".line("$")." line(.)=".line("."))
+"   call Decho("bufnr(.)=".bufnr("%")." line($)=".line("$")." line(.)=".line("."))
   endif
   let treedir= substitute(treedir,'//$','/','')
 
 "  " now force a refresh
-"  call Decho("clear buffer<".expand("%")."> with :%d")
+"" call DECHO("clear buffer<".expand("%")."> with :%d")
 "  setlocal ma noro
 "  keepjumps %d
 
-"  call Dret("NetTreeDir <".treedir."> : (side effect) s:treecurpos<".string(s:treecurpos).">")
+"  call Dret("NetrwTreeDir <".treedir."> : (side effect) s:treecurpos<".string(s:treecurpos).">")
   return treedir
 endfun
 
 " ---------------------------------------------------------------------
-" NetTreeDisplay: recursive tree display {{{2
-fun! s:NetTreeDisplay(dir,depth)
-"  call Dfunc("NetTreeDisplay(dir<".a:dir."> depth<".a:depth.">)")
+" s:NetrwTreeDisplay: recursive tree display {{{2
+fun! s:NetrwTreeDisplay(dir,depth)
+"  call Dfunc("NetrwTreeDisplay(dir<".a:dir."> depth<".a:depth.">)")
 
   " insure that there are no folds
   setlocal nofen
@@ -3360,725 +5520,907 @@
 
   " display subtrees (if any)
   let depth= "| ".a:depth
+
 "  call Decho("display subtrees with depth<".depth."> and current leaves")
   for entry in w:netrw_treedict[a:dir]
    let direntry= substitute(dir.entry,'/$','','e')
 "   call Decho("dir<".dir."> entry<".entry."> direntry<".direntry.">")
    if entry =~ '/$' && has_key(w:netrw_treedict,direntry)
 "    call Decho("<".direntry."> is a key in treedict - display subtree for it")
-    call s:NetTreeDisplay(direntry,depth)
+    call s:NetrwTreeDisplay(direntry,depth)
    elseif entry =~ '/$' && has_key(w:netrw_treedict,direntry.'/')
 "    call Decho("<".direntry."/> is a key in treedict - display subtree for it")
-    call s:NetTreeDisplay(direntry.'/',depth)
+    call s:NetrwTreeDisplay(direntry.'/',depth)
    else
 "    call Decho("<".entry."> is not a key in treedict (no subtree)")
     call setline(line("$")+1,depth.entry)
    endif
   endfor
-"  call Dret("NetTreeDisplay")
+"  call Dret("NetrwTreeDisplay")
 endfun
 
 " ---------------------------------------------------------------------
-" NetTreeListing: displays tree listing from treetop on down, using NetTreeDisplay() {{{2
-fun! s:NetTreeListing(dirname)
+" s:NetrwTreeListing: displays tree listing from treetop on down, using NetrwTreeDisplay() {{{2
+fun! s:NetrwTreeListing(dirname)
   if w:netrw_liststyle == s:TREELIST
-"   call Dfunc("NetTreeListing() bufname<".expand("%").">")
+"   call Dfunc("NetrwTreeListing() bufname<".expand("%").">")
 "   call Decho("curdir<".a:dirname.">")
+"   call Decho("win#".winnr().": w:netrw_treetop ".(exists("w:netrw_treetop")? "exists" : "doesn't exit")." w:netrw_treedict ".(exists("w:netrw_treedict")? "exists" : "doesn't exit"))
 
    " update the treetop
 "   call Decho("update the treetop")
    if !exists("w:netrw_treetop")
     let w:netrw_treetop= a:dirname
 "    call Decho("w:netrw_treetop<".w:netrw_treetop."> (reusing)")
-   elseif (w:netrw_treetop =~ ('^'.a:dirname) && strlen(a:dirname) < strlen(w:netrw_treetop)) || a:dirname !~ ('^'.w:netrw_treetop)
+   elseif (w:netrw_treetop =~ ('^'.a:dirname) && s:Strlen(a:dirname) < s:Strlen(w:netrw_treetop)) || a:dirname !~ ('^'.w:netrw_treetop)
     let w:netrw_treetop= a:dirname
 "    call Decho("w:netrw_treetop<".w:netrw_treetop."> (went up)")
    endif
 
-   " insure that we have at least an empty treedict
-   if !exists("w:netrw_treedict")
-    let w:netrw_treedict= {}
-   endif
+   " insure that we have at least an empty treedict
+   if !exists("w:netrw_treedict")
+    let w:netrw_treedict= {}
+   endif
+
+   " update the directory listing for the current directory
+"   call Decho("updating dictionary with ".a:dirname.":[..directory listing..]")
+"   call Decho("bannercnt=".w:netrw_bannercnt." line($)=".line("$"))
+   exe "silent! keepjumps ".w:netrw_bannercnt.',$g@^\.\.\=/$@d'
+   let w:netrw_treedict[a:dirname]= getline(w:netrw_bannercnt,line("$"))
+"   call Decho("w:treedict[".a:dirname."]= ".w:netrw_treedict[a:dirname])
+   exe "silent! keepjumps ".w:netrw_bannercnt.",$d"
+
+   " if past banner, record word
+   if exists("w:netrw_bannercnt") && line(".") > w:netrw_bannercnt
+    let fname= expand("<cword>")
+   else
+    let fname= ""
+   endif
+"   call Decho("fname<".fname.">")
+
+   " display from treetop on down
+   call s:NetrwTreeDisplay(w:netrw_treetop,"")
+
+"   call Dret("NetrwTreeListing : bufname<".expand("%").">")
+  endif
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwWideListing: {{{2
+fun! s:NetrwWideListing()
+
+  if w:netrw_liststyle == s:WIDELIST
+"   call Dfunc("NetrwWideListing() w:netrw_liststyle=".w:netrw_liststyle.' fo='.&fo.' l:fo='.&l:fo)
+   " look for longest filename (cpf=characters per filename)
+   " cpf: characters per file
+   " fpl: files per line
+   " fpc: files per column
+   setlocal ma noro
+"   call Decho("setlocal ma noro")
+   let b:netrw_cpf= 0
+   if line("$") >= w:netrw_bannercnt
+    exe 'silent keepjumps '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif'
+   else
+"    call Dret("NetrwWideListing")
+    return
+   endif
+"   call Decho("max file strlen+1=".b:netrw_cpf)
+   let b:netrw_cpf= b:netrw_cpf + 1
+
+   " determine qty files per line (fpl)
+   let w:netrw_fpl= winwidth(0)/b:netrw_cpf
+   if w:netrw_fpl <= 0
+    let w:netrw_fpl= 1
+   endif
+"   call Decho("fpl= ".winwidth(0)."/[b:netrw_cpf=".b:netrw_cpf.']='.w:netrw_fpl)
+
+   " make wide display
+   exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^.*$/\=escape(printf("%-'.b:netrw_cpf.'s",submatch(0)),"\\")/'
+   let fpc         = (line("$") - w:netrw_bannercnt + w:netrw_fpl)/w:netrw_fpl
+   let newcolstart = w:netrw_bannercnt + fpc
+   let newcolend   = newcolstart + fpc - 1
+"   call Decho("bannercnt=".w:netrw_bannercnt." fpl=".w:netrw_fpl." fpc=".fpc." newcol[".newcolstart.",".newcolend."]")
+   silent! let keepregstar = @*
+   while line("$") >= newcolstart
+    if newcolend > line("$") | let newcolend= line("$") | endif
+    let newcolqty= newcolend - newcolstart
+    exe newcolstart
+    if newcolqty == 0
+     exe "silent keepjumps norm! 0\<c-v>$hx".w:netrw_bannercnt."G$p"
+    else
+     exe "silent keepjumps norm! 0\<c-v>".newcolqty.'j$hx'.w:netrw_bannercnt.'G$p'
+    endif
+    exe "silent keepjumps ".newcolstart.','.newcolend.'d'
+    exe 'silent keepjumps '.w:netrw_bannercnt
+   endwhile
+   silent! let @*= keepregstar
+   exe "silent keepjumps ".w:netrw_bannercnt.',$s/\s\+$//e'
+   setlocal noma nomod ro
+"   call Dret("NetrwWideListing")
+  endif
+
+endfun
+
+" ---------------------------------------------------------------------
+" s:PerformListing: {{{2
+fun! s:PerformListing(islocal)
+"  call Dfunc("s:PerformListing(islocal=".a:islocal.") buf(%)=".bufnr("%")."<".bufname("%").">")
+
+  call s:NetrwSafeOptions()
+  setlocal noro ma
+"  call Decho("setlocal noro ma")
+
+"  if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1	" Decho
+"   call Decho("(netrw) Processing your browsing request...")
+"  endif								" Decho
+
+"  call Decho('w:netrw_liststyle='.(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a'))
+  if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict")
+   " force a refresh for tree listings
+"   call Decho("force refresh for treelisting: clear buffer<".expand("%")."> with :%d")
+   keepjumps %d
+  endif
+
+  " save current directory on directory history list
+  call s:NetrwBookmarkDir(3,b:netrw_curdir)
+
+  " Set up the banner {{{3
+"  call Decho("set up banner")
+  keepjumps put ='\" ============================================================================'
+  keepjumps put ='\" Netrw Directory Listing                                        (netrw '.g:loaded_netrw.')'
+  keepjumps put ='\"   '.b:netrw_curdir
+  keepjumps 1d
+  let w:netrw_bannercnt= 3
+  exe "keepjumps ".w:netrw_bannercnt
+
+  let sortby= g:netrw_sort_by
+  if g:netrw_sort_direction =~ "^r"
+   let sortby= sortby." reversed"
+  endif
+
+  " Sorted by... {{{3
+"  call Decho("handle specified sorting: g:netrw_sort_by<".g:netrw_sort_by.">")
+  if g:netrw_sort_by =~ "^n"
+"   call Decho("directories will be sorted by name")
+   " sorted by name
+   keepjumps put ='\"   Sorted by      '.sortby
+   keepjumps put ='\"   Sort sequence: '.g:netrw_sort_sequence
+   let w:netrw_bannercnt= w:netrw_bannercnt + 2
+  else
+"   call Decho("directories will be sorted by size or time")
+   " sorted by size or date
+   keepjumps put ='\"   Sorted by '.sortby
+   let w:netrw_bannercnt= w:netrw_bannercnt + 1
+  endif
+  exe "keepjumps ".w:netrw_bannercnt
+
+  " show copy/move target, if any
+  if exists("s:netrwmftgt") && exists("s:netrwmftgt_islocal")
+"   call Decho("show copy/move target<".s:netrwmftgt.">")
+   keepjumps put =''
+   if s:netrwmftgt_islocal
+    call setline(line("."),'"   Copy/Move Tgt: '.s:netrwmftgt.' (local)')
+   else
+    call setline(line("."),'"   Copy/Move Tgt: '.s:netrwmftgt.' (remote)')
+   endif
+   let w:netrw_bannercnt= w:netrw_bannercnt + 1
+  else
+"   call Decho("s:netrwmftgt does not exist, don't make Copy/Move Tgt")
+  endif
+  exe "keepjumps ".w:netrw_bannercnt
+
+  " Hiding...  -or-  Showing... {{{3
+"  call Decho("handle hiding/showing (g:netrw_hide=".g:netrw_list_hide." g:netrw_list_hide<".g:netrw_list_hide.">)")
+  if g:netrw_list_hide != "" && g:netrw_hide
+   if g:netrw_hide == 1
+    keepjumps put ='\"   Hiding:        '.g:netrw_list_hide
+   else
+    keepjumps put ='\"   Showing:       '.g:netrw_list_hide
+   endif
+   let w:netrw_bannercnt= w:netrw_bannercnt + 1
+  endif
+  exe "keepjumps ".w:netrw_bannercnt
+  keepjumps put ='\"   Quick Help: <F1>:help  -:go up dir  D:delete  R:rename  s:sort-by  x:exec'
+  keepjumps put ='\" ============================================================================'
+  let w:netrw_bannercnt= w:netrw_bannercnt + 2
+
+  " bannercnt should index the line just after the banner
+  let w:netrw_bannercnt= w:netrw_bannercnt + 1
+  exe "keepjumps ".w:netrw_bannercnt
+"  call Decho("bannercnt=".w:netrw_bannercnt." (should index line just after banner) line($)=".line("$"))
+
+  " set up syntax highlighting {{{3
+"  call Decho("set up syntax highlighting")
+  if has("syntax")
+   setlocal ft=netrw
+   if !exists("g:syntax_on") || !g:syntax_on
+    setlocal ft=
+   endif
+  endif
+
+  " get list of files
+"  call Decho("Get list of files - islocal=".a:islocal)
+  if a:islocal
+   call s:LocalListing()
+  else " remote
+   call s:NetrwRemoteListing()
+  endif
+"  call Decho("w:netrw_bannercnt=".w:netrw_bannercnt." (banner complete)")
+
+  " manipulate the directory listing (hide, sort) {{{3
+  if line("$") >= w:netrw_bannercnt
+"   call Decho("manipulate directory listing (hide)")
+"   call Decho("g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">")
+   if g:netrw_hide && g:netrw_list_hide != ""
+    call s:NetrwListHide()
+   endif
+   if line("$") >= w:netrw_bannercnt
+"    call Decho("manipulate directory listing (sort) : g:netrw_sort_by<".g:netrw_sort_by.">")
+
+    if g:netrw_sort_by =~ "^n"
+     " sort by name
+     call s:NetrwSetSort()
+
+     if w:netrw_bannercnt < line("$")
+"      call Decho("g:netrw_sort_direction=".g:netrw_sort_direction." (bannercnt=".w:netrw_bannercnt.")")
+      if g:netrw_sort_direction =~ 'n'
+       " normal direction sorting
+       exe 'silent keepjumps '.w:netrw_bannercnt.',$sort'
+      else
+       " reverse direction sorting
+       exe 'silent keepjumps '.w:netrw_bannercnt.',$sort!'
+      endif
+     endif
+     " remove priority pattern prefix
+"     call Decho("remove priority pattern prefix")
+     let sepchr= "\<Char-0xff>"
+     exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\d\{3}'.sepchr.'//e'
+
+    elseif a:islocal
+     if w:netrw_bannercnt < line("$")
+"      call Decho("g:netrw_sort_direction=".g:netrw_sort_direction)
+      if g:netrw_sort_direction =~ 'n'
+"       call Decho('exe silent keepjumps '.w:netrw_bannercnt.',$sort')
+       exe 'silent keepjumps '.w:netrw_bannercnt.',$sort'
+      else
+"       call Decho('exe silent keepjumps '.w:netrw_bannercnt.',$sort!')
+       exe 'silent keepjumps '.w:netrw_bannercnt.',$sort!'
+      endif
+     endif
+     exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\d\{-}\///e'
+    endif
+
+   elseif g:netrw_sort_direction =~ 'r'
+"    call Decho('reverse the sorted listing')
+    exe 'silent keepjumps '.w:netrw_bannercnt.'g/^/m '.w:netrw_bannercnt
+   endif
+  endif
+
+  " convert to wide/tree listing {{{3
+"  call Decho("modify display if wide/tree listing style")
+  call s:NetrwWideListing()
+  call s:NetrwTreeListing(b:netrw_curdir)
+
+  if exists("w:netrw_bannercnt") && line("$") > w:netrw_bannercnt
+   " place cursor on the top-left corner of the file listing
+"   call Decho("place cursor on top-left corner of file listing")
+   exe 'silent keepjumps '.w:netrw_bannercnt
+   norm! 0
+  endif
+
+  " record previous current directory
+  let w:netrw_prvdir= b:netrw_curdir
+"  call Decho("record netrw_prvdir<".w:netrw_prvdir.">")
+
+  " save certain window-oriented variables into buffer-oriented variables {{{3
+  call s:SetBufWinVars()
+  call s:NetrwOptionRestore("w:")
+
+  " set display to netrw display settings
+"  call Decho("set display to netrw display settings (noma nomod etc)")
+  setlocal noma nomod nonu nobl nowrap ro
+  if exists("s:treecurpos")
+
+   call netrw#NetrwRestorePosn(s:treecurpos)
+   unlet s:treecurpos
+  endif
 
-   " update the directory listing for the current directory
-"   call Decho("updating dictionary with ".a:dirname.":[..directory listing..]")
-"   call Decho("bannercnt=".w:netrw_bannercnt." line($)=".line("$"))
-   exe "silent! keepjumps ".w:netrw_bannercnt.',$g@^\.\.\=/$@d'
-   let w:netrw_treedict[a:dirname]= getline(w:netrw_bannercnt,line("$"))
-"   call Decho("treedict=".string(w:netrw_treedict))
-   exe "silent! keepjumps ".w:netrw_bannercnt.",$d"
+"  call Dret("s:PerformListing : curpos<".string(getpos(".")).">")
+endfun
 
-   " if past banner, record word
-   if exists("w:netrw_bannercnt") && line(".") > w:netrw_bannercnt
-    let fname= expand("<cword>")
-   else
-    let fname= ""
-   endif
+" ---------------------------------------------------------------------
+" s:SetupNetrwStatusLine: {{{2
+fun! s:SetupNetrwStatusLine(statline)
+"  call Dfunc("SetupNetrwStatusLine(statline<".a:statline.">)")
 
-   " display from treetop on down
-   call s:NetTreeDisplay(w:netrw_treetop,"")
+  if !exists("s:netrw_setup_statline")
+   let s:netrw_setup_statline= 1
+"   call Decho("do first-time status line setup")
 
-   " place cursor
-   if !exists("s:nbcd_curpos")
-    if fname != ""
-"     call Decho("(NetTreeListing) place cursor <".fname.">")
-     call search('\<'.fname.'\>','cw')
-    elseif exists("w:netrw_bannercnt")
-     exe (w:netrw_bannercnt+1)
-"     call Decho("(NetTreeListing) place cursor line#".(w:netrw_bannercnt+1))
-    endif
+   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
 
-"   call Dret("NetTreeListing : bufname<".expand("%").">")
+   " 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
-endfun
 
-" ---------------------------------------------------------------------
-" NetSaveWordPosn: used by the "s" command in both remote and local {{{2
-" browsing.  Along with NetRestoreWordPosn(), it keeps the cursor on
-" the same word even though the sorting has changed its order of appearance.
-fun! s:NetSaveWordPosn()
-"  call Dfunc("NetSaveWordPosn()")
-  let s:netrw_saveword= '^'.escape(getline("."),s:netrw_cd_escape).'$'
-"  call Dret("NetSaveWordPosn : saveword<".s:netrw_saveword.">")
-endfun
+  " set up status line (may use User9 highlighting)
+  " insure that windows have a statusline
+  " make sure statusline is displayed
+  let &stl=a:statline
+  setlocal laststatus=2
+"  call Decho("stl=".&stl)
+  redraw
 
-" ---------------------------------------------------------------------
-" NetRestoreWordPosn: used by the "s" command; see NetSaveWordPosn() above {{{2
-fun! s:NetRestoreWordPosn()
-"  call Dfunc("NetRestoreWordPosn()")
-  silent! call search(s:netrw_saveword,'w')
-"  call Dret("NetRestoreWordPosn")
+"  call Dret("SetupNetrwStatusLine : stl=".&stl)
 endfun
 
 " ---------------------------------------------------------------------
-" NetMakeDir: this function makes a directory (both local and remote) {{{2
-fun! s:NetMakeDir(usrhost)
-"  call Dfunc("NetMakeDir(usrhost<".a:usrhost.">)")
-
-  " get name of new directory from user.  A bare <CR> will skip.
-  " if its currently a directory, also request will be skipped, but with
-  " a message.
-  call inputsave()
-  let newdirname= input("Please give directory name: ")
-  call inputrestore()
-"  call Decho("newdirname<".newdirname.">")
+"  Remote Directory Browsing Support:    {{{1
+" ===========================================
 
-  if newdirname == ""
-"   call Dret("NetMakeDir : user aborted with bare <cr>")
-   return
-  endif
+" ---------------------------------------------------------------------
+" s:NetrwRemoteListing: {{{2
+fun! s:NetrwRemoteListing()
+"  call Dfunc("s:NetrwRemoteListing() b:netrw_curdir<".b:netrw_curdir.">)")
 
-  if a:usrhost == ""
+  call s:RemotePathAnalysis(b:netrw_curdir)
 
-   " Local mkdir:
-   " sanity checks
-   let fullnewdir= b:netrw_curdir.'/'.newdirname
-"   call Decho("fullnewdir<".fullnewdir.">")
-   if isdirectory(fullnewdir)
-    if !exists("g:netrw_quiet")
-     call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a directory!",24)
-    endif
-"    call Dret("NetMakeDir : directory<".newdirname."> exists previously")
-    return
-   endif
-   if s:FileReadable(fullnewdir)
+  " sanity check:
+  if exists("b:netrw_method") && b:netrw_method =~ '[235]'
+"   call Decho("b:netrw_method=".b:netrw_method)
+   if !executable("ftp")
     if !exists("g:netrw_quiet")
-     call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a file!",25)
+     call netrw#ErrorMsg(s:ERROR,"this system doesn't support remote directory listing via ftp",18)
     endif
-"    call Dret("NetMakeDir : file<".newdirname."> exists previously")
+    call s:NetrwOptionRestore("w:")
+"    call Dret("s:NetrwRemoteListing")
     return
    endif
 
-   " requested new local directory is neither a pre-existing file or
-   " directory, so make it!
-   if exists("*mkdir")
-    call mkdir(fullnewdir,"p")
-   else
-    let netrw_origdir= s:NetGetcwd(1)
-    exe 'keepjumps cd '.b:netrw_curdir
-"    call Decho("netrw_origdir<".netrw_origdir.">: cd b:netrw_curdir<".b:netrw_curdir.">")
-"    call Decho("exe silent! !".g:netrw_local_mkdir.' '.g:netrw_shq.newdirname.g:netrw_shq)
-    exe "silent! !".g:netrw_local_mkdir.' '.g:netrw_shq.newdirname.g:netrw_shq
-    if !g:netrw_keepdir | exe 'keepjumps cd '.netrw_origdir | endif
-    if !g:netrw_keepdir
-     exe 'keepjumps cd '.netrw_origdir
-"     call Decho("netrw_keepdir=".g:netrw_keepdir.": cd ".netrw_origdir)
+  elseif !exists("g:netrw_list_cmd") || g:netrw_list_cmd == ''
+   if !exists("g:netrw_quiet")
+    if g:netrw_list_cmd == ""
+     call netrw#ErrorMsg(s:ERROR,g:netrw_ssh_cmd." is not executable on your system",47)
+    else
+     call netrw#ErrorMsg(s:ERROR,"this system doesn't support remote directory listing via ".g:netrw_list_cmd,19)
     endif
    endif
 
-   if v:shell_error == 0
-    " refresh listing
-"    call Decho("refresh listing")
-    call netrw#NetSavePosn()
-    call s:NetRefresh(1,s:NetBrowseChgDir(1,'./'))
-   elseif !exists("g:netrw_quiet")
-    call netrw#ErrorMsg(s:ERROR,"unable to make directory<".newdirname.">",26)
-   endif
-   redraw!
+   call s:NetrwOptionRestore("w:")
+"   call Dret("s:NetrwRemoteListing")
+   return
+  endif  " (remote handling sanity check)
 
-  else
-   " Remote mkdir:
-   let mkdircmd  = s:MakeSshCmd(g:netrw_mkdir_cmd)
-   let newdirname= substitute(b:netrw_curdir,'^\%(.\{-}/\)\{3}\(.*\)$','\1','').newdirname
-"   call Decho("exe silent! !".mkdircmd." ".g:netrw_shq.newdirname.g:netrw_shq)
-   exe "silent! !".mkdircmd." ".g:netrw_shq.newdirname.g:netrw_shq
-   if v:shell_error == 0
-    " refresh listing
-    call netrw#NetSavePosn()
-    call s:NetRefresh(0,s:NetBrowseChgDir(0,'./'))
-   elseif !exists("g:netrw_quiet")
-    call netrw#ErrorMsg(s:ERROR,"unable to make directory<".newdirname.">",27)
-   endif
-   redraw!
+  if exists("b:netrw_method")
+"   call Decho("setting w:netrw_method<".b:netrw_method.">")
+   let w:netrw_method= b:netrw_method
   endif
 
-"  call Dret("NetMakeDir")
-endfun
+  if s:method == "ftp"
+   " use ftp to get remote file listing
+"   call Decho("use ftp to get remote file listing")
+   let s:method  = "ftp"
+   let listcmd = g:netrw_ftp_list_cmd
+   if g:netrw_sort_by =~ '^t'
+    let listcmd= g:netrw_ftp_timelist_cmd
+   elseif g:netrw_sort_by =~ '^s'
+    let listcmd= g:netrw_ftp_sizelist_cmd
+   endif
+"   call Decho("listcmd<".listcmd."> (using g:netrw_ftp_list_cmd)")
+   call s:NetrwRemoteFtpCmd(s:path,listcmd)
+"   exe "keepjumps ".w:netrw_bannercnt.',$g/^./call Decho("raw listing: ".getline("."))'
 
-" ---------------------------------------------------------------------
-"  NetBookmarkDir: {{{2
-"    0: (user: <b>)   bookmark current directory
-"    1: (user: <B>)   change to the bookmarked directory
-"    2: (user: <q>)   list bookmarks
-"    3: (browsing)    record current directory history
-"    4: (user: <u>)   go up   (previous) bookmark
-"    5: (user: <U>)   go down (next)     bookmark
-fun! s:NetBookmarkDir(chg,curdir)
-"  call Dfunc("NetBookmarkDir(chg=".a:chg." curdir<".a:curdir.">) cnt=".v:count." bookmarkcnt=".g:NETRW_BOOKMARKMAX." histcnt=".g:NETRW_DIRHIST_CNT." bookmax=".g:NETRW_BOOKMARKMAX." histmax=".g:netrw_dirhistmax)
+   if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:WIDELIST || w:netrw_liststyle == s:TREELIST
+    " shorten the listing
+"    call Decho("generate short listing")
+    exe "keepjumps ".w:netrw_bannercnt
 
-  if a:chg == 0
-   " bookmark the current directory
-"   call Decho("(user: <b>) bookmark the current directory")
-   if v:count > 0
-    " handle bookmark# specified via the count
-    let g:NETRW_BOOKMARKDIR_{v:count}= a:curdir
-    if !exists("g:NETRW_BOOKMARKMAX")
-     let g:NETRW_BOOKMARKMAX= v:count
-    elseif v:count > g:NETRW_BOOKMARKMAX
-     let g:NETRW_BOOKMARKMAX= v:count
+    " cleanup
+    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(".")
+    exe "keepjumps ".w:netrw_bannercnt
+    let line2= search('^\.\.\/\%(\s\|$\)','cnW')
+    if line2 == 0
+"     call Decho("netrw is putting ./ and ../ into listing")
+     keepjumps put='../'
+     keepjumps put='./'
+    endif
+    exe "keepjumps ".line1
+    keepjumps norm! 0
+
+"    call Decho("line1=".line1." line2=".line2." line(.)=".line("."))
+    if search('^\d\{2}-\d\{2}-\d\{2}\s','n') " M$ ftp site cleanup
+"     call Decho("M$ ftp cleanup")
+     exe 'silent! keepjumps '.w:netrw_bannercnt.',$s/^\d\{2}-\d\{2}-\d\{2}\s\+\d\+:\d\+[AaPp][Mm]\s\+\%(<DIR>\|\d\+\)\s\+//'
+    else " normal ftp cleanup
+"     call Decho("normal ftp cleanup")
+     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
-    " handle no count specified
-    let g:NETRW_BOOKMARKMAX                       = g:NETRW_BOOKMARKMAX + 1
-    let g:NETRW_BOOKMARKDIR_{g:NETRW_BOOKMARKMAX} = a:curdir
    endif
-   echo "bookmarked the current directory"
 
-  elseif a:chg == 1
-   " change to the bookmarked directory
-"   call Decho("(user: <B>) change to the bookmarked directory")
-   if exists("g:NETRW_BOOKMARKDIR_{v:count}")
-    exe "e ".g:NETRW_BOOKMARKDIR_{v:count}
+  else
+   " use ssh to get remote file listing {{{3
+"   call Decho("use ssh to get remote file listing: s:path<".s:path.">")
+   let listcmd= s:MakeSshCmd(g:netrw_list_cmd)
+"   call Decho("listcmd<".listcmd."> (using g:netrw_list_cmd)")
+   if g:netrw_scp_cmd =~ '^pscp'
+"    call Decho("1: exe silent r! ".listcmd.shellescape(s:path))
+    exe "silent r! ".listcmd.shellescape(s:path,1)
+    " remove rubbish and adjust listing format of 'pscp' to 'ssh ls -FLa' like
+    g/^Listing directory/d
+    g/^d[-rwx][-rwx][-rwx]/s+$+/+e
+    silent g/^l[-rwx][-rwx][-rwx]/s+$+@+e
+    if g:netrw_liststyle != s:LONGLIST
+     g/^[dlsp-][-rwx][-rwx][-rwx]/s/^.*\s\(\S\+\)$/\1/e
+    endif
    else
-    echomsg "Sorry, bookmark#".v:count." doesn't exist!"
+    if s:path == ""
+"     call Decho("2: exe silent r! ".listcmd)
+     exe "silent r! ".listcmd
+    else
+"     call Decho("3: exe silent r! ".listcmd.' "'.shellescape(s:path).'"')
+     exe "silent r! ".listcmd.' '.shellescape(s:path,1)
+"     call Decho("listcmd<".listcmd."> path<".s:path.">")
+    endif
    endif
 
-  elseif a:chg == 2
-   redraw!
-   let didwork= 0
-   " list user's bookmarks
-"   call Decho("(user: <q>) list user's bookmarks")
-   if exists("g:NETRW_BOOKMARKMAX")
-"    call Decho("list bookmarks [0,".g:NETRW_BOOKMARKMAX."]")
-    let cnt= 0
-    while cnt <= g:NETRW_BOOKMARKMAX
-     if exists("g:NETRW_BOOKMARKDIR_{cnt}")
-"      call Decho("Netrw Bookmark#".cnt.": ".g:NETRW_BOOKMARKDIR_{cnt})
-      echo "Netrw Bookmark#".cnt.": ".g:NETRW_BOOKMARKDIR_{cnt}
-      let didwork= 1
-     endif
-     let cnt= cnt + 1
-    endwhile
+   " cleanup
+   if g:netrw_ftp_browse_reject != ""
+"    call Decho("(cleanup) exe silent! g/".g:netrw_ssh_browse_reject."/keepjumps d")
+    exe "silent! g/".g:netrw_ssh_browse_reject."/keepjumps d"
    endif
+  endif
 
-   " list directory history
-   let cnt     = g:NETRW_DIRHIST_CNT
-   let first   = 1
-   let histcnt = 0
-   while ( first || cnt != g:NETRW_DIRHIST_CNT )
-"    call Decho("first=".first." cnt=".cnt." dirhist_cnt=".g:NETRW_DIRHIST_CNT)
-    let histcnt= histcnt + 1
-    if exists("g:NETRW_DIRHIST_{cnt}")
-"     call Decho("Netrw  History#".histcnt.": ".g:NETRW_DIRHIST_{cnt})
-     echo "Netrw  History#".histcnt.": ".g:NETRW_DIRHIST_{cnt}
-     let didwork= 1
-    endif
-    let first = 0
-    let cnt   = ( cnt - 1 ) % g:netrw_dirhistmax
-    if cnt < 0
-     let cnt= cnt + g:netrw_dirhistmax
+  if w:netrw_liststyle == s:LONGLIST
+   " do a long listing; these substitutions need to be done prior to sorting {{{3
+"   call Decho("fix long listing:")
+
+   if s:method == "ftp"
+    " cleanup
+    exe "keepjumps ".w:netrw_bannercnt
+    while getline('.') =~ g:netrw_ftp_browse_reject
+     keepjumps d
+    endwhile
+    " if there's no ../ listed, then put ./ and ../ in
+    let line1= line(".")
+    keepjumps 1
+    silent keepjumps call search('^\.\.\/\%(\s\|$\)','W')
+    let line2= line(".")
+    if line2 == 0
+     exe 'keepjumps '.w:netrw_bannercnt."put='./'"
+     if b:netrw_curdir != '/'
+      exe 'keepjumps '.w:netrw_bannercnt."put='../'"
+     endif
     endif
-   endwhile
-   if didwork
-    call inputsave()|call input("Press <cr> to continue")|call inputrestore()
+   exe "keepjumps ".line1
+   keepjumps norm! 0
    endif
 
-  elseif a:chg == 3
-   " saves most recently visited directories (when they differ)
-"   call Decho("(browsing) record curdir history")
-   if !exists("g:NETRW_DIRHIST_0") || g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT} != a:curdir
-    let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT + 1 ) % g:netrw_dirhistmax
-"    let g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}= substitute(a:curdir,'[/\\]$','','e')
-    let g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}= a:curdir
-"    call Decho("save dirhist#".g:NETRW_DIRHIST_CNT."<".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}.">")
+   if search('^\d\{2}-\d\{2}-\d\{2}\s','n') " M$ ftp site cleanup
+"    call Decho("M$ ftp site listing cleanup")
+    exe 'silent! keepjumps '.w:netrw_bannercnt.',$s/^\(\d\{2}-\d\{2}-\d\{2}\s\+\d\+:\d\+[AaPp][Mm]\s\+\%(<DIR>\|\d\+\)\s\+\)\(\w.*\)$/\2\t\1/'
+   elseif exists("w:netrw_bannercnt") && w:netrw_bannercnt <= line("$")
+"    call Decho("normal ftp site listing cleanup: bannercnt=".w:netrw_bannercnt." line($)=".line("$"))
+    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
+  endif
 
-  elseif a:chg == 4
-   " u: change to the previous directory stored on the history list
-"   call Decho("(user: <u>) chg to prev dir from history")
-   let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT - 1 ) % g:netrw_dirhistmax
-   if g:NETRW_DIRHIST_CNT < 0
-    let g:NETRW_DIRHIST_CNT= g:NETRW_DIRHIST_CNT + g:netrw_dirhistmax
-   endif
-   if exists("g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}")
-"    call Decho("changedir u#".g:NETRW_DIRHIST_CNT."<".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}.">")
-    if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")
-     setlocal ma noro
-     %d
-     setlocal nomod
-    endif
-"    call Decho("exe e! ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT})
-    exe "e! ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}
-   else
-    let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT + 1 ) % g:netrw_dirhistmax
-    echo "Sorry, no predecessor directory exists yet"
-   endif
+"  if exists("w:netrw_bannercnt") && w:netrw_bannercnt <= line("$") " Decho
+"   exe "keepjumps ".w:netrw_bannercnt.',$g/^./call Decho("listing: ".getline("."))'
+"  endif " Decho
+"  call Dret("s:NetrwRemoteListing")
+endfun
 
-  elseif a:chg == 5
-   " U: change to the subsequent directory stored on the history list
-"   call Decho("(user: <U>) chg to next dir from history")
-   let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT + 1 ) % g:netrw_dirhistmax
-   if exists("g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}")
-"    call Decho("changedir U#".g:NETRW_DIRHIST_CNT."<".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}.">")
-    if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")
-     setlocal ma noro
-     %d
-     setlocal nomod
+" ---------------------------------------------------------------------
+" s:NetrwRemoteRm: remove/delete a remote file or directory {{{2
+fun! s:NetrwRemoteRm(usrhost,path) range
+"  call Dfunc("s:NetrwRemoteRm(usrhost<".a:usrhost."> path<".a:path.">) virtcol=".virtcol("."))
+"  call Decho("firstline=".a:firstline." lastline=".a:lastline)
+  let svpos= netrw#NetrwSavePosn()
+
+  let all= 0
+  if exists("s:netrwmarkfilelist_{bufnr('%')}")
+   " remove all marked files
+   for fname in s:netrwmarkfilelist_{bufnr("%")}
+    let ok= s:NetrwRemoteRmFile(a:path,fname,all)
+    if ok =~ 'q\%[uit]'
+     break
+    elseif ok =~ 'a\%[ll]'
+     let all= 1
     endif
-"    call Decho("exe e! ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT})
-    exe "e! ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}
-   else
-    let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT - 1 ) % g:netrw_dirhistmax
-    if g:NETRW_DIRHIST_CNT < 0
-     let g:NETRW_DIRHIST_CNT= g:NETRW_DIRHIST_CNT + g:netrw_dirhistmax
+   endfor
+   unlet s:netrwmarkfilelist_{bufnr("%")}
+   unlet s:netrwmarkfilemtch_{bufnr("%")}
+   2match none
+
+  else
+   " remove files specified by range
+
+   " preparation for removing multiple files/directories
+   let ctr= a:firstline
+
+   " remove multiple files and directories
+   while ctr <= a:lastline
+    exe ctr
+    let ok= s:NetrwRemoteRmFile(a:path,s:NetrwGetWord(),all)
+    if ok =~ 'q\%[uit]'
+     break
+    elseif ok =~ 'a\%[ll]'
+     let all= 1
     endif
-    echo "Sorry, no successor directory exists yet"
-   endif
+    let ctr= ctr + 1
+   endwhile
   endif
-  call s:NetBookmarkMenu()
-"  call Dret("NetBookmarkDir")
+
+  " refresh the (remote) directory listing
+"  call Decho("refresh remote directory listing")
+  call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./'))
+  call netrw#NetrwRestorePosn(svpos)
+
+"  call Dret("s:NetrwRemoteRm")
 endfun
 
 " ---------------------------------------------------------------------
-" NetBookmarkMenu: {{{2
-fun! s:NetBookmarkMenu()
-  if !exists("s:netrw_menucnt")
-   return
-  endif
-"  call Dfunc("NetBookmarkMenu() bookmarkcnt=".g:NETRW_BOOKMARKMAX." histcnt=".g:NETRW_DIRHIST_CNT." menucnt=".s:netrw_menucnt)
-  if has("menu") && has("gui_running") && &go =~ 'm'
-   if exists("g:NetrwTopLvlMenu")
-    exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Bookmark'
+" s:NetrwRemoteRmFile: {{{2
+fun! s:NetrwRemoteRmFile(path,rmfile,all)
+"  call Dfunc("s:NetrwRemoteRmFile(path<".a:path."> rmfile<".a:rmfile.">) all=".a:all)
+
+  let all= a:all
+  let ok = ""
+
+  if a:rmfile !~ '^"' && (a:rmfile =~ '@$' || a:rmfile !~ '[\/]$')
+   " attempt to remove file
+"    call Decho("attempt to remove file (all=".all.")")
+   if !all
+    echohl Statement
+"    call Decho("case all=0:")
+    call inputsave()
+    let ok= input("Confirm deletion of file<".a: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
+    endif
    endif
 
-   " show bookmarked places
-   let cnt       = 0
-   while cnt <= g:NETRW_BOOKMARKMAX
-    if exists("g:NETRW_BOOKMARKDIR_{cnt}")
-     let bmdir= escape(g:NETRW_BOOKMARKDIR_{cnt},'.')
-"     call Decho('silent! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmark.'.bmdir.'	:e '.g:NETRW_BOOKMARKDIR_{cnt})
-     exe 'silent! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks.'.bmdir.'	:e '.g:NETRW_BOOKMARKDIR_{cnt}."\<cr>"
+   if all || ok =~ 'y\%[es]' || ok == ""
+"    call Decho("case all=".all." or ok<".ok.">".(exists("w:netrw_method")? ': netrw_method='.w:netrw_method : ""))
+    if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3)
+"     call Decho("case ftp:")
+     let path= a:path
+     if path =~ '^\a\+://'
+      let path= substitute(path,'^\a\+://[^/]\+/','','')
+     endif
+     silent! keepjumps .,$d
+     call s:NetrwRemoteFtpCmd(path,"delete ".'"'.a:rmfile.'"')
+    else
+"     call Decho("case ssh: g:netrw_rm_cmd<".g:netrw_rm_cmd.">")
+     let netrw_rm_cmd= s:MakeSshCmd(g:netrw_rm_cmd)
+"     call Decho("netrw_rm_cmd<".netrw_rm_cmd.">")
+     if !exists("b:netrw_curdir")
+      call netrw#ErrorMsg(s:ERROR,"for some reason b:netrw_curdir doesn't exist!",53)
+      let ok="q"
+     else
+      let remotedir= substitute(b:netrw_curdir,'^.*//[^/]\+/\(.*\)$','\1','')
+"      call Decho("netrw_rm_cmd<".netrw_rm_cmd.">")
+"      call Decho("remotedir<".remotedir.">")
+"      call Decho("rmfile<".a:rmfile.">")
+      if remotedir != ""
+       let netrw_rm_cmd= netrw_rm_cmd." ".shellescape(fnameescape(remotedir.a:rmfile))
+      else
+       let netrw_rm_cmd= netrw_rm_cmd." ".shellescape(fnameescape(a:rmfile))
+      endif
+"      call Decho("call system(".netrw_rm_cmd.")")
+      let ret= system(netrw_rm_cmd)
+      if ret != 0
+       call netrw#ErrorMsg(s:WARNING,"cmd<".netrw_rm_cmd."> failed",60)
+      endif
+"      call Decho("returned=".ret." errcode=".v:shell_error)
+     endif
     endif
-    let cnt= cnt + 1
-   endwhile
+   elseif ok =~ 'q\%[uit]'
+"    call Decho("ok==".ok)
+    break
+   endif
 
-   " show directory browsing history
-   let cnt     = g:NETRW_DIRHIST_CNT
-   let first   = 1
-   let histcnt = 0
-   while ( first || cnt != g:NETRW_DIRHIST_CNT )
-    let histcnt  = histcnt + 1
-    let priority = g:NETRW_DIRHIST_CNT + histcnt
-    if exists("g:NETRW_DIRHIST_{cnt}")
-     let bmdir= escape(g:NETRW_DIRHIST_{cnt},'.')
-"     call Decho('silent! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.bmdir.'	:e '.g:NETRW_DIRHIST_{cnt})
-     exe 'silent! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.bmdir.'	:e '.g:NETRW_DIRHIST_{cnt}."\<cr>"
+  else
+   " attempt to remove directory
+"    call Decho("attempt to remove directory")
+   if !all
+    call inputsave()
+    let ok= input("Confirm deletion of directory<".a: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
     endif
-    let first = 0
-    let cnt   = ( cnt - 1 ) % g:netrw_dirhistmax
-    if cnt < 0
-     let cnt= cnt + g:netrw_dirhistmax
+   endif
+
+   if all || ok =~ 'y\%[es]' || ok == ""
+    if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3)
+     call s:NetrwRemoteFtpCmd(a:path,"rmdir ".a:rmfile)
+    else
+     let rmfile          = substitute(a:path.a:rmfile,'/$','','')
+     let netrw_rmdir_cmd = s:MakeSshCmd(g:netrw_rmdir_cmd).' '.shellescape(rmfile)
+"      call Decho("attempt to remove dir: system(".netrw_rmdir_cmd.")")
+     let ret= s:System("system",netrw_rmdir_cmd)
+"      call Decho("returned=".ret." errcode=".v:shell_error)
+
+     if v:shell_error != 0
+"       call Decho("v:shell_error not 0")
+      let netrw_rmf_cmd= s:MakeSshCmd(g:netrw_rmf_cmd).' '.shellescape(substitute(rmfile,'[\/]$','','e'))
+"       call Decho("2nd attempt to remove dir: system(".netrw_rmf_cmd.")")
+      let ret= s:System("system",netrw_rmf_cmd)
+"       call Decho("returned=".ret." errcode=".v:shell_error)
+
+      if v:shell_error != 0 && !exists("g:netrw_quiet")
+      	call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",22)
+      endif
+     endif
     endif
-   endwhile
+
+   elseif ok =~ 'q\%[uit]'
+    break
+   endif
   endif
-"  call Dret("NetBookmarkMenu")
+
+"  call Dret("s:NetrwRemoteRmFile ".ok)
+  return ok
 endfun
 
 " ---------------------------------------------------------------------
-" NetObtain: obtain file under cursor (for remote browsing support) {{{2
-fun! netrw#NetObtain(vismode,...) range
-"  call Dfunc("NetObtain(vismode=".a:vismode.") a:0=".a:0)
-
-  if a:vismode == 0
-   " normal mode
-   let fname= expand("<cWORD>")
-"   call Decho("no arguments, use <".fname.">")
-  elseif a:vismode == 1
-   " visual mode
-   let keeprega = @a
-   norm! gv"ay
-   if g:netrw_liststyle == s:THINLIST
-    " thin listing
-    let filelist= split(@a,'\n')
-   elseif g:netrw_liststyle == s:LONGLIST
-    " long listing
-    let filelist= split(substitute(@a,'\t.\{-}\n','\n','g'),'\n')
-   else
-    " wide listing
-	let filelist = split(substitute(@a,'\s\{2,}','\n','g'),'\n')
-	let filelist = map(filelist,'substitute(v:val,"^\\s\\+","","")')
-	let filelist = map(filelist,'substitute(v:val,"\\s\\+$","","")')
-   endif
-"   call Decho("filelist<".string(filelist).">")
-   let @a= keeprega
-   for f in filelist
-    if f != ""
-     call netrw#NetObtain(2,f)
-    endif
-   endfor
-"   call Dret("NetObtain : visual mode handler")
-   return
-  elseif a:vismode == 2
-   " multiple file mode
-   let fname= a:1
-"   call Decho("visual mode handling: <".fname.">")
-  endif
+" s:NetrwRemoteFtpCmd: unfortunately, not all ftp servers honor options for ls {{{2
+"  This function assumes that a long listing will be received.  Size, time,
+"  and reverse sorts will be requested of the server but not otherwise
+"  enforced here.
+fun! s:NetrwRemoteFtpCmd(path,listcmd)
+"  call Dfunc("NetrwRemoteFtpCmd(path<".a:path."> listcmd<".a:listcmd.">) netrw_method=".w:netrw_method)
+"  call Decho("line($)=".line("$")." bannercnt=".w:netrw_bannercnt)
 
-  " NetrwStatusLine support - for obtaining support
-  call s:SetupNetrwStatusLine('%f %h%m%r%=%9*Obtaining '.fname)
+  " because WinXX ftp uses unix style input
+  let ffkeep= &ff
+  setlocal ma ff=unix noro
+"  call Decho("setlocal ma ff=unix noro")
 
-  if exists("w:netrw_method") && w:netrw_method =~ '[235]'
-"   call Decho("method=".w:netrw_method)
-   if executable("ftp")
-"    call Decho("ftp is executable, method=".w:netrw_method)
-    let curdir = b:netrw_curdir
-    let path   = substitute(curdir,'ftp://[^/]\+/','','e')
-    let curline= line(".")
-    let endline= line("$")+1
-    setlocal ma noro
-    keepjumps $
-"    call Decho("getcwd<".getcwd().">")
-"    call Decho("curdir<".curdir.">")
-"    call Decho("path<".path.">")
-"    call Decho("curline=".curline)
-"    call Decho("endline=".endline)
-
-    ".........................................
-    if w:netrw_method == 2
-     " ftp + <.netrc>: Method #2
-     setlocal ff=unix
-     if path != ""
-      put ='cd '.path
-"      call Decho("ftp:  cd ".path)
-     endif
-     put ='get '.fname
-"     call Decho("ftp:  get ".fname)
-     put ='quit'
-"     call Decho("ftp:  quit")
-     if exists("g:netrw_port") && g:netrw_port != ""
-"      call Decho("exe ".g:netrw_silentxfer.endline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
-      exe g:netrw_silentxfer.endline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port
-     else
-"      call Decho("exe ".g:netrw_silentxfer.endline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine)
-      exe g:netrw_silentxfer.endline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine
-     endif
+  " clear off any older non-banner lines
+  " note that w:netrw_bannercnt indexes the line after the banner
+"  call Decho('exe silent! keepjumps '.w:netrw_bannercnt.",$d  (clear off old non-banner lines)")
+  exe "silent! keepjumps ".w:netrw_bannercnt.",$d"
+
+  ".........................................
+  if w:netrw_method == 2 || w:netrw_method == 5
+   " ftp + <.netrc>:  Method #2
+   if a:path != ""
+    put ='cd \"'.a:path.'\"'
+   endif
+   if exists("g:netrw_ftpextracmd")
+    put =g:netrw_ftpextracmd
+"    call Decho("filter input: ".getline('.'))
+   endif
+   call setline(line("$")+1,a:listcmd)
+"   exe "keepjumps ".w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."))'
+   if exists("g:netrw_port") && g:netrw_port != ""
+"    call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
+    exe s:netrw_silentxfer." keepjumps ".w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)
+   else
+"    call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine)
+    exe s:netrw_silentxfer." keepjumps ".w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)
+   endif
 
    ".........................................
   elseif w:netrw_method == 3
-   " ftp + machine,id,passwd,filename: Method #3
+   " ftp + machine,id,passwd,filename:  Method #3
     setlocal ff=unix
     if exists("g:netrw_port") && g:netrw_port != ""
      put ='open '.g:netrw_machine.' '.g:netrw_port
-"     call Decho('ftp:  open '.g:netrw_machine.' '.g:netrw_port)
     else
      put ='open '.g:netrw_machine
-"     call Decho('ftp:  open '.g:netrw_machine)
     endif
 
     if exists("g:netrw_ftp") && g:netrw_ftp == 1
      put =g:netrw_uid
-     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.'\"'
-"     call Decho('user '.g:netrw_uid.' '.g:netrw_passwd)
-    endif
-
-   if path != ""
-    put ='cd '.path
-"    call Decho('cd '.a:path)
-   endif
-   put ='get '.fname
-"   call Decho("ftp:  get ".fname)
-   put ='quit'
-"   call Decho("ftp:  quit")
+     put ='\"'.s:netrw_passwd.'\"'
+    else
+     put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
+    endif
+
+   if a:path != ""
+    put ='cd \"'.a:path.'\"'
+   endif
+   if exists("g:netrw_ftpextracmd")
+    put =g:netrw_ftpextracmd
+"    call Decho("filter input: ".getline('.'))
+   endif
+   call setline(line("$")+1,a:listcmd)
 
     " 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("exe ".g:netrw_silentxfer.curline.",$!".g:netrw_ftp_cmd." -i -n")
-    exe g:netrw_silentxfer.endline.",$!".g:netrw_ftp_cmd." -i -n"
-
-    ".........................................
-    else
-     call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",28)
-    endif
-    " restore
-    exe "silent! ".endline.",$d"
-    exe "keepjumps ".curline
-    setlocal noma nomod ro
-   else
-"    call Decho("ftp not executable")
-    if !exists("g:netrw_quiet")
-     call netrw#ErrorMsg(s:ERROR,"this system doesn't support ftp",29)
-    endif
-    " restore status line
-    let &stl        = s:netrw_users_stl
-    let &laststatus = s:netrw_users_ls
-    " restore NetMethod
-    if exists("keep_netrw_method")
-     call s:NetMethod(keep_netrw_choice)
-     let w:netrw_method  = keep_netrw_wmethod
-    endif
-"    call Dret("NetObtain")
-    return
-   endif
+"    exe w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."))'
+"    call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i -n")
+    exe s:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i -n"
 
-  ".........................................
+   ".........................................
   else
-   " scp: Method#4
-"   call Decho("using scp")
-   let curdir = b:netrw_curdir
-   let path   = substitute(curdir,'scp://[^/]\+/','','e')
-"   call Decho("path<".path.">")
-   if exists("g:netrw_port") && g:netrw_port != ""
-    let useport= " ".g:netrw_scpport." ".g:netrw_port
-   else
-    let useport= ""
-   endif
-"   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
+   call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",23)
   endif
 
-  " restore status line
-  let &stl        = s:netrw_users_stl
-  let &laststatus = s:netrw_users_ls
-  redraw!
-
-  " restore NetMethod
-  if exists("keep_netrw_method")
-   call s:NetMethod(keep_netrw_choice)
-   let w:netrw_method  = keep_netrw_wmethod
+  " cleanup for Windows
+  if has("win32") || has("win95") || has("win64") || has("win16")
+   silent! keepjumps %s/\r$//e
   endif
-
-"  call Dret("NetObtain")
-endfun
-
-" ---------------------------------------------------------------------
-" NetPrevWinOpen: open 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()
-"  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 != ""
-       call netrw#ErrorMsg(s:ERROR,"unable to write <".bufname.">!",30)
-       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
-      setlocal nomod
-      call netrw#ErrorMsg(s:WARNING,bufname." changes abandoned",31)
-
-     else
-      " Cancel -- don't do this
-      if didsplit
-       q
-      else
-       wincmd p
-      endif
-"      call Dret("NetPrevWinOpen : cancelled")
-      return
-     endif
-    endif
+  if a:listcmd == "dir"
+   " infer directory/link based on the file permission string
+   silent! keepjumps g/d\%([-r][-w][-x]\)\{3}/s@$@/@
+   silent! keepjumps g/l\%([-r][-w][-x]\)\{3}/s/$/@/
+   if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:WIDELIST || w:netrw_liststyle == s:TREELIST
+    exe "silent! keepjumps ".w:netrw_bannercnt.',$s/^\%(\S\+\s\+\)\{8}//e'
    endif
   endif
 
-  if a:islocal
-   call netrw#LocalBrowseCheck(s:NetBrowseChgDir(a:islocal,curword))
-  else
-   call s:NetBrowse(a:islocal,s:NetBrowseChgDir(a:islocal,curword))
+  " ftp's listing doesn't seem to include ./ or ../
+  if !search('^\.\/$\|\s\.\/$','wn')
+   exe 'keepjumps '.w:netrw_bannercnt
+   put ='./'
+  endif
+  if !search('^\.\.\/$\|\s\.\.\/$','wn')
+   exe 'keepjumps '.w:netrw_bannercnt
+   put ='../'
   endif
-"  call Dret("NetPrevWinOpen")
+
+  " restore settings
+  let &ff= ffkeep
+"  call Dret("NetrwRemoteFtpCmd")
 endfun
 
 " ---------------------------------------------------------------------
-" NetMenu: generates the menu for gvim and netrw {{{2
-fun! s:NetMenu(domenu)
+" s:NetrwRemoteRename: rename a remote file or directory {{{2
+fun! s:NetrwRemoteRename(usrhost,path) range
+"  call Dfunc("NetrwRemoteRename(usrhost<".a:usrhost."> path<".a:path.">)")
 
-  if !exists("g:NetrwMenuPriority")
-   let g:NetrwMenuPriority= 80
-  endif
+  " preparation for removing multiple files/directories
+  let svpos      = netrw#NetrwSavePosn()
+  let ctr        = a:firstline
+  let rename_cmd = s:MakeSshCmd(g:netrw_rename_cmd)
 
-  if has("menu") && has("gui_running") && &go =~ 'm' && g:netrw_menu
-"   call Dfunc("NetMenu(domenu=".a:domenu.")")
+  " rename files given by the markfilelist
+  if exists("s:netrwmarkfilelist_{bufnr('%')}")
+   for oldname in s:netrwmarkfilelist_{bufnr("%")}
+"    call Decho("oldname<".oldname.">")
+    if exists("subfrom")
+     let newname= substitute(oldname,subfrom,subto,'')
+"     call Decho("subfrom<".subfrom."> subto<".subto."> newname<".newname.">")
+    else
+     call inputsave()
+     let newname= input("Moving ".oldname." to : ",oldname)
+     call inputrestore()
+     if newname =~ '^s/'
+      let subfrom = substitute(newname,'^s/\([^/]*\)/.*/$','\1','')
+      let subto   = substitute(newname,'^s/[^/]*/\(.*\)/$','\1','')
+      let newname = substitute(oldname,subfrom,subto,'')
+"      call Decho("subfrom<".subfrom."> subto<".subto."> newname<".newname.">")
+     endif
+    endif
+   
+    if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3)
+     call s:NetrwRemoteFtpCmd(a:path,"rename ".oldname." ".newname)
+    else
+     let oldname= shellescape(a:path.oldname)
+     let newname= shellescape(a:path.newname)
+"     call Decho("system(rename_cmd".' "'.fnameescape(oldname," ").'" "'.escape(newname).'"')
+     let ret= s:System("system",rename_cmd.' '.oldname.' '.newname)
+    endif
 
-   if !exists("s:netrw_menu_enabled") && a:domenu
-"    call Decho("initialize menu")
-    let s:netrw_menu_enabled= 1
-    exe 'silent! menu '.g:NetrwMenuPriority.'.1 '.g:NetrwTopLvlMenu.'Help<tab><F1>	<F1>'
-    call s:NetBookmarkMenu() " provide some history!
-    exe 'silent! menu '.g:NetrwMenuPriority.'.4 '.g:NetrwTopLvlMenu.'Go\ Up\ Directory<tab>-	-'
-    exe 'silent! menu '.g:NetrwMenuPriority.'.5 '.g:NetrwTopLvlMenu.'Apply\ Special\ Viewer<tab>x	x'
-    exe 'silent! menu '.g:NetrwMenuPriority.'.6 '.g:NetrwTopLvlMenu.'Bookmark\ Current\ Directory<tab>mb	mb'
-    exe 'silent! menu '.g:NetrwMenuPriority.'.7 '.g:NetrwTopLvlMenu.'Goto\ Bookmarked\ Directory<tab>gb	gb'
-    exe 'silent! menu '.g:NetrwMenuPriority.'.8 '.g:NetrwTopLvlMenu.'Change\ To\ Recently\ Used\ Directory<tab>u	u'
-    exe 'silent! menu '.g:NetrwMenuPriority.'.9 '.g:NetrwTopLvlMenu.'Change\ To\ Subsequently\ Used\ Directory<tab>U	U'
-    exe 'silent! menu '.g:NetrwMenuPriority.'.10 '.g:NetrwTopLvlMenu.'Delete\ File/Directory<tab>D	D'
-    exe 'silent! menu '.g:NetrwMenuPriority.'.11 '.g:NetrwTopLvlMenu.'Edit\ File\ Hiding\ List<tab>'."<ctrl-h>	\<c-h>"
-    exe 'silent! menu '.g:NetrwMenuPriority.'.12 '.g:NetrwTopLvlMenu.'Edit\ File/Directory<tab><cr>	'."\<cr>"
-    exe 'silent! menu '.g:NetrwMenuPriority.'.13 '.g:NetrwTopLvlMenu.'Edit\ File/Directory,\ New\ Window<tab>o	o'
-    exe 'silent! menu '.g:NetrwMenuPriority.'.14 '.g:NetrwTopLvlMenu.'Edit\ File/Directory,\ New\ Vertical\ Window<tab>v	v'
-    exe 'silent! menu '.g:NetrwMenuPriority.'.15 '.g:NetrwTopLvlMenu.'List\ Bookmarks\ and\ History<tab>q	q'
-    exe 'silent! menu '.g:NetrwMenuPriority.'.16 '.g:NetrwTopLvlMenu.'Listing\ Style\ (thin-long-wide)<tab>i	i'
-    exe 'silent! menu '.g:NetrwMenuPriority.'.17 '.g:NetrwTopLvlMenu.'Make\ Subdirectory<tab>d	d'
-    exe 'silent! menu '.g:NetrwMenuPriority.'.18 '.g:NetrwTopLvlMenu.'Normal-Hide-Show<tab>a	a'
-    exe 'silent! menu '.g:NetrwMenuPriority.'.19 '.g:NetrwTopLvlMenu.'Obtain\ File<tab>O	O'
-    exe 'silent! menu '.g:NetrwMenuPriority.'.20 '.g:NetrwTopLvlMenu.'Preview\ File/Directory<tab>p	p'
-    exe 'silent! menu '.g:NetrwMenuPriority.'.21 '.g:NetrwTopLvlMenu.'Previous\ Window\ Browser<tab>P	P'
-    exe 'silent! menu '.g:NetrwMenuPriority.'.22 '.g:NetrwTopLvlMenu.'Refresh\ Listing<tab>'."<ctrl-l>	\<c-l>"
-    exe 'silent! menu '.g:NetrwMenuPriority.'.23 '.g:NetrwTopLvlMenu.'Rename\ File/Directory<tab>R	R'
-    exe 'silent! menu '.g:NetrwMenuPriority.'.24 '.g:NetrwTopLvlMenu.'Reverse\ Sorting\ Order<tab>'."r	r"
-    exe 'silent! menu '.g:NetrwMenuPriority.'.25 '.g:NetrwTopLvlMenu.'Select\ Sorting\ Style<tab>s	s'
-    exe 'silent! menu '.g:NetrwMenuPriority.'.26 '.g:NetrwTopLvlMenu.'Sorting\ Sequence\ Edit<tab>S	S'
-    exe 'silent! menu '.g:NetrwMenuPriority.'.27 '.g:NetrwTopLvlMenu.'Set\ Current\ Directory<tab>c	c'
-    exe 'silent! menu '.g:NetrwMenuPriority.'.28 '.g:NetrwTopLvlMenu.'Settings/Options<tab>:NetrwSettings	'.":NetrwSettings\<cr>"
-    let s:netrw_menucnt= 28
+   endfor
+   call s:NetrwUnMarkFile(1)
 
-   elseif !a:domenu
-    let s:netrwcnt = 0
-    let curwin     = winnr()
-    windo if getline(2) =~ "Netrw" | let s:netrwcnt= s:netrwcnt + 1 | endif
-    exe curwin."wincmd w"
-    
-    if s:netrwcnt <= 1
-"     call Decho("clear menus")
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Help'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Apply\ Special\ Viewer'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Bookmark\ Current\ Directory'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Go\ Up\ Directory'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Goto\ Bookmarked\ Directory'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Change\ To\ Recently\ Used\ Directory'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Change\ To\ Subsequently\ Used\ Directory'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Delete\ File/Directory'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Edit\ File/Directory'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Edit\ File/Directory,\ New\ Window'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Edit\ File/Directory,\ New\ Vertical\ Window'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Edit\ File\ Hiding\ List'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Edit\ File'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Enter\ File/Directory'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Enter\ File/Directory\ (vertical\ split)'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'List\ Bookmarks\ and\ History'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Listing\ Style\ (thin-long-wide)'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Make\ Subdirectory'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Normal-Hide-Show'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Obtain\ File'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Preview\ File/Directory'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Previous\ Window\ Browser'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Refresh\ Listing'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Rename\ File/Directory'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Reverse\ Sorting\ Order'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Select\ Sorting\ Style'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Sorting\ Sequence\ Edit'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Set\ Current\ Directory'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Settings/Options'
-     exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Bookmarks'
-     silent! unlet s:netrw_menu_enabled
+  else
+
+  " attempt to rename files/directories
+   while ctr <= a:lastline
+    exe "keepjumps ".ctr
+
+    let oldname= s:NetrwGetWord()
+"   call Decho("oldname<".oldname.">")
+
+    call inputsave()
+    let newname= input("Moving ".oldname." to : ",oldname)
+    call inputrestore()
+
+    if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3)
+     call s:NetrwRemoteFtpCmd(a:path,"rename ".oldname." ".newname)
+    else
+     let oldname= shellescape(a:path.oldname)
+     let newname= shellescape(a:path.newname)
+"    call Decho("system(rename_cmd".' "'.fnameescape(oldname," ").'" "'.escape(newname).'"')
+     let ret= s:System("system",rename_cmd.' '.oldname.' '.newname)
     endif
-   endif
-"   call Dret("NetMenu")
+
+    let ctr= ctr + 1
+   endwhile
   endif
 
+  " refresh the directory
+  call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./'))
+  call netrw#NetrwRestorePosn(svpos)
+
+"  call Dret("NetrwRemoteRename")
 endfun
 
-" ==========================================
+" ---------------------------------------------------------------------
 "  Local Directory Browsing Support:    {{{1
 " ==========================================
 
 " ---------------------------------------------------------------------
-" LocalBrowseCheck: {{{2
+" netrw#LocalBrowseCheck: {{{2
 fun! netrw#LocalBrowseCheck(dirname)
   " unfortunate interaction -- split window debugging can't be
-"  " used here, must use DechoRemOn or DechoTabOn -- the BufEnter
+  " used here, must use D-echoRemOn or D-echoTabOn -- the BufEnter
   " event triggers another call to LocalBrowseCheck() when attempts
   " to write to the DBG buffer are made.
-"  call Dfunc("LocalBrowseCheck(dirname<".a:dirname.">")
+  " The &ft == "netrw" test was installed because the BufEnter event
+  " would hit when re-entering netrw windows, creating unexpected
+  " refreshes (and would do so in the middle of NetrwSaveOptions(), too)
+"  call Decho("netrw#LocalBrowseCheck: isdir<".a:dirname.">=".isdirectory(a:dirname))
   if isdirectory(a:dirname)
-   silent! call s:NetBrowse(1,a:dirname)
+"   call Decho(" ft<".&ft."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : " doesn't exist")."> dirname<".a:dirname.">"." line($)=".line("$"))
+   if &ft != "netrw" || (exists("b:netrw_curdir") && b:netrw_curdir != a:dirname)
+    silent! call s:NetrwBrowse(1,a:dirname)
+   elseif &ft == "netrw" && line("$") == 1
+    silent! call s:NetrwBrowse(1,a:dirname)
+   endif
   endif
-"  call Dret("LocalBrowseCheck")
   " not a directory, ignore it
 endfun
 
 " ---------------------------------------------------------------------
-"  LocalListing: does the job of "ls" for local directories {{{2
+"  s:LocalListing: does the job of "ls" for local directories {{{2
 fun! s:LocalListing()
-"  call Dfunc("LocalListing() &ma=".&ma." &mod=".&mod." &ro=".&ro." buf(%)=".buf("%"))
+"  call Dfunc("s:LocalListing()")
+"  call Decho("&ma=".&ma)
+"  call Decho("&mod=".&mod)
+"  call Decho("&ro=".&ro)
+"  call Decho("bufname(%)<".bufname("%").">")
+
 "  if exists("b:netrw_curdir") |call Decho('b:netrw_curdir<'.b:netrw_curdir.">")  |else|call Decho("b:netrw_curdir doesn't exist") |endif
 "  if exists("g:netrw_sort_by")|call Decho('g:netrw_sort_by<'.g:netrw_sort_by.">")|else|call Decho("g:netrw_sort_by doesn't exist")|endif
 
   " get the list of files contained in the current directory
-  let dirname    = escape(b:netrw_curdir,s:netrw_glob_escape)
+  let dirname    = escape(b:netrw_curdir,g:netrw_glob_escape)
   let dirnamelen = strlen(b:netrw_curdir)
   let filelist   = glob(s:ComposePath(dirname,"*"))
 "  call Decho("glob(dirname<".dirname."/*>)=".filelist)
@@ -4086,39 +6428,46 @@
    let filelist= filelist."\n"
   endif
   let filelist= filelist.glob(s:ComposePath(dirname,".*"))
-"  call Decho("glob(dirname<".dirname."/.*>)=".glob(dirname.".*"))
+"  call Decho("glob(dirname<".dirname."/.*>)=".filelist)
 
-  " if the directory name includes a "$", and possibly other characters,
-  " the glob() doesn't include "." and ".." entries.
-  if filelist !~ '[\\/]\.[\\/]\=\(\n\|$\)'
-"   call Decho("forcibly tacking on .")
-   if filelist == ""
-    let filelist= s:ComposePath(dirname,"./")
-   else
-    let filelist= filelist."\n".s:ComposePath(b:netrw_curdir,"./")
-   endif
-"  call Decho("filelist<".filelist.">")
+  " Coding choice: either   elide   ./ if present
+  "                or       include ./ if not present
+  if filelist =~ '[\\/]\.[\\/]\=\(\n\|$\)'
+   " elide /path/. from glob() entries if present
+"   call Decho("elide /path/. from glob entries if present")
+   let filelist = substitute(filelist,'\n','\t','g')
+   let filelist = substitute(filelist,'^[^\t]\+[/\\]\.\t','','')
+   let filelist = substitute(filelist,'[^\t]\+[/\\]\.$','','')
+   let filelist = substitute(filelist,'\t\zs[^\t]\+[/\\]\.\t','','')
+   let filelist = substitute(filelist,'\t','\n','g')
   endif
+"  call Decho("filelist<".filelist.">")
   if filelist !~ '[\\/]\.\.[\\/]\=\(\n\|$\)'
+    " include ../ in the glob() entry if its missing
 "   call Decho("forcibly tacking on ..")
    let filelist= filelist."\n".s:ComposePath(b:netrw_curdir,"../")
 "   call Decho("filelist<".filelist.">")
   endif
   if b:netrw_curdir == '/'
    " remove .. from filelist when current directory is root directory
-   let filelist= substitute(filelist,'/\.\.\n','','')
 "   call Decho("remove .. from filelist")
+   let filelist= substitute(filelist,'/\.\.\n','','')
   endif
+  " remove multiple contiguous newlines
   let filelist= substitute(filelist,'\n\{2,}','\n','ge')
-  if (has("win32") || has("win95") || has("win64") || has("win16"))
-   let filelist= substitute(filelist,'\','/','ge')
-  else
-   let filelist= substitute(filelist,'\','\\','ge')
+  if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16"))
+   " change all \s to /s
+"   call Decho('change all \s to /s')
+   let filelist= substitute(filelist,'\','/','g')
+  else
+   " escape all \s to \\
+"   call Decho('escape all \s to \\')
+   let filelist= substitute(filelist,'\','\\','g')
   endif
 
-"  call Decho("dirname<".dirname.">")
-"  call Decho("dirnamelen<".dirnamelen.">")
-"  call Decho("filelist<".filelist.">")
+"  call Decho("(before while) dirname<".dirname.">")
+"  call Decho("(before while) dirnamelen<".dirnamelen.">")
+"  call Decho("(before while) filelist<".filelist.">")
 
   while filelist != ""
    if filelist =~ '\n'
@@ -4128,22 +6477,67 @@
     let filename = filelist
     let filelist = ""
    endif
-   let pfile= filename
-   if isdirectory(filename)
+"   call Decho(" ")
+"   call Decho("(while) filelist<".filelist.">")
+"   call Decho("(while) filename<".filename.">")
+
+   if getftype(filename) == "link"
+    " indicate a symbolic link
+"    call Decho("indicate <".filename."> is a symbolic link with trailing @")
+    let pfile= filename."@"
+
+   elseif getftype(filename) == "socket"
+    " indicate a socket
+"    call Decho("indicate <".filename."> is a socket with trailing =")
+    let pfile= filename."="
+
+   elseif getftype(filename) == "fifo"
+    " indicate a fifo
+"    call Decho("indicate <".filename."> is a fifo with trailing |")
+    let pfile= filename."|"
+
+   elseif isdirectory(filename)
+    " indicate a directory
+"    call Decho("indicate <".filename."> is a directory with trailing /")
     let pfile= filename."/"
+
+   elseif exists("b:netrw_curdir") && b:netrw_curdir !~ '^.*://' && !isdirectory(filename)
+    if (has("win32") || has("win95") || has("win64") || has("win16"))
+     if filename =~ '\.[eE][xX][eE]$' || filename =~ '\.[cC][oO][mM]$' || filename =~ '\.[bB][aA][tT]$'
+      " indicate an executable
+"      call Decho("indicate <".filename."> is executable with trailing *")
+      let pfile= filename."*"
+     else
+      " normal file
+      let pfile= filename
+     endif
+    elseif executable(filename)
+     " indicate an executable
+"     call Decho("indicate <".filename."> is executable with trailing *")
+     let pfile= filename."*"
+    else
+     " normal file
+     let pfile= filename
+    endif
+
+   else
+    " normal file
+    let pfile= filename
    endif
+"   call Decho("pfile<".pfile."> (after *@/ appending)")
+
    if pfile =~ '//$'
     let pfile= substitute(pfile,'//$','/','e')
+"    call Decho("change // to /: pfile<".pfile.">")
    endif
    let pfile= strpart(pfile,dirnamelen)
    let pfile= substitute(pfile,'^[/\\]','','e')
-"   call Decho(" ")
 "   call Decho("filename<".filename.">")
 "   call Decho("pfile   <".pfile.">")
 
    if w:netrw_liststyle == s:LONGLIST
     let sz   = getfsize(filename)
-    let fsz  = strpart("               ",1,15-strlen(sz)).sz
+    let fsz  = strpart("               ",1,15-s:Strlen(sz)).sz
     let pfile= pfile."\t".fsz." ".strftime(g:netrw_timefmt,getftime(filename))
 "    call Decho("sz=".sz." fsz=".fsz)
    endif
@@ -4152,7 +6546,7 @@
     " sort by time (handles time up to 1 quintillion seconds, US)
 "    call Decho("getftime(".filename.")=".getftime(filename))
     let t  = getftime(filename)
-    let ft = strpart("000000000000000000",1,18-strlen(t)).t
+    let ft = strpart("000000000000000000",1,18-s:Strlen(t)).t
 "    call Decho("exe keepjumps put ='".ft.'/'.filename."'")
     let ftpfile= ft.'/'.pfile
     keepjumps silent! put=ftpfile
@@ -4161,12 +6555,12 @@
     " sort by size (handles file sizes up to 1 quintillion bytes, US)
 "    call Decho("getfsize(".filename.")=".getfsize(filename))
     let sz   = getfsize(filename)
-    let fsz  = strpart("000000000000000000",1,18-strlen(sz)).sz
+    let fsz  = strpart("000000000000000000",1,18-s:Strlen(sz)).sz
 "    call Decho("exe keepjumps put ='".fsz.'/'.filename."'")
     let fszpfile= fsz.'/'.pfile
     keepjumps silent! put =fszpfile
 
-   else 
+   else
     " sort by name
 "    call Decho("exe keepjumps put ='".pfile."'")
     keepjumps silent! put=pfile
@@ -4175,28 +6569,37 @@
 
   " cleanup any windows mess at end-of-line
   silent! keepjumps %s/\r$//e
-  setlocal ts=32
-"  call Decho("setlocal ts=32")
+  exe "setlocal ts=".g:netrw_maxfilenamelen
+"  call Decho("setlocal ts=".g:netrw_maxfilenamelen)
 
-"  call Dret("LocalListing")
+"  call Dret("s:LocalListing")
 endfun
 
 " ---------------------------------------------------------------------
-" LocalBrowseShellCmdRefresh: this function is called after a user has {{{2
+" s:LocalBrowseShellCmdRefresh: this function is called after a user has {{{2
 " performed any shell command.  The idea is to cause all local-browsing
 " buffers to be refreshed after a user has executed some shell command,
 " on the chance that s/he removed/created a file/directory with it.
 fun! s:LocalBrowseShellCmdRefresh()
-"  call Dfunc("LocalBrowseShellCmdRefresh() browselist=".string(s:netrw_browselist))
+"  call Dfunc("LocalBrowseShellCmdRefresh() browselist=".(exists("s:netrw_browselist")? string(s:netrw_browselist) : "empty")." ".tabpagenr("$")." tabs")
   " determine which buffers currently reside in a tab
+  if !exists("s:netrw_browselist")
+"   call Dret("LocalBrowseShellCmdRefresh : browselist is empty")
+   return
+  endif
+  if !exists("w:netrw_bannercnt")
+"   call Dret("LocalBrowseShellCmdRefresh : don't refresh when focus not on netrw windwo")
+   return
+  endif
   let itab       = 1
   let buftablist = []
   while itab <= tabpagenr("$")
-   let buftablist= buftablist + tabpagebuflist()
-   let itab= itab + 1
+   let buftablist = buftablist + tabpagebuflist()
+   let itab       = itab + 1
    tabn
   endwhile
 "  call Decho("buftablist".string(buftablist))
+"  call Decho("s:netrw_browselist<".(exists("s:netrw_browselist")? string(s:netrw_browselist) : "").">")
   "  GO through all buffers on netrw_browselist (ie. just local-netrw buffers):
   "   | refresh any netrw window
   "   | wipe out any non-displaying netrw buffer
@@ -4205,731 +6608,390 @@
   for ibuf in s:netrw_browselist
 "   call Decho("bufwinnr(".ibuf.") index(buftablist,".ibuf.")=".index(buftablist,ibuf))
    if bufwinnr(ibuf) == -1 && index(buftablist,ibuf) == -1
+    " wipe out any non-displaying netrw buffer
 "    call Decho("wiping  buf#".ibuf,"<".bufname(ibuf).">")
-    exe "silent! bw ".ibuf
+    exe "silent! bd ".fnameescape(ibuf)
     call remove(s:netrw_browselist,ibl)
 "    call Decho("browselist=".string(s:netrw_browselist))
     continue
    elseif index(tabpagebuflist(),ibuf) != -1
+    " refresh any netrw buffer
 "    call Decho("refresh buf#".ibuf.'-> win#'.bufwinnr(ibuf))
     exe bufwinnr(ibuf)."wincmd w"
-    call s:NetRefresh(1,s:NetBrowseChgDir(1,'./'))
+    call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./'))
    endif
    let ibl= ibl + 1
   endfor
   exe curwin."wincmd w"
 
-"  call Dret("LocalBrowseShellCmdRefresh")
-endfun
-
-" ---------------------------------------------------------------------
-" LocalBrowseRm: {{{2
-fun! s:LocalBrowseRm(path) range
-"  call Dfunc("LocalBrowseRm(path<".a:path.">)")
-"  call Decho("firstline=".a:firstline." lastline=".a:lastline)
-
-  " preparation for removing multiple files/directories
-  let ctr           = a:firstline
-  let ret           = 0
-  let all= 0
-
-  " remove multiple files and directories
-  while ctr <= a:lastline
-   exe "keepjumps ".ctr
-
-   " sanity checks
-   if line(".") < w:netrw_bannercnt
-    let ctr= ctr + 1
-    continue
-   endif
-   let curword= s:NetGetWord()
-   if curword == "./" || curword == "../"
-    let ctr= ctr + 1
-    continue
-   endif
-
-   norm! 0
-   let rmfile= s:ComposePath(a:path,curword)
-"   call Decho("rmfile<".rmfile.">")
-
-   if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '[\/]$')
-    " attempt to remove file
-    if !all
-     echohl Statement
-     call inputsave()
-     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
-    endif
-
-    if all || ok =~ 'y\%[es]' || ok == ""
-     let ret= s:System("delete",rmfile)
-"     call Decho("errcode=".v:shell_error." ret=".ret)
-    elseif ok =~ 'q\%[uit]'
-     break
-    endif
-
-   else
-    " attempt to remove directory
-    if !all
-     echohl Statement
-     call inputsave()
-     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
-    endif
-    let rmfile= substitute(rmfile,'[\/]$','','e')
-
-    if all || ok =~ 'y\%[es]' || ok == ""
-"     call Decho("1st attempt: system(".g:netrw_local_rmdir.' "'.rmfile.'")')
-     call s:System("system",g:netrw_local_rmdir.' "'.rmfile.'"')
-"     call Decho("v:shell_error=".v:shell_error)
-
-     if v:shell_error != 0
-"      call Decho("2nd attempt to remove directory<".rmfile.">")
-      let errcode= s:System("delete",rmfile)
-"      call Decho("errcode=".errcode)
-
-      if errcode != 0
-       if has("unix")
-"        call Decho("3rd attempt to remove directory<".rmfile.">")
-        call s:System("system","rm ".rmfile)
-        if v:shell_error != 0 && !exists("g:netrw_quiet")
-	 call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",34)
-endif
-       elseif !exists("g:netrw_quiet")
-       	call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",35)
-       endif
-      endif
-     endif
-
-    elseif ok =~ 'q\%[uit]'
-     break
-    endif
-   endif
-
-   let ctr= ctr + 1
-  endwhile
-
-  " refresh the directory
-  let curline= line(".")
-"  call Decho("refresh the directory")
-  call s:NetRefresh(1,s:NetBrowseChgDir(1,'./'))
-  exe curline
-
-"  call Dret("LocalBrowseRm")
-endfun
-
-" ---------------------------------------------------------------------
-" LocalBrowseRename: rename a remote file or directory {{{2
-fun! s:LocalBrowseRename(path) range
-"  call Dfunc("LocalBrowseRename(path<".a:path.">)")
-
-  " preparation for removing multiple files/directories
-  let ctr= a:firstline
-
-  " attempt to rename files/directories
-  while ctr <= a:lastline
-   exe "keepjumps ".ctr
-
-   " sanity checks
-   if line(".") < w:netrw_bannercnt
-    let ctr= ctr + 1
-    continue
-   endif
-   let curword= s:NetGetWord()
-   if curword == "./" || curword == "../"
-    let ctr= ctr + 1
-    continue
-   endif
-
-   norm! 0
-   let oldname= s:ComposePath(a:path,curword)
-"   call Decho("oldname<".oldname.">")
-
-   call inputsave()
-   let newname= input("Moving ".oldname." to : ",substitute(oldname,'/*$','','e'))
-   call inputrestore()
-
-   let ret= rename(oldname,newname)
-"   call Decho("renaming <".oldname."> to <".newname.">")
-
-   let ctr= ctr + 1
-  endwhile
-
-  " refresh the directory
-"  call Decho("refresh the directory listing")
-  call netrw#NetSavePosn()
-  call s:NetRefresh(1,s:NetBrowseChgDir(1,'./'))
-"  call Dret("LocalBrowseRename")
-endfun
-
-" ---------------------------------------------------------------------
-" LocalFastBrowser: handles setting up/taking down fast browsing for the {{{2
-"                   local browser
-"     fastbrowse  Local  Remote   Hiding a buffer implies it may be re-used (fast)
-"  slow   0         D      D      Deleting a buffer implies it will not be re-used (slow)
-"  med    1         D      H
-"  fast   2         H      H
-fun! s:LocalFastBrowser()
-"  call Dfunc("LocalFastBrowser() g:netrw_fastbrowse=".g:netrw_fastbrowse)
-
-  " initialize browselist, a list of buffer numbers that the local browser has used
-  if !exists("s:netrw_browselist")
-"   call Decho("initialize s:netrw_browselist")
-   let s:netrw_browselist= []
-  endif
-
-  " append current buffer to fastbrowse list
-  if g:netrw_fastbrowse <= 1 && (empty(s:netrw_browselist) || bufnr("%") > s:netrw_browselist[-1])
-"   call Decho("appendng current buffer to browselist")
-   call add(s:netrw_browselist,bufnr("%"))
-"   call Decho("browselist=".string(s:netrw_browselist))
-  endif
-
-  " enable autocmd events to handle refreshing/removing local browser buffers
-  "    If local browse buffer is currently showing: refresh it
-  "    If local browse buffer is currently hidden : wipe it
-  if !exists("s:netrw_browser_shellcmd") && g:netrw_fastbrowse <= 1
-"   call Decho("setting up local-browser shell command refresh")
-   let s:netrw_browser_shellcmd= 1
-   augroup AuNetrwShellCmd
-    au!
-    if (has("win32") || has("win95") || has("win64") || has("win16"))
-     au ShellCmdPost *	call s:LocalBrowseShellCmdRefresh()
-    else
-     au ShellCmdPost,FocusGained *	call s:LocalBrowseShellCmdRefresh()
-    endif
-   augroup END
-  endif
-
-  " user must have changed fastbrowse to its fast setting, so remove
-  " the associated autocmd events
-  if g:netrw_fastbrowse > 1 && exists("s:netrw_browser_shellcmd")
-"   call Decho("remove AuNetrwShellCmd autcmd group")
-   unlet s:netrw_browser_shellcmd
-   augroup AuNetrwShellCmd
-    au!
-   augroup END
-   augroup! AuNetrwShellCmd
-  endif
-
-"  call Dret("LocalFastBrowser")
-endfun
-
-" ---------------------------------------------------------------------
-" LocalObtain: copy selected file to current working directory {{{2
-fun! s:LocalObtain()
-"  call Dfunc("LocalObtain()")
-  if exists("b:netrw_curdir") && getcwd() != b:netrw_curdir
-   let fname= expand("<cWORD>")
-   let fcopy= readfile(b:netrw_curdir."/".fname,"b")
-   call writefile(fcopy,getcwd()."/".fname,"b")
-  elseif !exists("b:netrw_curdir")
-   call netrw#ErrorMsg(s:ERROR,"local browsing directory doesn't exist!",36)
-  else
-   call netrw#ErrorMsg(s:ERROR,"local browsing directory and current directory are identical",37)
-  endif
-"  call Dret("LocalObtain")
-endfun
-
-" ---------------------------------------------------------------------
-" netrw#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
-"          dosplit==1: the window will be split before running the local
-"                      browser
-fun! netrw#Explore(indx,dosplit,style,...)
-"  call Dfunc("netrw#Explore(indx=".a:indx." dosplit=".a:dosplit." style=".a:style.",a:1<".a:1.">) &modified=".&modified." a:0=".a:0)
-  if !exists("b:netrw_curdir")
-   let b:netrw_curdir= getcwd()
-"   call Decho("set b:netrw_curdir<".b:netrw_curdir."> (used getcwd)")
-  endif
-  let curfile= b:netrw_curdir
-"  call Decho("curfile<".curfile.">")
-
-  " save registers
-  silent! let keepregstar = @*
-  silent! let keepregplus = @+
-  silent! let keepregslash= @/
-
-  " if dosplit or file has been modified
-  if a:dosplit || &modified || a:style == 6
-"   call Decho("case: dosplit=".a:dosplit." modified=".&modified." a:style=".a:style)
-   call s:SaveWinVars()
-
-   if a:style == 0      " Explore, Sexplore
-"    call Decho("style=0: Explore or Sexplore")
-    exe g:netrw_winsize."wincmd s"
-
-   elseif a:style == 1  "Explore!, Sexplore!
-"    call Decho("style=1: Explore! or Sexplore!")
-    exe g:netrw_winsize."wincmd v"
-
-   elseif a:style == 2  " Hexplore
-"    call Decho("style=2: Hexplore")
-    exe "bel ".g:netrw_winsize."wincmd s"
-
-   elseif a:style == 3  " Hexplore!
-"    call Decho("style=3: Hexplore!")
-    exe "abo ".g:netrw_winsize."wincmd s"
+"  call Dret("LocalBrowseShellCmdRefresh")
+endfun
 
-   elseif a:style == 4  " Vexplore
-"    call Decho("style=4: Vexplore")
-    exe "lefta ".g:netrw_winsize."wincmd v"
+" ---------------------------------------------------------------------
+" s:NetrwLocalRm: {{{2
+fun! s:NetrwLocalRm(path) range
+"  call Dfunc("s:NetrwLocalRm(path<".a:path.">)")
+"  call Decho("firstline=".a:firstline." lastline=".a:lastline)
 
-   elseif a:style == 5  " Vexplore!
-"    call Decho("style=5: Vexplore!")
-    exe "rightb ".g:netrw_winsize."wincmd v"
+  " preparation for removing multiple files/directories
+  let ret   = 0
+  let all   = 0
+  let svpos = netrw#NetrwSavePosn()
+
+  if exists("s:netrwmarkfilelist_{bufnr('%')}")
+   " remove all marked files
+"   call Decho("remove all marked files")
+   for fname in s:netrwmarkfilelist_{bufnr("%")}
+    let ok= s:NetrwLocalRmFile(a:path,fname,all)
+    if ok =~ 'q\%[uit]' || ok == "no"
+     break
+    elseif ok =~ 'a\%[ll]'
+     let all= 1
+    endif
+   endfor
+   call s:NetrwUnMarkFile(1)
 
-   elseif a:style == 6  " Texplore
-    call s:SaveBufVars()
-"    call Decho("style  = 6: Texplore")
-    tabnew
-    call s:RestoreBufVars()
-   endif
-   call s:RestoreWinVars()
-  endif
-  norm! 0
+  else
+  " remove (multiple) files and directories
+"   call Decho("remove files in range [".a:firstline.",".a:lastline."]")
 
-  if a:0 > 0
-"   call Decho("a:1<".a:1.">")
-   if a:1 =~ '^\~' && (has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin))
-    let dirname= substitute(a:1,'\~',expand("$HOME"),'')
-"    call Decho("using dirname<".dirname.">  (case: ~ && unix||cygwin)")
-   elseif a:1 == '.'
-    let dirname= exists("b:netrw_curdir")? b:netrw_curdir : getcwd()
-    if dirname !~ '/$'
-     let dirname= dirname."/"
+   let ctr = a:firstline
+   while ctr <= a:lastline
+    exe "keepjumps ".ctr
+
+    " sanity checks
+    if line(".") < w:netrw_bannercnt
+     let ctr= ctr + 1
+     continue
     endif
-"    call Decho("using dirname<".dirname.">  (case: ".(exists("b:netrw_curdir")? "b:netrw_curdir" : "getcwd()").")")
-   elseif a:1 =~ '\$'
-    let dirname= expand(a:1)
-   else
-    let dirname= a:1
-"    call Decho("using dirname<".dirname.">")
-   endif
+    let curword= s:NetrwGetWord()
+    if curword == "./" || curword == "../"
+     let ctr= ctr + 1
+     continue
+    endif
+    let ok= s:NetrwLocalRmFile(a:path,curword,all)
+    if ok =~ 'q\%[uit]' || ok == "no"
+     break
+    elseif ok =~ 'a\%[ll]'
+     let all= 1
+    endif
+    let ctr= ctr + 1
+   endwhile
   endif
 
-  if dirname =~ '^\*/'
-   " Explore */pattern
-"   call Decho("case Explore */pattern")
-   let pattern= substitute(dirname,'^\*/\(.*\)$','\1','')
-"   call Decho("Explore */pat: dirname<".dirname."> -> pattern<".pattern.">")
-   if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif
-  elseif dirname =~ '^\*\*//'
-   " Explore **//pattern
-"   call Decho("case Explore **//pattern")
-   let pattern     = substitute(dirname,'^\*\*//','','')
-   let starstarpat = 1
-"   call Decho("Explore **//pat: dirname<".dirname."> -> pattern<".pattern.">")
+  " refresh the directory
+"  call Decho("bufname<".bufname("%").">")
+  if bufname("%") != "NetrwMessage"
+   call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./'))
+   call netrw#NetrwRestorePosn(svpos)
   endif
 
-  if dirname == "" && a:indx >= 0
-   " Explore Hexplore Vexplore Sexplore
-"   call Decho("case Explore Hexplore Vexplore Sexplore")
-   let newdir= substitute(expand("%:p"),'^\(.*[/\\]\)[^/\\]*$','\1','e')
-   if newdir =~ '^scp:' || newdir =~ '^ftp:'
-"    call Decho("calling NetBrowse(0,newdir<".newdir.">)")
-    call s:NetBrowse(0,newdir)
-   else
-    if newdir == ""|let newdir= getcwd()|endif
-"    call Decho("calling LocalBrowseCheck(newdir<".newdir.">)")
-    call netrw#LocalBrowseCheck(newdir)
-   endif
-   call search('\<'.substitute(curfile,'^.*/','','e').'\>','cW')
+"  call Dret("s:NetrwLocalRm")
+endfun
 
-  elseif dirname =~ '^\*\*/' || a:indx < 0 || dirname =~ '^\*/'
-   " Nexplore, Pexplore, Explore **/... , or Explore */pattern
-"   call Decho("case Nexplore, Pexplore, <s-down>, <s-up>, Explore dirname<".dirname.">")
-   if !mapcheck("<s-up>","n") && !mapcheck("<s-down>","n") && exists("b:netrw_curdir")
-"    call Decho("set up <s-up> and <s-down> maps")
-    let s:didstarstar= 1
-    nnoremap <buffer> <silent> <s-up>	:Pexplore<cr>
-    nnoremap <buffer> <silent> <s-down>	:Nexplore<cr>
-   endif
+" ---------------------------------------------------------------------
+" s:NetrwLocalRmFile: remove file fname given the path {{{2
+"                     Give confirmation prompt unless all==1
+fun! s:NetrwLocalRmFile(path,fname,all)
+"  call Dfunc("s:NetrwLocalRmFile(path<".a:path."> fname<".a:fname."> all=".a:all)
+  
+  let all= a:all
+  let ok = ""
+  norm! 0
+  let rmfile= s:ComposePath(a:path,a:fname)
+"  call Decho("rmfile<".rmfile.">")
 
-   if has("path_extra")
-"    call Decho("has path_extra")
-    if !exists("w:netrw_explore_indx")
-     let w:netrw_explore_indx= 0
+  if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '[\/]$')
+   " attempt to remove file
+"   call Decho("attempt to remove file<".rmfile.">")
+   if !all
+    echohl Statement
+    call inputsave()
+    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
-    let indx = a:indx
-"    call Decho("set indx= [a:indx=".indx."]")
-"
-    if indx == -1
-     "Nexplore
-"     call Decho("case Nexplore: (indx=".indx.")")
-     if !exists("w:netrw_explore_list") " sanity check
-      call netrw#ErrorMsg(s:WARNING,"using Nexplore or <s-down> improperly; see help for netrw-starstar",40)
-      silent! let @* = keepregstar
-      silent! let @+ = keepregstar
-      silent! let @/ = keepregslash
-"      call Dret("netrw#Explore")
-      return
-     endif
-     let indx= w:netrw_explore_indx
-     if indx < 0                        | let indx= 0                           | endif
-     if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif
-     let curfile= w:netrw_explore_list[indx]
-"     call Decho("indx=".indx." curfile<".curfile.">")
-     while indx < w:netrw_explore_listlen && curfile == w:netrw_explore_list[indx]
-      let indx= indx + 1
-"      call Decho("indx=".indx." (Nexplore while loop)")
-     endwhile
-     if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif
-"     call Decho("Nexplore: indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx)
-
-    elseif indx == -2
-     "Pexplore
-"     call Decho("case Pexplore: (indx=".indx.")")
-     if !exists("w:netrw_explore_list") " sanity check
-      call netrw#ErrorMsg(s:WARNING,"using Pexplore or <s-up> improperly; see help for netrw-starstar",41)
-      silent! let @* = keepregstar
-      silent! let @+ = keepregstar
-      silent! let @/ = keepregslash
-"      call Dret("netrw#Explore")
-      return
-     endif
-     let indx= w:netrw_explore_indx
-     if indx < 0                        | let indx= 0                           | endif
-     if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif
-     let curfile= w:netrw_explore_list[indx]
-"     call Decho("indx=".indx." curfile<".curfile.">")
-     while indx >= 0 && curfile == w:netrw_explore_list[indx]
-      let indx= indx - 1
-"      call Decho("indx=".indx." (Pexplore while loop)")
-     endwhile
-     if indx < 0                        | let indx= 0                           | endif
-"     call Decho("Pexplore: indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx)
+   endif
 
-    else
-     " Explore -- initialize
-     " build list of files to Explore with Nexplore/Pexplore
-"     call Decho("case Explore: initialize (indx=".indx.")")
-     let w:netrw_explore_indx= 0
-     if !exists("b:netrw_curdir")
-      let b:netrw_curdir= getcwd()
-     endif
-"     call Decho("b:netrw_curdir<".b:netrw_curdir.">")
+   if all || ok =~ 'y\%[es]' || ok == ""
+    let ret= s:System("delete",rmfile)
+"    call Decho("errcode=".v:shell_error." ret=".ret)
+   endif
 
-     if exists("pattern")
-"      call Decho("pattern exists: building list pattern<".pattern."> cwd<".getcwd().">")
-      if exists("starstarpat")
-"       call Decho("starstarpat<".starstarpat.">")
-       try
-        exe "silent vimgrep /".pattern."/gj "."**/*"
-       catch /^Vim\%((\a\+)\)\=:E480/
-       	call netrw#ErrorMsg(s:WARNING,'no files matched pattern<'.pattern.'>',45)
-        if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif
-        silent! let @* = keepregstar
-        silent! let @+ = keepregstar
-	silent! let @/ = keepregslash
-"        call Dret("netrw#Explore : no files matched pattern")
-        return
-       endtry
-       let s:netrw_curdir       = b:netrw_curdir
-       let w:netrw_explore_list = getqflist()
-       let w:netrw_explore_list = map(w:netrw_explore_list,'s:netrw_curdir."/".bufname(v:val.bufnr)')
-      else
-"       call Decho("no starstarpat")
-       exe "vimgrep /".pattern."/gj ".b:netrw_curdir."/*"
-       let w:netrw_explore_list = map(getqflist(),'bufname(v:val.bufnr)')
-       if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif
+  else
+   " attempt to remove directory
+   if !all
+    echohl Statement
+    call inputsave()
+    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
+   endif
+   let rmfile= substitute(rmfile,'[\/]$','','e')
+
+   if all || ok =~ 'y\%[es]' || ok == ""
+"    call Decho("1st attempt: system(".g:netrw_local_rmdir.' '.shellescape(rmfile).')')
+    call s:System("system",g:netrw_local_rmdir.' '.shellescape(rmfile))
+"    call Decho("v:shell_error=".v:shell_error)
+
+    if v:shell_error != 0
+"     call Decho("2nd attempt to remove directory<".rmfile.">")
+     let errcode= s:System("delete",rmfile)
+"     call Decho("errcode=".errcode)
+
+     if errcode != 0
+      if has("unix")
+"       call Decho("3rd attempt to remove directory<".rmfile.">")
+       call s:System("system","rm ".shellescape(rmfile))
+       if v:shell_error != 0 && !exists("g:netrw_quiet")
+        call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",34)
+	let ok="no"
+       endif
+      elseif !exists("g:netrw_quiet")
+       call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",35)
+       let ok="no"
       endif
-     else
-"      call Decho("no pattern: building list based on ".b:netrw_curdir."/".dirname)
-      let w:netrw_explore_list= split(expand(b:netrw_curdir."/".dirname),'\n')
-      if &hls | let keepregslash= s:ExplorePatHls(dirname) | endif
      endif
+    endif
+   endif
+  endif
 
-     let w:netrw_explore_listlen = len(w:netrw_explore_list)
-"     call Decho("w:netrw_explore_list<".string(w:netrw_explore_list)."> listlen=".w:netrw_explore_listlen)
+"  call Dret("s:NetrwLocalRmFile ".ok)
+  return ok
+endfun
 
-     if w:netrw_explore_listlen == 0 || (w:netrw_explore_listlen == 1 && w:netrw_explore_list[0] =~ '\*\*\/')
-      call netrw#ErrorMsg(s:WARNING,"no files matched",42)
-      silent! let @* = keepregstar
-      silent! let @+ = keepregstar
-      silent! let @/ = keepregslash
-"      call Dret("netrw#Explore : no files matched")
-      return
-     endif
-    endif
+" ---------------------------------------------------------------------
+" s:NetrwLocalRename: rename a remote file or directory {{{2
+fun! s:NetrwLocalRename(path) range
+"  call Dfunc("NetrwLocalRename(path<".a:path.">)")
 
-    " NetrwStatusLine support - for exploring support
-    let w:netrw_explore_indx= indx
-"    call Decho("explorelist<".join(w:netrw_explore_list,',')."> len=".w:netrw_explore_listlen)
+  " preparation for removing multiple files/directories
+  let ctr  = a:firstline
+  let svpos= netrw#NetrwSavePosn()
 
-    " wrap the indx around, but issue a note
-    if indx >= w:netrw_explore_listlen || indx < 0
-"     call Decho("wrap indx (indx=".indx." listlen=".w:netrw_explore_listlen.")")
-     let indx                = (indx < 0)? ( w:netrw_explore_listlen - 1 ) : 0
-     let w:netrw_explore_indx= indx
-     call netrw#ErrorMsg(s:NOTE,"no more files match Explore pattern",43)
-     sleep 1
+  " rename files given by the markfilelist
+  if exists("s:netrwmarkfilelist_{bufnr('%')}")
+   for oldname in s:netrwmarkfilelist_{bufnr("%")}
+"    call Decho("oldname<".oldname.">")
+    if exists("subfrom")
+     let newname= substitute(oldname,subfrom,subto,'')
+"     call Decho("subfrom<".subfrom."> subto<".subto."> newname<".newname.">")
+    else
+     call inputsave()
+     let newname= input("Moving ".oldname." to : ",oldname)
+     call inputrestore()
+     if newname =~ '^s/'
+      let subfrom = substitute(newname,'^s/\([^/]*\)/.*/$','\1','')
+      let subto   = substitute(newname,'^s/[^/]*/\(.*\)/$','\1','')
+"      call Decho("subfrom<".subfrom."> subto<".subto."> newname<".newname.">")
+      let newname = substitute(oldname,subfrom,subto,'')
+     endif
     endif
+    let ret= rename(oldname,newname)
+   endfor
+   2match none
+   unlet s:netrwmarkfilelist_{bufnr("%")}
+   unlet s:netrwmarkfilemtch_{bufnr("%")}
+  
+  else
 
-    exe "let dirfile= w:netrw_explore_list[".indx."]"
-"    call Decho("dirfile=w:netrw_explore_list[indx=".indx."]= <".dirfile.">")
-    let newdir= substitute(dirfile,'/[^/]*$','','e')
-"    call Decho("newdir<".newdir.">")
+   " attempt to rename files/directories
+   while ctr <= a:lastline
+    exe "keepjumps ".ctr
 
-"    call Decho("calling LocalBrowseCheck(newdir<".newdir.">)")
-    call netrw#LocalBrowseCheck(newdir)
-    if !exists("w:netrw_liststyle")
-     let w:netrw_liststyle= g:netrw_liststyle
+    " sanity checks
+    if line(".") < w:netrw_bannercnt
+     let ctr= ctr + 1
+     continue
     endif
-    if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:LONGLIST
-     call search('^'.substitute(dirfile,"^.*/","","").'\>',"W")
-    else
-     call search('\<'.substitute(dirfile,"^.*/","","").'\>',"w")
+    let curword= s:NetrwGetWord()
+    if curword == "./" || curword == "../"
+     let ctr= ctr + 1
+     continue
     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
-"    call Decho("vim does not have path_extra")
-    if !exists("g:netrw_quiet")
-     call netrw#ErrorMsg(s:WARNING,"your vim needs the +path_extra feature for Exploring with **!",44)
-    endif
-    silent! let @* = keepregstar
-    silent! let @+ = keepregstar
-    silent! let @/ = keepregslash
-"    call Dret("netrw#Explore : missing +path_extra")
-    return
-   endif
+    norm! 0
+    let oldname= s:ComposePath(a:path,curword)
+"   call Decho("oldname<".oldname.">")
 
-  else
-"   call Decho("case Explore newdir<".dirname.">")
-   if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && dirname =~ '/'
-    silent! unlet w:netrw_treedict
-    silent! unlet w:netrw_treetop
-   endif
-   let newdir= dirname
-   if !exists("b:netrw_curdir")
-    call netrw#LocalBrowseCheck(getcwd())
-   else
-    call netrw#LocalBrowseCheck(s:NetBrowseChgDir(1,newdir))
-   endif
+    call inputsave()
+    let newname= input("Moving ".oldname." to : ",substitute(oldname,'/*$','','e'))
+    call inputrestore()
+
+    let ret= rename(oldname,newname)
+"   call Decho("renaming <".oldname."> to <".newname.">")
+
+    let ctr= ctr + 1
+   endwhile
   endif
 
-  silent! let @* = keepregstar
-  silent! let @+ = keepregstar
-  silent! let @/ = keepregslash
-"  call Dret("netrw#Explore : @/<".@/.">")
-endfun
+  " refresh the directory
+"  call Decho("refresh the directory listing")
+  call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./'))
+  call netrw#NetrwRestorePosn(svpos)
 
-" ---------------------------------------------------------------------
-" s:ExplorePatHls: converts an Explore pattern into a regular expression search pattern {{{2
-fun! s:ExplorePatHls(pattern)
-"  call Dfunc("s:ExplorePatHls(pattern<".a:pattern.">)")
-  let repat= substitute(a:pattern,'^**/\{1,2}','','')
-"  call Decho("repat<".repat.">")
-  let repat= escape(repat,'][.\')
-"  call Decho("repat<".repat.">")
-  let repat= '\<'.substitute(repat,'\*','\\(\\S\\+ \\)*\\S\\+','g').'\>'
-"  call Dret("s:ExplorePatHls repat<".repat.">")
-  return repat
+"  call Dret("NetrwLocalRename")
 endfun
 
 " ---------------------------------------------------------------------
-" SetupNetrwStatusLine: {{{2
-fun! s:SetupNetrwStatusLine(statline)
-"  call Dfunc("SetupNetrwStatusLine(statline<".a:statline.">)")
+" s:LocalFastBrowser: handles setting up/taking down fast browsing for the local browser {{{2
+"
+"     g:netrw_    Directory Is
+"     fastbrowse  Local  Remote   
+"  slow   0         D      D      D=Deleting a buffer implies it will not be re-used (slow)
+"  med    1         D      H      H=Hiding a buffer implies it may be re-used        (fast)
+"  fast   2         H      H      
+"
+"  Deleting a buffer means that it will be re-loaded when examined, hence "slow".
+"  Hiding   a buffer means that it will be re-used   when examined, hence "fast".
+"           (re-using a buffer may not be as accurate)
+fun! s:LocalFastBrowser()
+"  call Dfunc("LocalFastBrowser() g:netrw_fastbrowse=".g:netrw_fastbrowse)
 
-  if !exists("s:netrw_setup_statline")
-   let s:netrw_setup_statline= 1
-"   call Decho("do first-time status line setup")
+  " initialize browselist, a list of buffer numbers that the local browser has used
+  if !exists("s:netrw_browselist")
+"   call Decho("initialize s:netrw_browselist")
+   let s:netrw_browselist= []
+  endif
 
-   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
+  " append current buffer to fastbrowse list
+  if empty(s:netrw_browselist) || bufnr("%") > s:netrw_browselist[-1]
+"   call Decho("appendng current buffer to browselist")
+   call add(s:netrw_browselist,bufnr("%"))
+"   call Decho("browselist=".string(s:netrw_browselist))
+  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
+  " enable autocmd events to handle refreshing/removing local browser buffers
+  "    If local browse buffer is currently showing: refresh it
+  "    If local browse buffer is currently hidden : wipe it
+  if !exists("s:netrw_browser_shellcmd") && g:netrw_fastbrowse <= 1
+"   call Decho("setting up local-browser shell command refresh")
+   let s:netrw_browser_shellcmd= 1
+   augroup AuNetrwShellCmd
+    au!
+    if (has("win32") || has("win95") || has("win64") || has("win16"))
+     au ShellCmdPost			*	call s:LocalBrowseShellCmdRefresh()
     else
-     hi User9 ctermbg=yellow ctermfg=blue guibg=yellow guifg=blue
+     au ShellCmdPost,FocusGained	*	call s:LocalBrowseShellCmdRefresh()
     endif
-   endtry
-   redir END
-   let @a= keepa
+   augroup END
   endif
 
-  " set up status line (may use User9 highlighting)
-  " insure that windows have a statusline
-  " make sure statusline is displayed
-  let &stl=a:statline
-  setlocal laststatus=2
-"  call Decho("stl=".&stl)
-  redraw!
+  " user must have changed fastbrowse to its fast setting, so remove
+  " the associated autocmd events
+  if g:netrw_fastbrowse > 1 && exists("s:netrw_browser_shellcmd")
+"   call Decho("remove AuNetrwShellCmd autcmd group")
+   unlet s:netrw_browser_shellcmd
+   augroup AuNetrwShellCmd
+    au!
+   augroup END
+   augroup! AuNetrwShellCmd
+  endif
 
-"  call Dret("SetupNetrwStatusLine : stl=".&stl)
+"  call Dret("LocalFastBrowser : browselist<".string(s:netrw_browselist).">")
 endfun
 
 " ---------------------------------------------------------------------
-" NetrwStatusLine: {{{2
-fun! NetrwStatusLine()
-
-" 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 &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 ""
-  else
-   return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen
-  endif
-endfun
+" Support Functions: {{{1
 
 " ---------------------------------------------------------------------
-" NetGetcwd: get the current directory. {{{2
-"   Change backslashes to forward slashes, if any.
-"   If doesc is true, escape certain troublesome characters
-fun! s:NetGetcwd(doesc)
-"  call Dfunc("NetGetcwd(doesc=".a:doesc.")")
-  let curdir= substitute(getcwd(),'\\','/','ge')
-  if curdir !~ '[\/]$'
-   let curdir= curdir.'/'
-  endif
-  if a:doesc
-   let curdir= escape(curdir,s:netrw_cd_escape)
+" s:UpdateBuffersMenu: does emenu Buffers.Refresh (but due to locale, the menu item may not be called that) {{{2
+"                      The Buffers.Refresh menu calls s:BMShow(); unfortunately, that means that that function
+"                      can't be called except via emenu.  But due to locale, that menu line may not be called
+"                      Buffers.Refresh; hence, s:NetrwBMShow() utilizes a "cheat" to call that function anyway.
+fun! s:UpdateBuffersMenu()
+"  call Dfunc("s:UpdateBuffersMenu()")
+  if has("gui") && has("menu") && has("gui_running") && &go =~ 'm'
+   try
+    silent emenu Buffers.Refresh\ menu
+   catch /^Vim\%((\a\+)\)\=:E/
+    let v:errmsg= ""
+    silent call s:NetrwBMShow()
+   endtry
   endif
-"  call Dret("NetGetcwd <".curdir.">")
-  return curdir
+"  call Dret("s:UpdateBuffersMenu")
 endfun
 
 " ---------------------------------------------------------------------
-" 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
-"          front.  An "*" pattern handles the default priority.
-fun! s:SetSort()
-"  call Dfunc("SetSort() bannercnt=".w:netrw_bannercnt)
-  if w:netrw_liststyle == s:LONGLIST
-   let seqlist  = substitute(g:netrw_sort_sequence,'\$','\\%(\t\\|\$\\)','ge')
-  else
-   let seqlist  = g:netrw_sort_sequence
-  endif
-  " sanity check -- insure that * appears somewhere
-  if seqlist == ""
-   let seqlist= '*'
-  elseif seqlist !~ '\*'
-   let seqlist= seqlist.',*'
-  endif
-  let priority = 1
-  while seqlist != ""
-   if seqlist =~ ','
-    let seq     = substitute(seqlist,',.*$','','e')
-    let seqlist = substitute(seqlist,'^.\{-},\(.*\)$','\1','e')
-   else
-    let seq     = seqlist
-    let seqlist = ""
-   endif
-   let eseq= escape(seq,'/')
-   if priority < 10
-    let spriority= "00".priority.'\/'
-   elseif priority < 100
-    let spriority= "0".priority.'\/'
-   else
-    let spriority= priority.'\/'
-   endif
-"   call Decho("priority=".priority." spriority<".spriority."> seq<".seq."> seqlist<".seqlist.">")
-
-   " sanity check
-   if w:netrw_bannercnt > line("$")
-    " apparently no files were left after a Hiding pattern was used
-"    call Dret("SetSort : no files left after hiding")
-    return
-   endif
-   if seq == '*'
-    exe 'silent keepjumps '.w:netrw_bannercnt.',$v/^\d\{3}\//s/^/'.spriority.'/'
-   else
-    exe 'silent keepjumps '.w:netrw_bannercnt.',$g/'.eseq.'/s/^/'.spriority.'/'
+" s:NetrwBMShow: {{{2
+fun! s:NetrwBMShow()
+"  call Dfunc("s:NetrwBMShow()")
+  redir => bmshowraw
+   menu
+  redir END
+  let bmshowlist = split(bmshowraw,'\n')
+  if bmshowlist != []
+   let bmshowfuncs= filter(bmshowlist,'v:val =~ "<SNR>\\d\\+_BMShow()"')
+   if bmshowfuncs != []
+    let bmshowfunc = substitute(bmshowfuncs[0],'^.*:\(call.*BMShow()\).*$','\1','')
+    if bmshowfunc =~ '^call.*BMShow()'
+     exe "silent! ".bmshowfunc
+    endif
    endif
-   let priority = priority + 1
-  endwhile
-
-  " Following line associated with priority -- items that satisfy a priority
-  " pattern get prefixed by ###/ which permits easy sorting by priority.
-  " Sometimes files can satisfy multiple priority patterns -- only the latest
-  " priority pattern needs to be retained.  So, at this point, these excess
-  " priority prefixes need to be removed, but not directories that happen to
-  " be just digits themselves.
-  exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\(\d\{3}\/\)\%(\d\{3}\/\)\+\ze./\1/e'
-
-"  call Dret("SetSort")
+  endif
+"  call Dret("s:NetrwBMShow : bmshowfunc<".(exists("bmshowfunc")? bmshowfunc : 'n/a').">")
 endfun
 
-" =====================================================================
-" Support Functions: {{{1
-
 " ---------------------------------------------------------------------
-"  ComposePath: Appends a new part to a path taking different systems into consideration {{{2
+"  s:ComposePath: Appends a new part to a path taking different systems into consideration {{{2
 fun! s:ComposePath(base,subdir)
 "  call Dfunc("s:ComposePath(base<".a:base."> subdir<".a:subdir.">)")
+
   if(has("amiga"))
+"   call Decho("amiga")
    let ec = a:base[strlen(a:base)-1]
    if ec != '/' && ec != ':'
     let ret = a:base . "/" . a:subdir
    else
     let ret = a:base . a:subdir
    endif
+
+  elseif a:subdir =~ '^\a:[/\\][^/\\]' && (has("win32") || has("win95") || has("win64") || has("win16"))
+"   call Decho("windows")
+   let ret= a:subdir
+
   elseif a:base =~ '^\a\+://'
+"   call Decho("remote linux/macos")
    let urlbase = substitute(a:base,'^\(\a\+://.\{-}/\)\(.*\)$','\1','')
    let curpath = substitute(a:base,'^\(\a\+://.\{-}/\)\(.*\)$','\2','')
-   let ret     = urlbase.curpath.a:subdir
+   if a:subdir == '../'
+    if curpath =~ '[^/]/[^/]\+/$'
+     let curpath= substitute(curpath,'[^/]\+/$','','')
+    else
+     let curpath=""
+    endif
+    let ret= urlbase.curpath
+   else
+    let ret= urlbase.curpath.a:subdir
+   endif
 "   call Decho("urlbase<".urlbase.">")
 "   call Decho("curpath<".curpath.">")
 "   call Decho("ret<".ret.">")
+
   else
+"   call Decho("local linux/macos")
    let ret = substitute(a:base."/".a:subdir,"//","/","g")
+   if a:base =~ '^//'
+    " keeping initial '//' for the benefit of network share listing support
+    let ret= '/'.ret
+   endif
+   let ret= simplify(ret)
   endif
+
 "  call Dret("s:ComposePath ".ret)
   return ret
 endfun
@@ -4939,7 +7001,7 @@
 "   0=note     = s:NOTE
 "   1=warning  = s:WARNING
 "   2=error    = s:ERROR
-"   Mar 19, 2007 : max errnum currently is 49
+"  Jun 11, 2008 : max errnum currently is 70
 fun! netrw#ErrorMsg(level,msg,errnum)
 "  call Dfunc("netrw#ErrorMsg(level=".a:level." msg<".a:msg."> errnum=".a:errnum.") g:netrw_use_errorwindow=".g:netrw_use_errorwindow)
 
@@ -4950,28 +7012,36 @@
   else
    let level= "**note** (netrw) "
   endif
+"  call Decho("level=".level)
 
   if g:netrw_use_errorwindow
    " (default) netrw creates a one-line window to show error/warning
    " messages (reliably displayed)
 
-   " record current window number for NetRestorePosn()'s benefit
+   " record current window number for NetrwRestorePosn()'s benefit
    let s:winBeforeErr= winnr()
- 
+"   call Decho("s:winBeforeErr=".s:winBeforeErr)
+
    " getting messages out reliably is just plain difficult!
    " This attempt splits the current window, creating a one line window.
    if bufexists("NetrwMessage") && bufwinnr("NetrwMessage") > 0
+"    call Decho("write to NetrwMessage buffer")
     exe bufwinnr("NetrwMessage")."wincmd w"
-    set ma noro
+"    call Decho("setlocal ma noro")
+    setlocal ma noro
     call setline(line("$")+1,level.a:msg)
     $
    else
+"    call Decho("create a NetrwMessage buffer window")
     bo 1split
     enew
     setlocal bt=nofile
     file NetrwMessage
+"    call Decho("setlocal ma noro")
+    setlocal ma noro
     call setline(line("$"),level.a:msg)
    endif
+"   call Decho("wrote msg<".level.a:msg."> to NetrwMessage win#".winnr())
    if &fo !~ '[ta]'
     syn clear
     syn match netrwMesgNote	"^\*\*note\*\*"
@@ -4985,7 +7055,7 @@
   else
    " (optional) netrw will show messages using echomsg.  Even if the
    " message doesn't appear, at least it'll be recallable via :messages
-   redraw!
+"   redraw!
    if a:level == s:WARNING
     echohl WarningMsg
    elseif a:level == s:ERROR
@@ -5034,28 +7104,31 @@
    " get a brand new temporary filename
    let tmpfile= tempname()
 "   call Decho("tmpfile<".tmpfile."> : from tempname()")
- 
-   let tmpfile= escape(substitute(tmpfile,'\','/','ge'),g:netrw_tmpfile_escape)
+
+   let tmpfile= substitute(tmpfile,'\','/','ge')
 "   call Decho("tmpfile<".tmpfile."> : chgd any \\ -> /")
- 
+
    " sanity check -- does the temporary file's directory exist?
    if !isdirectory(substitute(tmpfile,'[^/]\+$','','e'))
+"    call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
     call netrw#ErrorMsg(s:ERROR,"your <".substitute(tmpfile,'[^/]\+$','','e')."> directory is missing!",2)
 "    call Dret("s:GetTempfile getcwd<".getcwd().">")
     return ""
    endif
- 
+
    " let netrw#NetSource() know about the tmpfile
    let s:netrw_tmpfile= tmpfile " used by netrw#NetSource()
 "   call Decho("tmpfile<".tmpfile."> s:netrw_tmpfile<".s:netrw_tmpfile.">")
- 
+
    " o/s dependencies
-   if g:netrw_cygwin == 1
+   if g:netrw_cygwin != 0
     let tmpfile = substitute(tmpfile,'^\(\a\):','/cygdrive/\1','e')
    elseif has("win32") || has("win95") || has("win64") || has("win16")
-    let tmpfile = substitute(tmpfile,'/','\\','g')
+    if !exists("+shellslash") || !&ssl
+     let tmpfile = substitute(tmpfile,'/','\','g')
+    endif
    else
-    let tmpfile = tmpfile  
+    let tmpfile = tmpfile
    endif
    let b:netrw_tmpfile= tmpfile
 "   call Decho("o/s dependent fixed tempname<".tmpfile.">")
@@ -5074,7 +7147,6 @@
     else
      let suffix = substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e')
     endif
-    let suffix = escape(suffix,g:netrw_tmpfile_escape)
 "    call Decho("suffix<".suffix.">")
     let tmpfile= substitute(tmpfile,'\.tmp$','','e')
 "    call Decho("chgd tmpfile<".tmpfile."> (removed any .tmp suffix)")
@@ -5084,15 +7156,16 @@
    endif
   endif
 
+"  call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
 "  call Dret("s:GetTempfile <".tmpfile.">")
   return tmpfile
-endfun  
+endfun
 
 " ---------------------------------------------------------------------
 " s:MakeSshCmd: transforms input command using USEPORT HOSTNAME into {{{2
 "               a correct command
 fun! s:MakeSshCmd(sshcmd)
-"  call Dfunc("s:MakeSshCmd(sshcmd<".a:sshcmd.">)")
+"  call Dfunc("s:MakeSshCmd(sshcmd<".a:sshcmd.">) user<".s:user."> machine<".s:machine.">")
   let sshcmd = substitute(a:sshcmd,'\<HOSTNAME\>',s:user.s:machine,'')
   if exists("g:netrw_port") && g:netrw_port != ""
    let sshcmd= substitute(sshcmd,"USEPORT",g:netrw_sshport.' '.g:netrw_port,'')
@@ -5106,11 +7179,36 @@
 endfun
 
 " ---------------------------------------------------------------------
+" s:RemoteSystem: runs a command on a remote host using ssh {{{2
+"                 Returns status
+fun! s:RemoteSystem(cmd)
+"  call Dfunc("s:RemoteSystem(cmd<".a:cmd.">)")
+  if !executable(g:netrw_ssh_cmd)
+   call netrw#ErrorMsg(s:ERROR,"g:netrw_ssh_cmd<".g:netrw_ssh_cmd."> is not executable!",52)
+  elseif !exists("b:netrw_curdir")
+   call netrw#ErrorMsg(s:ERROR,"for some reason b:netrw_curdir doesn't exist!",53)
+  else
+   let cmd      = s:MakeSshCmd(g:netrw_ssh_cmd." USEPORT HOSTNAME")
+   let remotedir= substitute(b:netrw_curdir,'^.*//[^/]\+/\(.*\)$','\1','')
+   if remotedir != ""
+    let cmd= cmd.' "cd '.shellescape(remotedir).";"
+   else
+    let cmd= cmd.' "'
+   endif
+   let cmd= cmd.a:cmd.'"'
+"   call Decho("call system(".cmd.")")
+   let ret= system(cmd)
+  endif
+"  call Dret("s:RemoteSystem ".ret)
+  return ret
+endfun
+
+" ---------------------------------------------------------------------
 " s:NetrwEnew: opens a new buffer, passes netrw buffer variables through {{{2
 fun! s:NetrwEnew(curdir)
 "  call Dfunc("s:NetrwEnew(curdir<".a:curdir.">) buf#".bufnr("%")."<".bufname("%").">")
 
-  " grab a function-local copy of buffer variables
+  " grab a function-local-variable copy of buffer variables
   if exists("b:netrw_bannercnt")      |let netrw_bannercnt       = b:netrw_bannercnt      |endif
   if exists("b:netrw_browser_active") |let netrw_browser_active  = b:netrw_browser_active |endif
   if exists("b:netrw_cpf")            |let netrw_cpf             = b:netrw_cpf            |endif
@@ -5128,15 +7226,12 @@
   if exists("b:netrw_option")         |let netrw_option          = b:netrw_option         |endif
   if exists("b:netrw_prvdir")         |let netrw_prvdir          = b:netrw_prvdir         |endif
 
-  if getline(2) =~ '^" Netrw Directory Listing'
-"   call Decho("generate a buffer with keepjumps keepalt enew! (1)")
-   keepjumps keepalt enew!
-  else
-"   call Decho("generate a buffer with keepjumps enew! (2)")
-   keepjumps enew!
-  endif
+  call s:NetrwOptionRestore("w:")
+"  call Decho("generate a buffer with keepjumps keepalt enew!")
+  keepjumps keepalt enew!
+  call s:NetrwOptionSave("w:")
 
-  " copy function-local variables to buffer variable equivalents
+  " copy function-local-variables to buffer variable equivalents
   if exists("netrw_bannercnt")      |let b:netrw_bannercnt       = netrw_bannercnt      |endif
   if exists("netrw_browser_active") |let b:netrw_browser_active  = netrw_browser_active |endif
   if exists("netrw_cpf")            |let b:netrw_cpf             = netrw_cpf            |endif
@@ -5158,15 +7253,97 @@
   if b:netrw_curdir =~ '/$'
    if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
     file NetrwTreeListing
+    nno <silent> <buffer> [	:silent call <SID>TreeListMove('[')<cr>
+    nno <silent> <buffer> ]	:silent call <SID>TreeListMove(']')<cr>
    else
-    exe "silent! file ".b:netrw_curdir
+    exe "silent! keepalt file ".fnameescape(b:netrw_curdir)
    endif
   endif
 
-"  call Dret("s:NetrwEnew : buf#".bufnr("%")."<".bufname("%").">")
+"  call Dret("s:NetrwEnew : buf#".bufnr("%")."<".bufname("%")."> expand(%)<".expand("%")."> expand(#)<".expand("#").">")
+endfun
+
+" ------------------------------------------------------------------------
+" netrw#NetrwSavePosn: saves position of cursor on screen {{{2
+fun! netrw#NetrwSavePosn()
+"  call Dfunc("netrw#NetrwSavePosn()")
+  " Save current line and column
+  let w:netrw_winnr= winnr()
+  let w:netrw_line = line(".")
+  let w:netrw_col  = virtcol(".")
+
+  " Save top-of-screen line
+  norm! H0
+  let w:netrw_hline= line(".")
+
+  " set up string holding position parameters
+  let ret          = "let w:netrw_winnr=".w:netrw_winnr."|let w:netrw_line=".w:netrw_line."|let w:netrw_col=".w:netrw_col."|let w:netrw_hline=".w:netrw_hline
+
+  call netrw#NetrwRestorePosn()
+"  call Dret("netrw#NetrwSavePosn : winnr=".w:netrw_winnr." line=".w:netrw_line." col=".w:netrw_col." hline=".w:netrw_hline)
+  return ret
 endfun
 
 " ------------------------------------------------------------------------
+" netrw#NetrwRestorePosn: restores the cursor and file position as saved by NetrwSavePosn() {{{2
+fun! netrw#NetrwRestorePosn(...)
+"  call Dfunc("netrw#NetrwRestorePosn() a:0=".a:0." winnr=".(exists("w:netrw_winnr")? w:netrw_winnr : -1)." line=".(exists("w:netrw_line")? w:netrw_line : -1)." col=".(exists("w:netrw_col")? w:netrw_col : -1)." hline=".(exists("w:netrw_hline")? w:netrw_hline : -1))
+  let eikeep= &ei
+  set ei=all
+  if expand("%") == "NetrwMessage"
+   exe s:winBeforeErr."wincmd w"
+  endif
+
+  if a:0 > 0
+   exe a:1
+  endif
+
+  " restore window
+  if exists("w:netrw_winnr")
+"   call Decho("restore window: exe silent! ".w:netrw_winnr."wincmd w")
+   exe "silent! ".w:netrw_winnr."wincmd w"
+  endif
+  if v:shell_error == 0
+   " as suggested by Bram M: redraw on no error
+   " allows protocol error messages to remain visible
+"   redraw!
+  endif
+
+  " restore top-of-screen line
+  if exists("w:netrw_hline")
+"   call Decho("restore topofscreen: exe norm! ".w:netrw_hline."G0z")
+   exe "norm! ".w:netrw_hline."G0z\<CR>"
+  endif
+
+  " restore position
+  if exists("w:netrw_line") && exists("w:netrw_col")
+"   call Decho("restore posn: exe norm! ".w:netrw_line."G0".w:netrw_col."|")
+   exe "norm! ".w:netrw_line."G0".w:netrw_col."\<bar>"
+  endif
+
+  let &ei= eikeep
+"  call Dret("netrw#NetrwRestorePosn")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwSaveWordPosn: used to keep cursor on same word after refresh, {{{2
+" changed sorting, etc.  Also see s:NetrwRestoreWordPosn().
+fun! s:NetrwSaveWordPosn()
+"  call Dfunc("NetrwSaveWordPosn()")
+  let s:netrw_saveword= '^'.fnameescape(getline('.')).'$'
+"  call Dret("NetrwSaveWordPosn : saveword<".s:netrw_saveword.">")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwRestoreWordPosn: used to keep cursor on same word after refresh, {{{2
+"  changed sorting, etc.  Also see s:NetrwSaveWordPosn().
+fun! s:NetrwRestoreWordPosn()
+"  call Dfunc("NetrwRestoreWordPosn()")
+  silent! call search(s:netrw_saveword,'w')
+"  call Dret("NetrwRestoreWordPosn")
+endfun
+
+" ---------------------------------------------------------------------
 " s:RemotePathAnalysis: {{{2
 fun! s:RemotePathAnalysis(dirname)
 "  call Dfunc("s:RemotePathAnalysis()")
@@ -5205,7 +7382,7 @@
 endfun
 
 " ---------------------------------------------------------------------
-" s:RestoreWinVars: (used by Explore() and NetSplit()) {{{2
+" s:RestoreWinVars: (used by Explore() and NetrwSplit()) {{{2
 fun! s:RestoreWinVars()
 "  call Dfunc("s:RestoreWinVars()")
   if exists("s:bannercnt")      |let w:netrw_bannercnt       = s:bannercnt      |unlet s:bannercnt      |endif
@@ -5230,6 +7407,27 @@
 endfun
 
 " ---------------------------------------------------------------------
+" s:Rexplore: implements returning from a buffer to a netrw directory {{{2
+"
+"             s:SetRexDir() sets up <2-leftmouse> maps (if g:netrw_retmap
+"             is true) and a command, :Rexplore, which call this function.
+"
+"             s:nbcd_curpos_{bufnr('%')} is set up by s:NetrwBrowseChgDir()
+fun! s:NetrwRexplore(islocal,dirname)
+"  call Dfunc("s:NetrwRexplore(islocal=".a:islocal." dirname<".a:dirname.">)")
+  if a:islocal
+   call netrw#LocalBrowseCheck(a:dirname)
+  else
+   call s:NetrwBrowse(0,a:dirname)
+  endif
+  if exists("s:nbcd_curpos_{bufnr('%')}")
+   call netrw#NetrwRestorePosn(s:nbcd_curpos_{bufnr('%')})
+   unlet s:nbcd_curpos_{bufnr('%')}
+  endif
+"  call Dret("s:NetrwRexplore")
+endfun
+
+" ---------------------------------------------------------------------
 " s:SaveBufVars: {{{2
 fun! s:SaveBufVars()
 "  call Dfunc("s:SaveBufVars()")
@@ -5245,7 +7443,7 @@
 endfun
 
 " ---------------------------------------------------------------------
-" s:SaveWinVars: (used by Explore() and NetSplit()) {{{2
+" s:SaveWinVars: (used by Explore() and NetrwSplit()) {{{2
 fun! s:SaveWinVars()
 "  call Dfunc("s:SaveWinVars()")
   if exists("w:netrw_bannercnt")      |let s:bannercnt       = w:netrw_bannercnt      |endif
@@ -5270,7 +7468,7 @@
 endfun
 
 " ---------------------------------------------------------------------
-" s:SetBufWinVars: (used by NetBrowse() and LocalBrowseCheck()) {{{2
+" s:SetBufWinVars: (used by NetrwBrowse() and LocalBrowseCheck()) {{{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
@@ -5292,15 +7490,86 @@
 endfun
 
 " ---------------------------------------------------------------------
+" s:SetRexDir: set directory for :Rexplore {{{2
+fun! s:SetRexDir(islocal,dirname)
+"  call Dfunc("s:SetRexDir(islocal=".a:islocal." dirname<".a:dirname.">)")
+  " set up Rex and leftmouse-double-click
+  if a:islocal
+   exe 'com! Rexplore call s:NetrwRexplore(1,"'.escape(a:dirname,'"\').'")'
+   if g:netrw_retmap
+    silent! unmap <2-leftmouse>
+    if !hasmapto("<Plug>NetrwReturn")
+     nmap <unique> <silent> <2-leftmouse>	<Plug>NetrwReturn
+    endif
+    let dir = escape(a:dirname, s:netrw_map_escape)
+    exe 'nnoremap <silent> <Plug>NetrwReturn :call <SID>NetrwRexplore(1,"'.dir.'")<cr>'
+   endif
+  else
+   exe 'com! Rexplore call s:NetrwRexplore(0,"'.escape(a:dirname,'"\').'")'
+   if g:netrw_retmap
+    silent! unmap <2-leftmouse>
+    if !hasmapto("<Plug>NetrwReturn")
+     nmap <unique> <silent> <2-leftmouse>	<Plug>NetrwReturn
+    endif
+    let dir = escape(a:dirname, s:netrw_map_escape)
+    exe 'nnoremap <silent> <Plug>NetrwReturn :call <SID>NetrwRexplore(0,"'.dir.'")<cr>'
+   endif
+  endif
+"  call Dret("s:SetRexDir")
+endfun
+
+" ---------------------------------------------------------------------
+" s:Strlen: this function returns the length of a string, even if its {{{2
+"           using two-byte etc characters.
+"           Currently, its only used if g:Align_xstrlen is set to a
+"           nonzero value.  Solution from Nicolai Weibull, vim docs
+"           (:help strlen()), Tony Mechelynck, and my own invention.
+fun! s:Strlen(x)
+"  call Dfunc("s:Strlen(x<".a:x.">")
+  if g:netrw_xstrlen == 1
+   " number of codepoints (Latin a + combining circumflex is two codepoints)
+   " (comment from TM, solution from NW)
+   let ret= strlen(substitute(a:x,'.','c','g'))
+
+  elseif g:netrw_xstrlen == 2
+   " number of spacing codepoints (Latin a + combining circumflex is one spacing 
+   " codepoint; a hard tab is one; wide and narrow CJK are one each; etc.)
+   " (comment from TM, solution from TM)
+   let ret=strlen(substitute(a:x, '.\Z', 'x', 'g')) 
+
+  elseif g:netrw_xstrlen == 3
+   " virtual length (counting, for instance, tabs as anything between 1 and 
+   " 'tabstop', wide CJK as 2 rather than 1, Arabic alif as zero when immediately 
+   " preceded by lam, one otherwise, etc.)
+   " (comment from TM, solution from me)
+   let modkeep= &mod
+   exe "norm! o\<esc>"
+   call setline(line("."),a:x)
+   let ret= virtcol("$") - 1
+   d
+   let &mod= modkeep
+
+  else
+   " at least give a decent default
+   ret= strlen(a:x)
+  endif
+"  call Dret("s:Strlen ".ret)
+  return ret
+endfun
+
+" ---------------------------------------------------------------------
 " s:System: using Steve Hall's idea to insure that Windows paths stay {{{2
 "              acceptable.  No effect on Unix paths.
-"  Examples of use:  let result= s:System("system",path)
+"  Examples of use:  let result= s:System("rm",path)
 "                    let result= s:System("delete",path)
+fun! netrw#System(cmd,path)
+  echomsg s:System(a:cmd,a:path)
+endfun
 fun! s:System(cmd,path)
 "  call Dfunc("s:System(cmd<".a:cmd."> path<".a:path.">)")
 
   let path = a:path
-  if (has("win32") || has("win95") || has("win64") || has("win16"))
+  if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16"))
    " system call prep
    " remove trailing slash (Win95)
    let path = substitute(path, '\(\\\|/\)$', '', 'g')
@@ -5314,19 +7583,76 @@
     exe "let result= ".a:cmd."('".path."')"
     let &shellslash = sskeep
    else
-    exe "let result= ".a:cmd."(".g:netrw_shq.path.g:netrw_shq.")"
+"    call Decho("exe let result= ".a:cmd."('".path."')")
+    exe "let result= ".a:cmd."('".path."')"
    endif
   else
+"   call Decho("exe let result= ".a:cmd."('".path."')")
    exe "let result= ".a:cmd."('".path."')"
   endif
 
-"  call Decho("result<".result.">")
-"  call Dret("s:System")
+"  call Dret("s:System result<".result.">")
   return result
 endfun
 
 " ---------------------------------------------------------------------
-" s:UseBufWinVars: (used by NetBrowse() and LocalBrowseCheck() {{{2
+" s:TreeListMove: {{{2
+fun! s:TreeListMove(dir)
+"  call Dfunc("s:TreeListMove(dir<".a:dir.">)")
+  let curline  = getline('.')
+  let prvline  = (line(".") > 1)?         getline(line(".")-1) : ''
+  let nxtline  = (line(".") < line("$"))? getline(line(".")+1) : ''
+  let curindent= substitute(curline,'^\([| ]*\).\{-}$','\1','')
+  let indentm1 = substitute(curindent,'^| ','','')
+"  call Decho("prvline  <".prvline."> #".line(".")-1)
+"  call Decho("curline  <".curline."> #".line("."))
+"  call Decho("nxtline  <".nxtline."> #".line(".")+1)
+"  call Decho("curindent<".curindent.">")
+"  call Decho("indentm1 <".indentm1.">")
+
+  if curline !~ '/$'
+"   call Decho('regfile')
+   if     a:dir == '[' && prvline != ''
+    norm! 0
+    let nl = search('^'.indentm1.'[^|]','bWe')    " search backwards from regular file
+"    call Decho("regfile srch back: ".nl)
+   elseif a:dir == ']' && nxtline != ''
+    norm! $
+    let nl = search('^'.indentm1.'[^|]','We')     " search forwards from regular file
+"    call Decho("regfile srch fwd: ".nl)
+   endif
+
+  elseif a:dir == '[' && prvline != ''
+   norm! 0
+   let curline= line(".")
+   let nl     = search('^'.curindent.'[^|]','bWe') " search backwards From directory, same indentation
+"   call Decho("dir srch back ind: ".nl)
+   if nl != 0
+    if line(".") == curline-1
+     let nl= search('^'.indentm1.'[^|]','bWe')     " search backwards from directory, indentation - 1
+"     call Decho("dir srch back ind-1: ".nl)
+    endif
+   endif
+
+  elseif a:dir == ']' && nxtline != ''
+   norm! $
+   let curline = line(".")
+   let nl      = search('^'.curindent.'[^|]','We') " search forwards from directory, same indentation
+"   call Decho("dir srch fwd ind: ".nl)
+   if nl != 0
+    if line(".") == curline+1
+     let nl= search('^'.indentm1.'[^|]','We')         " search forwards from directory, indentation - 1
+"     call Decho("dir srch fwd ind-1: ".nl)
+    endif
+   endif
+
+  endif
+
+"  call Dret("s:TreeListMove")
+endfun
+
+" ---------------------------------------------------------------------
+" s:UseBufWinVars: (used by NetrwBrowse() and LocalBrowseCheck() {{{2
 "              Matching function to BufferWinVars()
 fun! s:UseBufWinVars()
 "  call Dfunc("s:UseBufWinVars()")
--- vim-7.1.314.orig/runtime/autoload/netrwSettings.vim
+++ vim-7.1.314/runtime/autoload/netrwSettings.vim
@@ -1,7 +1,7 @@
 " netrwSettings.vim: makes netrw settings simpler
-" Date:		Mar 26, 2007
+" Date:		Mar 11, 2008
 " Maintainer:	Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
-" Version:	9
+" Version:	11
 " Copyright:    Copyright (C) 1999-2007 Charles E. Campbell, Jr. {{{1
 "               Permission is hereby granted to use and distribute this code,
 "               with or without modifications, provided that this copyright
@@ -19,13 +19,13 @@
 if exists("g:loaded_netrwSettings") || &cp
   finish
 endif
-let g:loaded_netrwSettings  = "v9"
+let g:loaded_netrwSettings  = "v11"
 
 " ---------------------------------------------------------------------
 " NetrwSettings: {{{1
 fun! netrwSettings#NetrwSettings()
   " this call is here largely just to insure that netrw has been loaded
-  call netrw#NetSavePosn()
+  call netrw#NetrwSavePosn()
   if !exists("g:loaded_netrw")
    echohl WarningMsg | echomsg "***sorry*** netrw needs to be loaded prior to using NetrwSettings" | echohl None
    return
@@ -101,23 +101,36 @@
   else
    put = 'let g:netrw_browsex_viewer    = (not defined)'
   endif
+  let cdescline= line("$")
+  put ='let g:netrw_cd_escape...'
+  put = 'let g:netrw_compress          = '.g:netrw_compress
+  let decompressline= line("$")
+  put ='let g:netrw_decompress...'
   put = 'let g:netrw_dirhistmax        = '.g:netrw_dirhistmax
   put = 'let g:netrw_fastbrowse        = '.g:netrw_fastbrowse
+  let fnameescline= line("$")
+  put = 'let g:netrw_fname_escape...'
   put = 'let g:netrw_ftp_browse_reject = '.g:netrw_ftp_browse_reject
   put = 'let g:netrw_ftp_list_cmd      = '.g:netrw_ftp_list_cmd
   put = 'let g:netrw_ftp_sizelist_cmd  = '.g:netrw_ftp_sizelist_cmd
   put = 'let g:netrw_ftp_timelist_cmd  = '.g:netrw_ftp_timelist_cmd
+  let globescline= line("$")
+  put ='let g:netrw_glob_escape...'
   put = 'let g:netrw_hide              = '.g:netrw_hide
   put = 'let g:netrw_keepdir           = '.g:netrw_keepdir
   put = 'let g:netrw_list_cmd          = '.g:netrw_list_cmd
   put = 'let g:netrw_list_hide         = '.g:netrw_list_hide
+  put = 'let g:netrw_liststyle         = '.g:netrw_liststyle
+  put = 'let g:netrw_localcopycmd      = '.g:netrw_localcopycmd
   put = 'let g:netrw_local_mkdir       = '.g:netrw_local_mkdir
+  put = 'let g:netrw_localmovecmd      = '.g:netrw_localmovecmd
   put = 'let g:netrw_local_rmdir       = '.g:netrw_local_rmdir
-  put = 'let g:netrw_liststyle         = '.g:netrw_liststyle
   put = 'let g:netrw_maxfilenamelen    = '.g:netrw_maxfilenamelen
   put = 'let g:netrw_menu              = '.g:netrw_menu
   put = 'let g:netrw_mkdir_cmd         = '.g:netrw_mkdir_cmd
+  put = 'let g:netrw_preview           = '.g:netrw_preview
   put = 'let g:netrw_rename_cmd        = '.g:netrw_rename_cmd
+  put = 'let g:netrw_retmap            = '.g:netrw_retmap
   put = 'let g:netrw_rm_cmd            = '.g:netrw_rm_cmd
   put = 'let g:netrw_rmdir_cmd         = '.g:netrw_rmdir_cmd
   put = 'let g:netrw_rmf_cmd           = '.g:netrw_rmf_cmd
@@ -125,11 +138,15 @@
   put = 'let g:netrw_sort_by           = '.g:netrw_sort_by
   put = 'let g:netrw_sort_direction    = '.g:netrw_sort_direction
   put = 'let g:netrw_sort_sequence     = '.g:netrw_sort_sequence
+  put = 'let g:netrw_special_syntax    = '.g:netrw_special_syntax
   put = 'let g:netrw_ssh_browse_reject = '.g:netrw_ssh_browse_reject
   put = 'let g:netrw_scpport           = '.g:netrw_scpport
   put = 'let g:netrw_sshport           = '.g:netrw_sshport
   put = 'let g:netrw_timefmt           = '.g:netrw_timefmt
+  let tmpfileescline= line("$")
+  put ='let g:netrw_tmpfile_escape...'
   put = 'let g:netrw_use_noswf         = '.g:netrw_use_noswf
+  put = 'let g:netrw_xstrlen           = '.g:netrw_xstrlen
   put = 'let g:netrw_winsize           = '.g:netrw_winsize
 
   put =''
@@ -142,13 +159,18 @@
   silent %s/= $/= ''/e
   1
 
-  " Put in shq setting.
+  " Put in g:netrw_shq setting and g:netrw_cd_escape
   " (deferred so as to avoid the quote manipulation just preceding)
   if g:netrw_shq == "'"
-   call setline(shqline,'let g:netrw_shq               = "'.g:netrw_shq.'"')
+   call setline(shqline,      'let g:netrw_shq               = "'.g:netrw_shq.'"')
   else
-   call setline(shqline,"let g:netrw_shq               = '".g:netrw_shq."'")
+   call setline(shqline,      "let g:netrw_shq               = '".g:netrw_shq."'")
   endif
+  call setline(cdescline,     "let g:netrw_cd_escape         = ".'"'.escape(g:netrw_cd_escape,'\"').'"')
+  call setline(decompressline,"let g:netrw_decompress        = ".substitute(string(g:netrw_decompress),"^'\\(.*\\)'$",'\1',''))
+  call setline(fnameescline,  "let g:netrw_fname_escape      = '".escape(g:netrw_fname_escape,"'")."'")
+  call setline(globescline,   "let g:netrw_glob_escape       = '".escape(g:netrw_glob_escape,"'")."'")
+  call setline(tmpfileescline,"let g:netrw_tmpfile_escape    = '".escape(g:netrw_tmpfile_escape,"'")."'")
 
   set nomod
 
--- vim-7.1.314.orig/runtime/autoload/spellfile.vim
+++ vim-7.1.314/runtime/autoload/spellfile.vim
@@ -106,7 +106,8 @@
     endfor
     let dirchoice = confirm(msg, dirchoices) - 2
     if dirchoice >= 0
-      exe "write " . escape(dirlist[dirchoice], ' ') . '/' . fname
+      let dirname = fnameescape(dirlist[dirchoice])
+      exe "write " . dirname . '/' . fname
 
       " Also download the .sug file, if the user wants to.
       let msg = "Do you want me to try getting the .sug file?\n"
@@ -119,7 +120,7 @@
 	call spellfile#Nread(fname)
 	if getline(2) =~ 'VIMsug'
 	  1d
-	  exe "write " . escape(dirlist[dirchoice], ' ') . '/' . fname
+	  exe "write " . dirname . '/' . fname
 	  set nomod
 	else
 	  echo 'Sorry, downloading failed'
--- vim-7.1.314.orig/runtime/autoload/tar.vim
+++ vim-7.1.314/runtime/autoload/tar.vim
@@ -1,21 +1,21 @@
 " tar.vim: Handles browsing tarfiles
 "            AUTOLOAD PORTION
-" Date:			Sep 29, 2006
-" Version:		11
+" Date:			Jun 12, 2008
+" Version:		19 + changes by Bram + Debian
 " Maintainer:	Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
 " License:		Vim License  (see vim's :help license)
 "
 "	Contains many ideas from Michael Toren's <tar.vim>
 "
-" Copyright:    Copyright (C) 2005 Charles E. Campbell, Jr. {{{1
+" Copyright:    Copyright (C) 2005-2008 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,
-"               tarPlugin.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
-"               of this software.
+"               tar.vim and tarPlugin.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.
 
 " ---------------------------------------------------------------------
 " Load Once: {{{1
@@ -24,8 +24,11 @@
 if &cp || exists("g:loaded_tar") || v:version < 700
  finish
 endif
-let g:loaded_tar= "v11"
+let g:loaded_tar= "v19+b+Debian"
 "call Decho("loading autoload/tar.vim")
+if v:version < 701 || (v:version == 701 && !has("patch299"))
+ echoerr "(autoload/tar.vim) need vim v7.1 with patchlevel 299"
+endif
 
 " ---------------------------------------------------------------------
 "  Default Settings: {{{1
@@ -41,12 +44,33 @@
 if !exists("g:tar_writeoptions")
  let g:tar_writeoptions= "uf"
 endif
+
+if !exists("g:netrw_cygwin")
+ if has("win32") || has("win95") || has("win64") || has("win16")
+  if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
+   let g:netrw_cygwin= 1
+  else
+   let g:netrw_cygwin= 0
+  endif
+ else
+  let g:netrw_cygwin= 0
+ endif
+endif
+
+" set up shell quoting character
 if !exists("g:tar_shq")
- if has("unix")
-  let g:tar_shq= "'"
+ if exists("&shq") && &shq != ""
+  let g:tar_shq= &shq
+ elseif has("win32") || has("win95") || has("win64") || has("win16")
+  if exists("g:netrw_cygwin") && g:netrw_cygwin
+   let g:tar_shq= "'"
+  else
+   let g:tar_shq= '"'
+  endif
  else
-  let g:tar_shq= '"'
+  let g:tar_shq= "'"
  endif
+" call Decho("g:tar_shq<".g:tar_shq.">")
 endif
 
 " ----------------
@@ -95,27 +119,36 @@
 
   " give header
 "  call Decho("printing header")
-  exe "$put ='".'\"'." tar.vim version ".g:loaded_tar."'"
-  exe "$put ='".'\"'." Browsing tarfile ".a:tarfile."'"
-  exe "$put ='".'\"'." Select a file with cursor and press ENTER"."'"
+  let lastline= line("$")
+  call setline(lastline+1,'" tar.vim version '.g:loaded_tar)
+  call setline(lastline+2,'" Browsing tarfile '.a:tarfile)
+  call setline(lastline+3,'" Select a file with cursor and press ENTER')
+  $put =''
   0d
   $
 
   let tarfile= a:tarfile
   if has("win32") && executable("cygpath")
    " assuming cygwin
-   let tarfile=substitute(system("cygpath -u ".tarfile),'\n$','','e')
+   let tarfile=substitute(system("cygpath -u ".s:Escape(tarfile,0)),'\n$','','e')
   endif
   let curlast= line("$")
   if tarfile =~# '\.\(gz\|tgz\)$'
-"   call Decho("exe silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - ")
-   exe "silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - "
+"   call Decho("1: exe silent r! gzip -d -c ".s:Escape(tarfile)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
+   exe "silent r! gzip -d -c -- ".s:Escape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
+  elseif tarfile =~# '\.lrp'
+"   call Decho("2: exe silent r! cat -- ".s:Escape(tarfile)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ")
+   exe "silent r! cat -- ".s:Escape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - "
   elseif tarfile =~# '\.bz2$'
-"   call Decho("exe silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - ")
-   exe "silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - "
+"   call Decho("3: exe silent r! bzip2 -d -c ".s:Escape(tarfile)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
+   exe "silent r! bzip2 -d -c -- ".s:Escape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
   else
-"   call Decho("exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".g:tar_shq.tarfile.g:tar_shq)
-   exe "silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".g:tar_shq.tarfile.g:tar_shq
+   if tarfile =~ '^\s*-'
+    " A file name starting with a dash may be taken as an option.  Prepend ./ to avoid that.
+    let tarfile = substitute(tarfile, '-', './-', '')
+   endif
+"   call Decho("4: exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".s:Escape(tarfile))
+   exe "silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".s:Escape(tarfile,1)
   endif
   if v:shell_error != 0
    redraw!
@@ -131,7 +164,7 @@
    silent %d
    let eikeep= &ei
    set ei=BufReadCmd,FileReadCmd
-   exe "r ".a:tarfile
+   exe "r ".fnameescape(a:tarfile)
    let &ei= eikeep
    1d
 "   call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
@@ -154,6 +187,12 @@
   let fname= getline(".")
 "  call Decho("fname<".fname.">")
 
+  if !exists("g:tar_secure") && fname =~ '^\s*-\|\s\+-'
+   redraw!
+   echohl WarningMsg | echo '***error*** (tar#BrowseSelect) rejecting tarfile member<'.fname.'> because of embedded "-"; See :help tar-options'
+   return
+  endif
+
   " sanity check
   if fname =~ '^"'
    let &report= repkeep
@@ -166,13 +205,15 @@
   let curfile= expand("%")
   if has("win32") && executable("cygpath")
    " assuming cygwin
-   let tarfile=substitute(system("cygpath -u ".tarfile),'\n$','','e')
+   let tarfile=substitute(system("cygpath -u ".s:Escape(tarfile,0)),'\n$','','e')
   endif
 
   new
-  wincmd _
+  if !exists("g:tar_nomax") || g:tar_nomax == 0
+   wincmd _
+  endif
   let s:tblfile_{winnr()}= curfile
-  call tar#Read("tarfile:".tarfile.':'.fname,1)
+  call tar#Read("tarfile:".tarfile.'::'.fname,1)
   filetype detect
 
   let &report= repkeep
@@ -185,27 +226,59 @@
 "  call Dfunc("tar#Read(fname<".a:fname.">,mode=".a:mode.")")
   let repkeep= &report
   set report=10
-  let tarfile = substitute(a:fname,'tarfile:\(.\{-}\):.*$','\1','')
-  let fname   = substitute(a:fname,'tarfile:.\{-}:\(.*\)$','\1','')
+  let tarfile = substitute(a:fname,'tarfile:\(.\{-}\)::.*$','\1','')
+  let fname   = substitute(a:fname,'tarfile:.\{-}::\(.*\)$','\1','')
   if has("win32") && executable("cygpath")
    " assuming cygwin
-   let tarfile=substitute(system("cygpath -u ".tarfile),'\n$','','e')
+   let tarfile=substitute(system("cygpath -u ".s:Escape(tarfile,0)),'\n$','','e')
   endif
 "  call Decho("tarfile<".tarfile.">")
 "  call Decho("fname<".fname.">")
 
+  if      fname =~ '\.gz$'  && executable("zcat")
+   let decmp= "|zcat"
+   let doro = 1
+  elseif  fname =~ '\.bz2$' && executable("bzcat")
+   let decmp= "|bzcat"
+   let doro = 1
+  else
+   let decmp=""
+   let doro = 0
+   if fname =~ '\.gz$\|\.bz2$\|\.Z$\|\.zip$'
+    setlocal bin
+   endif
+  endif
+
+  if exists("g:tar_secure")
+   let tar_secure= " -- "
+  else
+   let tar_secure= " "
+  endif
   if tarfile =~# '\.\(gz\|tgz\)$'
-"   call Decho("exe silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -OPxf - '".fname."'")
-   exe "silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_readoptions." - '".fname."'"
+"   call Decho("5: exe silent r! gzip -d -c -- ".s:Escape(tarfile)."| ".g:tar_cmd.' -'.g:tar_readoptions.' - '.s:Escape(fname))
+   exe "silent r! gzip -d -c -- ".s:Escape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.s:Escape(fname,1).decmp
+  elseif tarfile =~# '\.lrp$'
+"   call Decho("6: exe silent r! cat ".s:Escape(tarfile)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".s:Escape(fname).decmp)
+   exe "silent r! cat -- ".s:Escape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.s:Escape(fname,1).decmp
   elseif tarfile =~# '\.bz2$'
-"   call Decho("exe silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_readoptions." - '".fname."'")
-   exe "silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_readoptions." - '".fname."'"
+"   call Decho("7: exe silent r! bzip2 -d -c ".s:Escape(tarfile)."| ".g:tar_cmd." -".g:tar_readoptions." - ".s:Escape(fname).decmp)
+   exe "silent r! bzip2 -d -c -- ".s:Escape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.s:Escape(fname,1).decmp
   else
-"   call Decho("exe silent r! ".g:tar_cmd." -".g:tar_readoptions." ".g:tar_shq.tarfile.g:tar_shq." ".g:tar_shq.fname.g:tar_shq)
-   exe "silent r! ".g:tar_cmd." -".g:tar_readoptions." ".g:tar_shq.tarfile.g:tar_shq." ".g:tar_shq.fname.g:tar_shq
+   if tarfile =~ '^\s*-'
+    " A file name starting with a dash may be taken as an option.  Prepend ./ to avoid that.
+    let tarfile = substitute(tarfile, '-', './-', '')
+   endif
+"   call Decho("8: exe silent r! ".g:tar_cmd." -".g:tar_readoptions." -- ".s:Escape(tarfile)." ".s:Escape(fname))
+   exe "silent r! ".g:tar_cmd." -".g:tar_readoptions." ".s:Escape(tarfile,1)." -- ".tar_secure.s:Escape(fname,1).decmp
   endif
+
+  if doro
+   " because the reverse process of compressing changed files back into the tarball is not currently supported
+   setlocal ro
+  endif
+
   let w:tarfile= a:fname
-  exe "file tarfile:".fname
+  exe "file tarfile::".fnameescape(fname)
 
   " cleanup
   0d
@@ -222,6 +295,12 @@
   let repkeep= &report
   set report=10
 
+  if !exists("g:tar_secure") && a:fname =~ '^\s*-\|\s\+-'
+   redraw!
+   echohl WarningMsg | echo '***error*** (tar#Write) rejecting tarfile member<'.a:fname.'> because of embedded "-"; See :help tar-options'
+   return
+  endif
+
   " sanity checks
   if !executable(g:tar_cmd)
    redraw!
@@ -251,7 +330,7 @@
 
   " attempt to change to the indicated directory
   try
-   exe "cd ".escape(tmpdir,' \')
+   exe "cd ".fnameescape(tmpdir)
   catch /^Vim\%((\a\+)\)\=:E344/
    redraw!
    echohl Error | echo "***error*** (tar#Write) cannot cd to temporary directory" | Echohl None
@@ -270,24 +349,26 @@
   cd _ZIPVIM_
 "  call Decho("current directory now: ".getcwd())
 
-  let tarfile = substitute(w:tarfile,'tarfile:\(.\{-}\):.*$','\1','')
-  let fname   = substitute(w:tarfile,'tarfile:.\{-}:\(.*\)$','\1','')
+  let tarfile = substitute(w:tarfile,'tarfile:\(.\{-}\)::.*$','\1','')
+  let fname   = substitute(w:tarfile,'tarfile:.\{-}::\(.*\)$','\1','')
 
   " handle compressed archives
   if tarfile =~# '\.gz'
-   call system("gzip -d ".tarfile)
+   call system("gzip -d -- ".s:Escape(tarfile,0))
    let tarfile = substitute(tarfile,'\.gz','','e')
-   let compress= "gzip '".tarfile."'"
+   let compress= "gzip -- ".s:Escape(tarfile,0)
   elseif tarfile =~# '\.tgz'
-   call system("gzip -d ".tarfile)
+   call system("gzip -d -- ".s:Escape(tarfile,0))
    let tarfile = substitute(tarfile,'\.tgz','.tar','e')
-   let compress= "gzip '".tarfile."'"
+   let compress= "gzip -- ".s:Escape(tarfile,0)
    let tgz     = 1
   elseif tarfile =~# '\.bz2'
-   call system("bzip2 -d ".tarfile)
+   call system("bzip2 -d -- ".s:Escape(tarfile,0))
    let tarfile = substitute(tarfile,'\.bz2','','e')
-   let compress= "bzip2 '".tarfile."'"
+   let compress= "bzip2 -- ".s:Escape(tarfile,0)
   endif
+"  call Decho("tarfile<".tarfile.">")
+"  call Decho("compress<".compress.">")
 
   if v:shell_error != 0
    redraw!
@@ -300,35 +381,44 @@
    if fname =~ '/'
     let dirpath = substitute(fname,'/[^/]\+$','','e')
     if executable("cygpath")
-     let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
+     let dirpath = substitute(system("cygpath ".s:Escape(dirpath, 0)),'\n','','e')
     endif
     call mkdir(dirpath,"p")
    endif
    if tarfile !~ '/'
     let tarfile= curdir.'/'.tarfile
    endif
+   if tarfile =~ '^\s*-'
+    " A file name starting with a dash may be taken as an option.  Prepend ./ to avoid that.
+    let tarfile = substitute(tarfile, '-', './-', '')
+   endif
 "   call Decho("tarfile<".tarfile."> fname<".fname.">")
  
-   exe "w! ".fname
+   if exists("g:tar_secure")
+    let tar_secure= " -- "
+   else
+    let tar_secure= " "
+   endif
+   exe "w! ".fnameescape(fname)
    if executable("cygpath")
-    let tarfile = substitute(system("cygpath ".tarfile),'\n','','e')
+    let tarfile = substitute(system("cygpath ".s:Escape(tarfile,0)),'\n','','e')
    endif
  
    " delete old file from tarfile
-"   call Decho("tar --delete -f '".tarfile."' '".fname."'")
-   call system("tar --delete -f '".tarfile."' '".fname."'")
+"   call Decho("system(tar --delete -f ".s:Escape(tarfile)." -- ".s:Escape(fname).")")
+   call system("tar --delete -f ".s:Escape(tarfile,0).tar_secure.s:Escape(fname,0))
    if v:shell_error != 0
     redraw!
-    echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
+    echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
 "    call inputsave()|call input("Press <cr> to continue")|call inputrestore()
    else
  
     " update tarfile with new file 
-"    call Decho("tar -".g:tar_writeoptions." '".tarfile."' '".fname."'")
-    call system("tar -".g:tar_writeoptions." '".tarfile."' '".fname."'")
+"    call Decho("tar -".g:tar_writeoptions." ".s:Escape(tarfile)." -- ".s:Escape(fname))
+    call system("tar -".g:tar_writeoptions." ".s:Escape(tarfile,0).tar_secure.s:Escape(fname,0))
     if v:shell_error != 0
      redraw!
-     echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
+     echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
 "     call inputsave()|call input("Press <cr> to continue")|call inputrestore()
     elseif exists("compress")
 "     call Decho("call system(".compress.")")
@@ -348,7 +438,7 @@
     let binkeep= &binary
     let eikeep = &ei
     set binary ei=all
-    exe "e! ".tarfile
+    exe "e! ".fnameescape(tarfile)
     call netrw#NetWrite(tblfile)
     let &ei     = eikeep
     let &binary = binkeep
@@ -360,7 +450,7 @@
   " cleanup and restore current directory
   cd ..
   call s:Rmdir("_ZIPVIM_")
-  exe "cd ".escape(curdir,' \')
+  exe "cd ".fnameescape(curdir)
   setlocal nomod
 
   let &report= repkeep
@@ -372,19 +462,35 @@
 fun! s:Rmdir(fname)
 "  call Dfunc("Rmdir(fname<".a:fname.">)")
   if has("unix")
-   call system("/bin/rm -rf ".a:fname)
+   call system("/bin/rm -rf -- ".s:Escape(a:fname,0))
   elseif has("win32") || has("win95") || has("win64") || has("win16")
    if &shell =~? "sh$"
-    call system("/bin/rm -rf ".a:fname)
+    call system("/bin/rm -rf -- ".s:Escape(a:fname,0))
    else
-    call system("del /S ".a:fname)
+    call system("del /S ".s:Escape(a:fname,0))
    endif
   endif
 "  call Dret("Rmdir")
 endfun
 
-" ------------------------------------------------------------------------
+" ---------------------------------------------------------------------
+" s:Escape: {{{2
+fun s:Escape(name,isfilt)
+  " shellescape() was added by patch 7.0.111
+  if exists("*shellescape")
+   if a:isfilt
+    let qnameq= shellescape(a:name,1)
+   else
+    let qnameq= shellescape(a:name)
+   endif
+  else
+   let qnameq= g:tar_shq . a:name . g:tar_shq
+  endif
+  return qnameq
+endfun
+
+" ---------------------------------------------------------------------
 " Modelines And Restoration: {{{1
 let &cpo= s:keepcpo
 unlet s:keepcpo
-"  vim:ts=8 fdm=marker
+" vim:ts=8 fdm=marker
--- vim-7.1.314.orig/runtime/autoload/vimball.vim
+++ vim-7.1.314/runtime/autoload/vimball.vim
@@ -1,9 +1,9 @@
 " vimball.vim : construct a file containing both paths and files
 " Author:	Charles E. Campbell, Jr.
-" Date:		May 07, 2007
-" Version:	22
+" Date:		Jun 05, 2008
+" Version:	27+Debian
 " GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
-" Copyright: (c) 2004-2006 by Charles E. Campbell, Jr.
+" Copyright: (c) 2004-2008 by Charles E. Campbell, Jr.
 "            The VIM LICENSE applies to Vimball.vim, and Vimball.txt
 "            (see |copyright|) except use "Vimball" instead of "Vim".
 "            No warranty, express or implied.
@@ -15,8 +15,9 @@
  finish
 endif
 let s:keepcpo        = &cpo
-let g:loaded_vimball = "v22"
+let g:loaded_vimball = "v27+Debian"
 set cpo&vim
+"DechoTabOn
 
 " =====================================================================
 " Constants: {{{1
@@ -24,6 +25,57 @@
  let s:USAGE   = 0
  let s:WARNING = 1
  let s:ERROR   = 2
+
+ " determine if cygwin is in use or not
+ if !exists("g:netrw_cygwin")
+  if has("win32") || has("win95") || has("win64") || has("win16")
+   if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
+    let g:netrw_cygwin= 1
+   else
+    let g:netrw_cygwin= 0
+   endif
+  else
+   let g:netrw_cygwin= 0
+  endif
+ endif
+
+ " set up g:vimball_mkdir if the mkdir() call isn't defined
+ if !exists("*mkdir")
+  if exists("g:netrw_local_mkdir")
+   let g:vimball_mkdir= g:netrw_local_mkdir
+  elseif executable("mkdir")
+   let g:vimball_mkdir= "mkdir"
+  elseif executable("makedir")
+   let g:vimball_mkdir= "makedir"
+  endif
+  if !exists(g:vimball_mkdir)
+   call vimball#ShowMesg(s:WARNING,"(vimball) g:vimball_mkdir undefined")
+  endif
+ endif
+
+ " set up shell quoting character
+ if exists("g:vimball_shq") && !exists("g:netrw_shq")
+  let g:netrw_shq= g:vimball_shq
+ endif
+ if !exists("g:netrw_shq")
+  if exists("&shq") && &shq != ""
+   let g:netrw_shq= &shq
+  elseif has("win32") || has("win95") || has("win64") || has("win16")
+   if g:netrw_cygwin
+    let g:netrw_shq= "'"
+   else
+    let g:netrw_shq= '"'
+   endif
+  else
+   let g:netrw_shq= "'"
+  endif
+" call Decho("g:netrw_shq<".g:netrw_shq.">")
+ endif
+
+ " set up escape string (used to protect paths)
+ if !exists("g:vimball_path_escape")
+  let g:vimball_path_escape= ' ;#%'
+ endif
 endif
 
 " =====================================================================
@@ -31,7 +83,12 @@
 
 " ---------------------------------------------------------------------
 " vimball#MkVimball: creates a vimball given a list of paths to files {{{2
-" Vimball Format:
+" Input:
+"     line1,line2: a range of lines containing paths to files to be included in the vimball
+"     writelevel : if true, force a write to filename.vba, even if it exists
+"                  (usually accomplished with :MkVimball! ...
+"     filename   : base name of file to be created (ie. filename.vba)
+" Output: a filename.vba using vimball format:
 "     path
 "     filesize
 "     [file]
@@ -40,7 +97,7 @@
 "     [file]
 fun! vimball#MkVimball(line1,line2,writelevel,...) range
 "  call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:1.">) a:0=".a:0)
-  if a:1 =~ '.vim' || a:1 =~ '.txt'
+  if a:1 =~ '\.vim$' || a:1 =~ '\.txt$'
    let vbname= substitute(a:1,'\.\a\{3}$','.vba','')
   else
    let vbname= a:1
@@ -61,7 +118,7 @@
   endif
 
   " user option bypass
-  call s:SaveSettings()
+  call vimball#SaveSettings()
 
   if a:0 >= 2
    " allow user to specify where to get the files
@@ -87,7 +144,7 @@
    if !filereadable(svfile)
     call vimball#ShowMesg(s:ERROR,"unable to read file<".svfile.">")
 	call s:ChgDir(curdir)
-	call s:RestoreSettings()
+	call vimball#RestoreSettings()
 "    call Dret("MkVimball")
     return
    endif
@@ -112,9 +169,8 @@
    call setline(lastline+1,0)
 
    " write the file from the tab
-   let svfilepath= s:Path(svfile,'')
-"   call Decho("exe $r ".svfilepath)
-   exe "$r ".svfilepath
+"   call Decho("exe $r ".fnameescape(svfilepath))
+   exe "$r ".fnameescape(svfile)
 
    call setline(lastline+1,line("$") - lastline - 1)
 "   call Decho("lastline=".lastline." line$=".line("$"))
@@ -127,14 +183,13 @@
   " write the vimball
   exe "tabn ".vbtabnr
   call s:ChgDir(curdir)
+  setlocal ff=unix
   if a:writelevel
-   let vbnamepath= s:Path(vbname,'')
-"   call Decho("exe w! ".vbnamepath)
-   exe "w! ".vbnamepath
-  else
-   let vbnamepath= s:Path(vbname,'')
-"   call Decho("exe w ".vbnamepath)
-   exe "w ".vbnamepath
+"   call Decho("exe w! ".fnameescape(vbnamepath))
+   exe "w! ".fnameescape(vbname)
+  else
+"   call Decho("exe w ".fnameescape(vbnamepath))
+   exe "w ".fnameescape(vbname)
   endif
 "  call Decho("Vimball<".vbname."> created")
   echo "Vimball<".vbname."> created"
@@ -145,16 +200,24 @@
   exe "tabc ".vbtabnr
 
   " restore options
-  call s:RestoreSettings()
+  call vimball#RestoreSettings()
 
 "  call Dret("MkVimball")
 endfun
 
 " ---------------------------------------------------------------------
 " vimball#Vimball: extract and distribute contents from a vimball {{{2
+"                  (invoked the the UseVimball command embedded in 
+"                  vimballs' prologue)
 fun! vimball#Vimball(really,...)
 "  call Dfunc("vimball#Vimball(really=".a:really.") a:0=".a:0)
 
+  if v:version < 701 || (v:version == 701 && !exists("*fnameescape"))
+   echoerr "your vim is missing the fnameescape() function"
+"   call Dret("vimball#Vimball : needs 7.1 with patch 299")
+   return
+  endif
+
   if getline(1) !~ '^" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.$'
    echoerr "(Vimball) The current file does not appear to be a Vimball!"
 "   call Dret("vimball#Vimball")
@@ -162,8 +225,9 @@
   endif
 
   " set up standard settings
-  call s:SaveSettings()
-  let curtabnr = tabpagenr()
+  call vimball#SaveSettings()
+  let curtabnr    = tabpagenr()
+  let vimballfile = expand("%:tr")
 
   " set up vimball tab
 "  call Decho("setting up vimball tab")
@@ -186,16 +250,18 @@
 "  call Decho("curdir<".curdir.">")
 
   call s:ChgDir(home)
-  call vimball#RmVimball()
+  let s:ok_unablefind= 1
+  call vimball#RmVimball(vimballfile)
+  unlet s:ok_unablefind
 
   let linenr  = 4
   let filecnt = 0
 
   " give title to listing of (extracted) files from Vimball Archive
   if a:really
-   echohl Title | echomsg "Vimball Archive" | echohl None
-  else
-   echohl Title | echomsg "Vimball Archive Listing" | echohl None
+   echohl Title     | echomsg "Vimball Archive"         | echohl None
+  else             
+   echohl Title     | echomsg "Vimball Archive Listing" | echohl None
    echohl Statement | echomsg "files would be placed under: ".home | echohl None
   endif
 
@@ -206,7 +272,7 @@
   while 1 < linenr && linenr < line("$")
    let fname   = substitute(getline(linenr),'\t\[\[\[1$','','')
    let fname   = substitute(fname,'\\','/','g')
-   let fsize   = getline(linenr+1)
+   let fsize   = getline(linenr+1)+0
    let filecnt = filecnt + 1
 "   call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt)
 
@@ -219,10 +285,10 @@
 "   call Decho("using L#".(linenr+1).": fsize=".fsize)
 
    " Allow AsNeeded/ directory to take place of plugin/ directory
-   " when AsNeeded/filename is filereadable
+   " when AsNeeded/filename is filereadable or was present in VimballRecord
    if fname =~ '\<plugin/'
    	let anfname= substitute(fname,'\<plugin/','AsNeeded/','')
-	if filereadable(anfname)
+	if filereadable(anfname) || (exists("s:VBRstring") && s:VBRstring =~ anfname)
 "	 call Decho("using anfname<".anfname."> instead of <".fname.">")
 	 let fname= anfname
 	endif
@@ -240,7 +306,11 @@
 "	 call Decho("dirname<".dirname.">")
      if !isdirectory(dirname)
 "      call Decho("making <".dirname.">")
-      call mkdir(dirname)
+      if exists("g:vimball_mkdir")
+	   call system(g:vimball_mkdir." ".s:Escape(dirname))
+      else
+       call mkdir(dirname)
+      endif
 	  call s:RecordInVar(home,"rmdir('".dirname."')")
      endif
     endwhile
@@ -257,6 +327,7 @@
    " copy "a" buffer into tab
 "   call Decho('copy "a buffer into tab#'.vbtabnr)
    exe "tabn ".vbtabnr
+   setlocal ma
    silent! %d
    silent put a
    1
@@ -264,11 +335,11 @@
 
    " write tab to file
    if a:really
-    let fnamepath= s:Path(home."/".fname,'')
-"    call Decho("exe w! ".fnamepath)
-    exe "silent w! ".fnamepath
+    let fnamepath= home."/".fname
+"    call Decho("exe w! ".fnameescape(fnamepath))
+	exe "silent w! ".fnameescape(fnamepath)
     echo "wrote ".fnamepath
-	call s:RecordInVar(home,"call delete('".fnamepath."')")
+	call s:RecordInVar(home,"call delete('".fnameescape(fnamepath)."')")
    endif
 
    " return to tab with vimball
@@ -277,23 +348,22 @@
 
    " set up help if its a doc/*.txt file
 "   call Decho("didhelp<".didhelp."> fname<".fname.">")
-   if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.txt$'
-   	let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.txt$','\1','')
+   if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.\(txt\|..x\)$'
+   	let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.\(txt\|..x\)$','\1','')
 "	call Decho("didhelp<".didhelp.">")
    endif
 
    " update for next file
-"   let oldlinenr = linenr " Decho
-   let linenr    = linenr + fsize
-"   call Decho("update linenr= [linenr=".oldlinenr."] + [fsize=".fsize."] = ".linenr)
+"   call Decho("update linenr= [linenr=".linenr."] + [fsize=".fsize."] = ".(linenr+fsize))
+   let linenr= linenr + fsize
   endwhile
 
   " set up help
 "  call Decho("about to set up help: didhelp<".didhelp.">")
   if didhelp != ""
-   let htpath= escape(substitute(s:Path(home."/".didhelp,'"'),'"','','g'),' ')
+   let htpath= home."/".didhelp
 "   call Decho("exe helptags ".htpath)
-   exe "helptags ".htpath
+   exe "helptags ".fnameescape(htpath)
    echo "did helptags"
   endif
 
@@ -311,7 +381,7 @@
   setlocal nomod bh=wipe
   exe "tabn ".curtabnr
   exe "tabc ".vbtabnr
-  call s:RestoreSettings()
+  call vimball#RestoreSettings()
   call s:ChgDir(curdir)
 
 "  call Dret("vimball#Vimball")
@@ -329,12 +399,10 @@
 "   call Dret("vimball#RmVimball : (g:vimball_norecord)")
    return
   endif
-  let eikeep= &ei
-  set ei=all
-"  call Decho("turned off all events")
 
   if a:0 == 0
-   let curfile= '^'.expand("%:tr")
+   let curfile= expand("%:tr")
+"   call Decho("case a:0=0: curfile<".curfile."> (used expand(%:tr))")
   else
    if a:1 =~ '[\/]'
     call vimball#ShowMesg(s:USAGE,"RmVimball vimballname [path]")
@@ -342,11 +410,10 @@
     return
    endif
    let curfile= a:1
+"   call Decho("case a:0=".a:0.": curfile<".curfile.">")
   endif
-  if curfile !~ '.vba$'
-   let curfile= curfile.".vba: "
-  else
-   let curfile= curfile.": "
+  if curfile =~ '\.vba$'
+   let curfile= substitute(curfile,'\.vba','','')
   endif
   if a:0 >= 2
    let home= expand(a:2)
@@ -365,13 +432,34 @@
    keepalt keepjumps 1split 
    silent! keepalt keepjumps e .VimballRecord
    let keepsrch= @/
-   if search(curfile,'cw')
-   	let exestring= substitute(getline("."),curfile,'','')
+"   call Decho("search for ^".curfile.".vba:")
+"   call Decho("search for ^".curfile."[-0-9.]*.vba:")
+   if search('^'.curfile.": ".'cw')
+	let foundit= 1
+   elseif search('^'.curfile.".vba: ",'cw')
+	let foundit= 1
+   elseif search('^'.curfile.'[-0-9.]*.vba: ','cw')
+	let foundit= 1
+   else
+    let foundit = 0
+   endif
+   if foundit
+	let exestring  = substitute(getline("."),'^'.curfile.'\S\{-}\.vba: ','','')
+    let s:VBRstring= substitute(exestring,'call delete(','','g')
+    let s:VBRstring= substitute(s:VBRstring,"[')]",'','g')
 "	call Decho("exe ".exestring)
 	silent! keepalt keepjumps exe exestring
 	silent! keepalt keepjumps d
+	let exestring= strlen(substitute(exestring,'call delete(.\{-})|\=',"D","g"))
+"	call Decho("exestring<".exestring.">")
+	echomsg "removed ".exestring." files"
    else
-"   	call Decho("unable to find <".curfile."> in .VimballRecord")
+    let s:VBRstring= ''
+	let curfile    = substitute(curfile,'\.vba','','')
+"    call Decho("unable to find <".curfile."> in .VimballRecord")
+	if !exists("s:ok_unablefind")
+     call vimball#ShowMesg(s:WARNING,"(RmVimball) unable to find <".curfile."> in .VimballRecord")
+	endif
    endif
    silent! keepalt keepjumps g/^\s*$/d
    silent! keepalt keepjumps wq!
@@ -379,10 +467,6 @@
   endif
   call s:ChgDir(curdir)
 
-  " restoring events
-"  call Decho("restoring events")
-  let &ei= eikeep
-
 "  call Dret("vimball#RmVimball")
 endfun
 
@@ -393,21 +477,56 @@
 
   " decompression:
   if     expand("%") =~ '.*\.gz'  && executable("gunzip")
-   exe "!gunzip ".a:fname
+   " handle *.gz with gunzip
+   silent exe "!gunzip ".s:Escape(a:fname)
+   if v:shell_error != 0
+	call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) gunzip may have failed with <".a:fname.">")
+   endif
    let fname= substitute(a:fname,'\.gz$','','')
    exe "e ".escape(fname,' \')
    call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
+
+  elseif expand("%") =~ '.*\.gz' && executable("gzip")
+   " handle *.gz with gzip -d
+   silent exe "!gzip -d ".s:Escape(a:fname)
+   if v:shell_error != 0
+	call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "gzip -d" may have failed with <'.a:fname.">")
+   endif
+   let fname= substitute(a:fname,'\.gz$','','')
+   exe "e ".escape(fname,' \')
+   call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
+
   elseif expand("%") =~ '.*\.bz2' && executable("bunzip2")
-   exe "!bunzip2 ".a:fname
+   " handle *.bz2 with bunzip2
+   silent exe "!bunzip2 ".s:Escape(a:fname)
+   if v:shell_error != 0
+	call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) bunzip2 may have failed with <".a:fname.">")
+   endif
+   let fname= substitute(a:fname,'\.bz2$','','')
+   exe "e ".escape(fname,' \')
+   call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
+
+  elseif expand("%") =~ '.*\.bz2' && executable("bzip2")
+   " handle *.bz2 with bzip2 -d
+   silent exe "!bzip2 -d ".s:Escape(a:fname)
+   if v:shell_error != 0
+	call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "bzip2 -d" may have failed with <'.a:fname.">")
+   endif
    let fname= substitute(a:fname,'\.bz2$','','')
    exe "e ".escape(fname,' \')
    call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
+
   elseif expand("%") =~ '.*\.zip' && executable("unzip")
-   exe "!unzip ".a:fname
+   " handle *.zip with unzip
+   silent exe "!unzip ".s:Escape(a:fname)
+   if v:shell_error != 0
+	call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) unzip may have failed with <".a:fname.">")
+   endif
    let fname= substitute(a:fname,'\.zip$','','')
    exe "e ".escape(fname,' \')
    call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
   endif
+
   set noma bt=nofile fmr=[[[,]]] fdm=marker
 
 "  call Dret("Decompress")
@@ -443,34 +562,35 @@
 
 "  call Dret("vimball#ShowMesg")
 endfun
-
-" ---------------------------------------------------------------------
-let &cpo= s:keepcpo
-unlet s:keepcpo
 " =====================================================================
 " s:ChgDir: change directory (in spite of Windoze) {{{2
 fun! s:ChgDir(newdir)
 "  call Dfunc("ChgDir(newdir<".a:newdir.">)")
   if (has("win32") || has("win95") || has("win64") || has("win16"))
-    exe 'silent cd '.escape(substitute(a:newdir,'/','\\','g'),' ')
+   exe 'silent cd '.fnameescape(substitute(a:newdir,'/','\\','g'))
   else
-   exe 'silent cd '.escape(a:newdir,' ')
+   exe 'silent cd '.fnameescape(a:newdir)
   endif
-"  call Dret("ChgDir")
+"  call Dret("ChgDir : curdir<".getcwd().">")
 endfun
 
 " ---------------------------------------------------------------------
-" s:Path: prepend and append quotes, do escaping, as necessary {{{2
+" s:Path: prepend and append quotes and do escaping {{{2
 fun! s:Path(cmd,quote)
-"  call Dfunc("Path(cmd<".a:cmd."> quote<".a:quote.">)")
+"  call Dfunc("Path(cmd<".a:cmd."> quote<".a:quote.">) vimball_path_escape<".g:vimball_path_escape.">")
   if (has("win32") || has("win95") || has("win64") || has("win16"))
-   let cmdpath= a:quote.substitute(a:cmd,'/','\\','g').a:quote
+"   let cmdpath= a:quote.substitute(a:cmd,'/','\\','g').a:quote
+   let cmdpath= a:quote.substitute(a:cmd,'\\','/','g').a:quote
+"   call Decho("cmdpath<".cmdpath."> (win32 mod)")
   else
    let cmdpath= a:quote.a:cmd.a:quote
+"   call Decho("cmdpath<".cmdpath."> (not-win32 mod)")
   endif
-  if a:quote == ""
+  if a:quote == "" && g:vimball_path_escape !~ ' '
    let cmdpath= escape(cmdpath,' ')
+"   call Decho("cmdpath<".cmdpath."> (empty quote case)")
   endif
+  let cmdpath= escape(cmdpath,g:vimball_path_escape)
 "  call Dret("Path <".cmdpath.">")
   return cmdpath
 endfun
@@ -485,23 +605,20 @@
 "   else
 "    let s:recorddir= s:recorddir."|".substitute(a:cmd,'^rmdir',"call s:Rmdir",'')
 "   endif
-"   call Decho("recorddir=".s:recorddir)
   elseif !exists("s:recordfile")
    let s:recordfile= a:cmd
-"   call Decho("recordfile=".s:recordfile)
   else
    let s:recordfile= s:recordfile."|".a:cmd
-"   call Decho("recordfile=".s:recordfile)
   endif
-"  call Dret("RecordInVar")
+"  call Dret("RecordInVar : s:recordfile<".(exists("s:recordfile")? s:recordfile : "")."> s:recorddir<".(exists("s:recorddir")? s:recorddir : "").">")
 endfun
 
 " ---------------------------------------------------------------------
 " s:RecordInFile: {{{2
 fun! s:RecordInFile(home)
-"  call Dfunc("RecordInFile()")
+"  call Dfunc("s:RecordInFile()")
   if exists("g:vimball_norecord")
-"   call Dret("RecordInFile : (g:vimball_norecord)")
+"   call Dret("s:RecordInFile : g:vimball_norecord")
    return
   endif
 
@@ -509,8 +626,12 @@
    let curdir= getcwd()
    call s:ChgDir(a:home)
    keepalt keepjumps 1split 
+
    let cmd= expand("%:tr").": "
+"   call Decho("cmd<".cmd.">")
+
    silent! keepalt keepjumps e .VimballRecord
+   setlocal ma
    $
    if exists("s:recordfile") && exists("s:recorddir")
    	let cmd= cmd.s:recordfile."|".s:recorddir
@@ -519,35 +640,33 @@
    elseif exists("s:recordfile")
    	let cmd= cmd.s:recordfile
    else
-"    call Dret("RecordInFile")
+"    call Dret("s:RecordInFile : neither recordfile nor recorddir exist")
 	return
    endif
+"   call Decho("cmd<".cmd.">")
+
+   " put command into buffer, write .VimballRecord `file
    keepalt keepjumps put=cmd
    silent! keepalt keepjumps g/^\s*$/d
    silent! keepalt keepjumps wq!
    call s:ChgDir(curdir)
-   if exists("s:recorddir") |unlet s:recorddir |endif
-   if exists("s:recordfile")|unlet s:recordfile|endif
+
+   if exists("s:recorddir")
+"	call Decho("unlet s:recorddir<".s:recorddir.">")
+   	unlet s:recorddir
+   endif
+   if exists("s:recordfile")
+"	call Decho("unlet s:recordfile<".s:recordfile.">")
+   	unlet s:recordfile
+   endif
   else
 "   call Decho("s:record[file|dir] doesn't exist")
   endif
 
-"  call Dret("RecordInFile")
+"  call Dret("s:RecordInFile")
 endfun
 
 " ---------------------------------------------------------------------
-" s:Rmdir: {{{2
-"fun! s:Rmdir(dirname)
-""  call Dfunc("s:Rmdir(dirname<".a:dirname.">)")
-"  if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
-"    call system("del ".a:dirname)
-"  else
-"   call system("rmdir ".a:dirname)
-"  endif
-""  call Dret("s:Rmdir")
-"endfun
-
-" ---------------------------------------------------------------------
 " s:VimballHome: determine/get home directory path (usually from rtp) {{{2
 fun! s:VimballHome()
 "  call Dfunc("VimballHome()")
@@ -557,6 +676,11 @@
    " go to vim plugin home
    for home in split(&rtp,',') + ['']
     if isdirectory(home) && filewritable(home) | break | endif
+	let basehome= substitute(home,'[/\\]\.vim$','','')
+    if isdirectory(basehome) && filewritable(basehome)
+	 let home= basehome."/.vim"
+	 break
+	endif
    endfor
    if home == ""
     " just pick the first directory
@@ -566,13 +690,25 @@
     let home= substitute(home,'/','\\','g')
    endif
   endif
+  " insure that the home directory exists
+"  call Decho("picked home<".home.">")
+  if !isdirectory(home)
+   if exists("g:vimball_mkdir")
+"	call Decho("home<".home."> isn't a directory -- making it now with g:vimball_mkdir<".g:vimball_mkdir.">")
+"    call Decho("system(".g:vimball_mkdir." ".s:Escape(home).")")
+    call system(g:vimball_mkdir." ".s:Escape(home))
+   else
+"	call Decho("home<".home."> isn't a directory -- making it now with mkdir()")
+    call mkdir(home)
+   endif
+  endif
 "  call Dret("VimballHome <".home.">")
   return home
 endfun
 
 " ---------------------------------------------------------------------
-" s:SaveSettings: {{{2
-fun! s:SaveSettings()
+" vimball#SaveSettings: {{{2
+fun! vimball#SaveSettings()
 "  call Dfunc("SaveSettings()")
   let s:makeep  = getpos("'a")
   let s:regakeep= @a
@@ -587,17 +723,20 @@
   let s:pmkeep  = &pm
   let s:repkeep = &report
   let s:vekeep  = &ve
+  let s:ffkeep  = &ff
   if exists("&acd")
-   set ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm=
+   setlocal ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm= ff=unix
   else
-   set ei=all ve=all nofen noic report=999 nohid bt= ma lz pm=
+   setlocal ei=all ve=all       nofen noic report=999 nohid bt= ma lz pm= ff=unix
   endif
+  " vimballs should be in unix format
+  setlocal ff=unix
 "  call Dret("SaveSettings")
 endfun
 
 " ---------------------------------------------------------------------
-" s:RestoreSettings: {{{2
-fun! s:RestoreSettings()
+" vimball#RestoreSettings: {{{2
+fun! vimball#RestoreSettings()
 "  call Dfunc("RestoreSettings()")
   let @a      = s:regakeep
   if exists("&acd")
@@ -611,20 +750,34 @@
   let &report = s:repkeep
   let &ve     = s:vekeep
   let &ei     = s:eikeep
+  let &ff     = s:ffkeep
   if s:makeep[0] != 0
    " restore mark a
 "   call Decho("restore mark-a: makeep=".string(makeep))
    call setpos("'a",s:makeep)
   endif
   if exists("&acd")
-   unlet s:regakeep s:acdkeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep
-  else
-   unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep
+   unlet s:acdkeep
   endif
-  set bt=nofile noma
+  unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep s:ffkeep
 "  call Dret("RestoreSettings")
 endfun
 
 " ---------------------------------------------------------------------
+" s:Escape: {{{2
+fun s:Escape(name)
+  " shellescape() was added by patch 7.0.111
+  if exists("*shellescape")
+    return shellescape(a:name)
+  endif
+  return g:netrw_shq . a:name . g:netrw_shq
+endfun
+
+" ---------------------------------------------------------------------
+"  Restore:
+let &cpo= s:keepcpo
+unlet s:keepcpo
+
+" ---------------------------------------------------------------------
 " Modelines: {{{1
 " vim: fdm=marker
--- vim-7.1.314.orig/runtime/autoload/zip.vim
+++ vim-7.1.314/runtime/autoload/zip.vim
@@ -1,16 +1,16 @@
 " zip.vim: Handles browsing zipfiles
 "            AUTOLOAD PORTION
-" Date:		May 08, 2007
-" Version:	14
+" Date:		Jun 12, 2008
+" Version:	21 (modified by Bram and Debian)
 " Maintainer:	Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
 " License:	Vim License  (see vim's :help license)
-" Copyright:    Copyright (C) 2005 Charles E. Campbell, Jr. {{{1
+" Copyright:    Copyright (C) 2005-2008 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,
-"               zipPlugin.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
+"               zip.vim and zipPlugin.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.
 
@@ -22,7 +22,7 @@
  finish
 endif
 
-let g:loaded_zip     = "v14"
+let g:loaded_zip     = "v21+b+Debian"
 let s:zipfile_escape = ' ?&;\'
 let s:ERROR          = 2
 let s:WARNING        = 1
@@ -31,7 +31,9 @@
 " ---------------------------------------------------------------------
 "  Global Values: {{{1
 if !exists("g:zip_shq")
- if has("unix")
+ if &shq != ""
+  let g:zip_shq= &shq
+ elseif has("unix")
   let g:zip_shq= "'"
  else
   let g:zip_shq= '"'
@@ -97,15 +99,15 @@
   $
 
 "  call Decho("exe silent r! ".g:zip_unzipcmd." -l ".s:QuoteFileDir(a:zipfile))
-  exe "silent r! ".g:zip_unzipcmd." -l ".s:QuoteFileDir(a:zipfile)
+  exe "silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1)
   if v:shell_error != 0
    redraw!
-   echohl WarningMsg | echo "***warning*** (zip#Browse) ".a:zipfile." is not a zip file" | echohl None
+   echohl WarningMsg | echo "***warning*** (zip#Browse) ".fnameescape(a:zipfile)." is not a zip file" | echohl None
 "   call inputsave()|call input("Press <cr> to continue")|call inputrestore()
    silent %d
    let eikeep= &ei
    set ei=BufReadCmd,FileReadCmd
-   exe "r ".a:zipfile
+   exe "r ".fnameescape(a:zipfile)
    let &ei= eikeep
    1d
 "   call Dret("zip#Browse")
@@ -160,10 +162,12 @@
 "  call Decho("curfile<".curfile.">")
 
   new
-  wincmd _
+  if !exists("g:zip_nomax") || g:zip_nomax == 0
+   wincmd _
+  endif
   let s:zipfile_{winnr()}= curfile
 "  call Decho("exe e zipfile:".escape(zipfile,s:zipfile_escape).'::'.escape(fname,s:zipfile_escape))
-  exe "e zipfile:".escape(zipfile,s:zipfile_escape).'::'.escape(fname,s:zipfile_escape)
+  exe "e ".fnameescape("zipfile:".zipfile.'::'.fname)
   filetype detect
 
   let &report= repkeep
@@ -189,7 +193,7 @@
 "  call Decho("fname  <".fname.">")
 
 "  call Decho("exe r! ".g:zip_unzipcmd." -p ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname))
-  exe "silent r! ".g:zip_unzipcmd." -p ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname)
+  exe "silent r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1)
 
   " cleanup
   0d
@@ -262,7 +266,7 @@
   if fname =~ '/'
    let dirpath = substitute(fname,'/[^/]\+$','','e')
    if executable("cygpath")
-    let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
+    let dirpath = substitute(system("cygpath ".s:Escape(dirpath,0)),'\n','','e')
    endif
 "   call Decho("mkdir(dirpath<".dirpath.">,p)")
    call mkdir(dirpath,"p")
@@ -272,9 +276,9 @@
   endif
 "  call Decho("zipfile<".zipfile."> fname<".fname.">")
 
-  exe "w! ".escape(fname,s:zipfile_escape)
+  exe "w! ".fnameescape(fname)
   if executable("cygpath")
-   let zipfile = substitute(system("cygpath ".zipfile),'\n','','e')
+   let zipfile = substitute(system("cygpath ".s:Escape(zipfile,0)),'\n','','e')
   endif
 
   if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
@@ -282,7 +286,7 @@
   endif
 
 "  call Decho(g:zip_zipcmd." -u ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname))
-  call system(g:zip_zipcmd." -u ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname))
+  call system(g:zip_zipcmd." -u ".s:Escape(zipfile,0)." ".s:Escape(fname,0))
   if v:shell_error != 0
    redraw!
    echohl Error | echo "***error*** (zip#Write) sorry, unable to update ".zipfile." with ".fname | echohl None
@@ -296,7 +300,7 @@
    let binkeep= &binary
    let eikeep = &ei
    set binary ei=all
-   exe "e! ".zipfile
+   exe "e! ".fnameescape(zipfile)
    call netrw#NetWrite(netzipfile)
    let &ei     = eikeep
    let &binary = binkeep
@@ -316,11 +320,20 @@
 endfun
 
 " ---------------------------------------------------------------------
-" QuoteFileDir: {{{2
-fun! s:QuoteFileDir(fname)
+" s:Escape: {{{2
+fun! s:Escape(fname,isfilt)
 "  call Dfunc("QuoteFileDir(fname<".a:fname.">)")
-"  call Dret("QuoteFileDir")
-  return g:zip_shq.a:fname.g:zip_shq
+  if exists("*shellescape")
+   if a:isfilt
+    let qnameq= shellescape(a:fname,1)
+   else
+    let qnameq= shellescape(a:fname)
+   endif
+  else
+   let qnameq= g:zip_shq.escape(a:fname,g:zip_shq).g:zip_shq
+  endif
+"  call Dret("QuoteFileDir <".qnameq.">")
+  return qnameq
 endfun
 
 " ---------------------------------------------------------------------
@@ -328,14 +341,8 @@
 fun! s:ChgDir(newdir,errlvl,errmsg)
 "  call Dfunc("ChgDir(newdir<".a:newdir."> errlvl=".a:errlvl."  errmsg<".a:errmsg.">)")
 
-  if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
-   let newdir= escape(a:newdir,' ')
-  else
-   let newdir= escape(a:newdir,'\ ')
-  endif
-
   try
-   exe "cd ".newdir
+   exe "cd ".fnameescape(a:newdir)
   catch /^Vim\%((\a\+)\)\=:E344/
    redraw!
    if a:errlvl == s:NOTE
@@ -359,9 +366,9 @@
 fun! s:Rmdir(fname)
 "  call Dfunc("Rmdir(fname<".a:fname.">)")
   if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
-   call system("rmdir /S/Q ".s:QuoteFileDir(a:fname))
+   call system("rmdir /S/Q ".s:Escape(a:fname,0))
   else
-   call system("/bin/rm -rf ".s:QuoteFileDir(a:fname))
+   call system("/bin/rm -rf ".s:Escape(a:fname,0))
   endif
 "  call Dret("Rmdir")
 endfun
--- vim-7.1.314.orig/runtime/compiler/decada.vim
+++ vim-7.1.314/runtime/compiler/decada.vim
@@ -1,16 +1,17 @@
 "------------------------------------------------------------------------------
 "  Description: Vim Ada/Dec Ada compiler file
 "     Language: Ada (Dec Ada)
-"          $Id: decada.vim,v 1.1 2007/05/05 18:09:54 vimboss Exp $
+"          $Id: decada.vim 774 2007-09-17 09:11:59Z krischik $
 "    Copyright: Copyright (C) 2006 Martin Krischik
-"   Maintainer:	Martin Krischik
-"      $Author: vimboss $
-"        $Date: 2007/05/05 18:09:54 $
-"      Version: 4.2
-"    $Revision: 1.1 $
-"     $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/decada.vim $
+"   Maintainer:	Martin Krischik <krischik@users.sourceforge.net>
+"      $Author: krischik $
+"        $Date: 2007-09-17 05:11:59 -0400 (Mon, 17 Sep 2007) $
+"      Version: 4.5
+"    $Revision: 774 $
+"     $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/tags/vim-ada-mode/4.3.9/vim/compiler/decada.vim $
 "      History: 21.07.2006 MK New Dec Ada
 "               15.10.2006 MK Bram's suggestion for runtime integration
+"               08.09.2006 MK Correct double load protection.
 "    Help Page: compiler-decada
 "------------------------------------------------------------------------------
 
@@ -24,6 +25,13 @@
 
 if !exists("g:decada")
    let g:decada = decada#New ()
+
+   call ada#Map_Menu (
+     \'Dec Ada.Build',
+     \'<F7>',
+     \'call decada.Make ()')
+
+   call g:decada.Set_Session ()
 endif
 
 if exists(":CompilerSet") != 2
@@ -33,16 +41,9 @@
    command -nargs=* CompilerSet setlocal <args>
 endif
 
-call g:decada.Set_Session ()
-
 execute "CompilerSet makeprg="     . escape (g:decada.Make_Command, ' ')
 execute "CompilerSet errorformat=" . escape (g:decada.Error_Format, ' ')
 
-call ada#Map_Menu (
-  \'Dec Ada.Build',
-  \'<F7>',
-  \'call decada.Make ()')
-
 finish " 1}}}
 
 "------------------------------------------------------------------------------
--- vim-7.1.314.orig/runtime/compiler/gnat.vim
+++ vim-7.1.314/runtime/compiler/gnat.vim
@@ -1,17 +1,19 @@
 "------------------------------------------------------------------------------
 "  Description: Vim Ada/GNAT compiler file
 "     Language: Ada (GNAT)
-"          $Id: gnat.vim,v 1.1 2007/05/05 18:04:19 vimboss Exp $
+"          $Id: gnat.vim 774 2007-09-17 09:11:59Z krischik $
 "    Copyright: Copyright (C) 2006 Martin Krischik
-"   Maintainer:	Martin Krischik
-"      $Author: vimboss $
-"        $Date: 2007/05/05 18:04:19 $
-"      Version: 4.2
-"    $Revision: 1.1 $
-"     $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/gnat.vim $
+"   Maintainer:	Martin Krischi <krischik@users.sourceforge.net>k
+"		Ned Okie <nokie@radford.edu>
+"      $Author: krischik $
+"        $Date: 2007-09-17 05:11:59 -0400 (Mon, 17 Sep 2007) $
+"      Version: 4.5
+"    $Revision: 774 $
+"     $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/tags/vim-ada-mode/4.3.9/vim/compiler/gnat.vim $
 "      History: 24.05.2006 MK Unified Headers
 "		16.07.2006 MK Ada-Mode as vim-ball
 "               15.10.2006 MK Bram's suggestion for runtime integration
+"		19.09.2007 NO use project file only when there is a project
 "    Help Page: compiler-gnat
 "------------------------------------------------------------------------------
 
@@ -46,6 +48,8 @@
       \ 'GNAT.Set Projectfile\.\.\.',
       \ ':SetProject',
       \ 'call gnat.Set_Project_File ()')
+
+   call g:gnat.Set_Session ()
 endif
 
 if exists(":CompilerSet") != 2
@@ -55,8 +59,6 @@
    command -nargs=* CompilerSet setlocal <args>
 endif
 
-call g:gnat.Set_Session ()
-
 execute "CompilerSet makeprg="     . escape (g:gnat.Get_Command('Make'), ' ')
 execute "CompilerSet errorformat=" . escape (g:gnat.Error_Format, ' ')
 
--- vim-7.1.314.orig/runtime/compiler/javac.vim
+++ vim-7.1.314/runtime/compiler/javac.vim
@@ -13,6 +13,6 @@
   command -nargs=* CompilerSet setlocal <args>
 endif
 
-CompilerSet makeprg=javac
+CompilerSet makeprg=javac\ %
 
 CompilerSet errorformat=%E%f:%l:\ %m,%-Z%p^,%-C%.%#,%-G%.%#
--- vim-7.1.314.orig/runtime/doc/eval.txt
+++ vim-7.1.314/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt*      For Vim version 7.1.  Last change: 2008 May 28
+*eval.txt*      For Vim version 7.1.  Last change: 2008 Jun 12
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -39,11 +39,11 @@
 							*E712*
 There are five types of variables:
 
-Number		A 32 bit signed number.
+Number		A 32 bit signed number.  |expr-number| *Number*
 		Examples:  -123  0x10  0177
 
 String		A NUL terminated string of 8-bit unsigned characters (bytes).
-		Examples: "ab\txx\"--"  'x-z''a,c'
+		|expr-string| Examples: "ab\txx\"--"  'x-z''a,c'
 
 Funcref		A reference to a function |Funcref|.
 		Example: function("strlen")
@@ -258,13 +258,13 @@
 <	0
 
 Thus comparing Lists is more strict than comparing numbers and strings.  You
-can compare simple values this way too by putting them in a string: >
+can compare simple values this way too by putting them in a list: >
 
 	:let a = 5
 	:let b = "5"
-	echo a == b
+	:echo a == b
 <	1 >
-	echo [a] == [b]
+	:echo [a] == [b]
 <	0
 
 
@@ -752,7 +752,7 @@
 results in the mathematical difference (comparing byte values), not
 necessarily the alphabetical difference in the local language.
 
-When using the operators with a trailing '#", or the short version and
+When using the operators with a trailing '#', or the short version and
 'ignorecase' is off, the comparing is done with strcmp(): case matters.
 
 When using the operators with a trailing '?', or the short version and
@@ -1760,7 +1760,8 @@
 settabwinvar( {tabnr}, {winnr}, {varname}, {val})    set {varname} in window
 					{winnr} in tab page {tabnr} to {val}
 setwinvar( {nr}, {varname}, {val})	set {varname} in window {nr} to {val}
-shellescape( {string})		String	escape {string} for use as shell
+shellescape( {string} [, {special}])
+				String	escape {string} for use as shell
 					command argument
 simplify( {filename})		String	simplify filename as much as possible
 sort( {list} [, {func}])	List	sort {list}, using {func} to compare
@@ -1852,7 +1853,7 @@
 		Example: >
 	:let i = 0
 	:while i < argc()
-	:  let f = escape(argv(i), '. ')
+	:  let f = escape(fnameescape(argv(i)), '.')
 	:  exe 'amenu Arg.' . f . ' :e ' . f . '<CR>'
 	:  let i = i + 1
 	:endwhile
@@ -1892,12 +1893,15 @@
 		exactly.  The name can be:
 		- Relative to the current directory.
 		- A full path.
-		- The name of a buffer with 'filetype' set to "nofile".
+		- The name of a buffer with 'buftype' set to "nofile".
 		- A URL name.
 		Unlisted buffers will be found.
 		Note that help files are listed by their short name in the
 		output of |:buffers|, but bufexists() requires using their
 		long name to be able to find them.
+		bufexists() may report a buffer exists, but to use the name
+		with a |:buffer| command you may need to use |expand()|.  Esp
+		for MS-Windows 8.3 names in the form "c:\DOCUME~1"
 		Use "bufexists(0)" to test for the existence of an alternate
 		file name.
 							*buffer_exists()*
@@ -2025,7 +2029,7 @@
 <		The current 'encoding' is used.  Example for "utf-8": >
 			char2nr("á")		returns 225
 			char2nr("á"[0])		returns 195
-<		nr2char() does the opposite.
+<		|nr2char()| does the opposite.
 
 cindent({lnum})						*cindent()*
 		Get the amount of indent for line {lnum} according the C
@@ -2050,7 +2054,7 @@
 			    returned)
 		Additionally {expr} can be [lnum, col]: a |List| with the line
 		and column number. Most useful when the column is "$", to get
-		the las column of a specific line.  When "lnum" or "col" is
+		the last column of a specific line.  When "lnum" or "col" is
 		out of range then col() returns zero.
 		To get the line number use |line()|.  To get both use
 		|getpos()|.
@@ -2173,7 +2177,7 @@
 		different from using {expr} directly.
 		When {expr} is a |List| a shallow copy is created.  This means
 		that the original |List| can be changed without changing the
-		copy, and vise versa.  But the items are identical, thus
+		copy, and vice versa.  But the items are identical, thus
 		changing an item changes the contents of both |Lists|.  Also
 		see |deepcopy()|.
 
@@ -2251,7 +2255,7 @@
 		different from using {expr} directly.
 		When {expr} is a |List| a full copy is created.  This means
 		that the original |List| can be changed without changing the
-		copy, and vise versa.  When an item is a |List|, a copy for it
+		copy, and vice versa.  When an item is a |List|, a copy for it
 		is made, recursively.  Thus changing an item in the copy does
 		not change the contents of the original |List|.
 		When {noref} is omitted or zero a contained |List| or
@@ -2315,8 +2319,9 @@
 			:echo escape('c:\program files\vim', ' \')
 <		results in: >
 			c:\\program\ files\\vim
+<		Also see |shellescape()|.
 
-<							*eval()*
+							*eval()*
 eval({string})	Evaluate {string} and return the result.  Especially useful to
 		turn the result of |string()| back into the original value.
 		This works for Numbers, Strings and composites of them.
@@ -2568,7 +2573,7 @@
 filewritable({file})					*filewritable()*
 		The result is a Number, which is 1 when a file with the
 		name {file} exists, and can be written.  If {file} doesn't
-		exist, or is not writable, the result is 0.  If (file) is a
+		exist, or is not writable, the result is 0.  If {file} is a
 		directory, and we can write to it, the result is 2.
 
 
@@ -2625,14 +2630,16 @@
 		Escape {string} for use as file name command argument.  All
 		characters that have a special meaning, such as '%' and '|'
 		are escaped with a backslash.
-		For most systems the characters escaped are "".  For systems
-		where a backslash appears in a filename, it depends on the
-		value of 'isfname'.
+		For most systems the characters escaped are
+		" \t\n*?[{`$\\%#'\"|!<".  For systems where a backslash
+		appears in a filename, it depends on the value of 'isfname'.
+		A leading '+' and '>' is also escaped (special after |:edit|
+		and |:write|).  And a "-" by itself (special after |:cd|).
 		Example: >
-			:let fname = 'some str%nge|name'
+			:let fname = '+some str%nge|name'
 			:exe "edit " . fnameescape(fname)
 <		results in executing: >
-			edit some\ str\%nge\|name
+			edit \+some\ str\%nge\|name
 
 fnamemodify({fname}, {mods})				*fnamemodify()*
 		Modify file name {fname} according to {mods}.  {mods} is a
@@ -2642,7 +2649,7 @@
 			:echo fnamemodify("main.c", ":p:h")
 <		results in: >
 			/home/mool/vim/vim/src
-<		Note: Environment variables and "~" don't work in {fname}, use
+<		Note: Environment variables don't work in {fname}, use
 		|expand()| first then.
 
 foldclosed({lnum})					*foldclosed()*
@@ -3494,7 +3501,6 @@
 		feature is present}
 		Examples: >
 			:echo libcall("libc.so", "getenv", "HOME")
-			:echo libcallnr("/usr/lib/libc.so", "getpid", "")
 <
 							*libcallnr()*
 libcallnr({libname}, {funcname}, {argument})
@@ -3502,7 +3508,8 @@
 		int instead of a string.
 		{only in Win32 on some Unix versions, when the |+libcall|
 		feature is present}
-		Example (not very useful...): >
+		Examples: >
+			:echo libcallnr("/usr/lib/libc.so", "getpid", "")
 			:call libcallnr("libc.so", "printf", "Hello World!\n")
 			:call libcallnr("libc.so", "sleep", 10)
 <
@@ -3526,7 +3533,7 @@
 <							*last-position-jump*
 		This autocommand jumps to the last known position in a file
 		just after opening it, if the '" mark is set: >
-	:au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif
+	:au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
 
 line2byte({lnum})					*line2byte()*
 		Return the byte count from the start of the buffer for line
@@ -3741,7 +3748,7 @@
 
 matchdelete({id})			       *matchdelete()* *E802* *E803*
 		Deletes a match with ID {id} previously defined by |matchadd()|
-		or one of the |:match| commands.  Returns 0 if succesfull,
+		or one of the |:match| commands.  Returns 0 if successful,
 		otherwise -1.  See example for |matchadd()|.  All matches can
 		be deleted in one operation by |clearmatches()|.
 
@@ -3775,7 +3782,7 @@
 		When there is no match an empty list is returned.
 
 matchstr({expr}, {pat}[, {start}[, {count}]])			*matchstr()*
-		Same as match(), but return the matched string.  Example: >
+		Same as |match()|, but return the matched string.  Example: >
 			:echo matchstr("testing", "ing")
 <		results in "ing".
 		When there is no match "" is returned.
@@ -3850,7 +3857,8 @@
 
 							*getpid()*
 getpid()	Return a Number which is the process ID of the Vim process.
-		On Unix this is a unique number.  On MS-DOS it's always zero.
+		On Unix and MS-Windows this is a unique number, until Vim
+		exits.  On MS-DOS it's always zero.
 
 							*getpos()*
 getpos({expr})	Get the position for {expr}.  For possible values of {expr}
@@ -3982,6 +3990,7 @@
 
 		The conversion specifiers and their meanings are:
 
+				*printf-d* *printf-o* *printf-x* *printf-X*
 		doxX    The Number argument is converted to signed decimal
 			(d), unsigned octal (o), or unsigned hexadecimal (x
 			and X) notation.  The letters "abcdef" are used for
@@ -3996,9 +4005,11 @@
 			a conversion is wider than the field width, the field
 			is expanded to contain the conversion result.
 
+							*printf-c*
 		c	The Number argument is converted to a byte, and the
 			resulting character is written.
 
+							*printf-s*
 		s	The text of the String argument is used.  If a
 			precision is specified, no more bytes than the number
 			specified are used.
@@ -4354,9 +4365,11 @@
 		{flags} 'b', 'c', 'n', 's', 'w' and 'W' are used like with
 		|search()|.  Additionally:
 		'r'	Repeat until no more matches found; will find the
-			outer pair
-		'm'	return number of Matches instead of line number with
+			outer pair.  Implies the 'W' flag.
+		'm'	Return number of matches instead of line number with
 			the match; will be > 1 when 'r' is used.
+		Note: it's nearly always a good idea to use the 'W' flag, to
+		avoid wrapping around the end of the file.
 
 		When a match for {start}, {middle} or {end} is found, the
 		{skip} expression is evaluated with the cursor positioned on
@@ -4488,15 +4501,15 @@
 		Returns 0 when successful, 1 when not editing the command
 		line.
 
-setline({lnum}, {line})					*setline()*
-		Set line {lnum} of the current buffer to {line}.
+setline({lnum}, {text})					*setline()*
+		Set line {lnum} of the current buffer to {text}.
 		{lnum} is used like with |getline()|.
-		When {lnum} is just below the last line the {line} will be
+		When {lnum} is just below the last line the {text} will be
 		added as a new line.
 		If this succeeds, 0 is returned.  If this fails (most likely
 		because {lnum} is invalid) 1 is returned.  Example: >
 			:call setline(5, strftime("%c"))
-<		When {line} is a |List| then line {lnum} and following lines
+<		When {text} is a |List| then line {lnum} and following lines
 		will be set to the items in the list.  Example: >
 			:call setline(5, ['aaa', 'bbb', 'ccc'])
 <		This is equivalent to: >
@@ -4515,7 +4528,7 @@
 
 setmatches({list})					*setmatches()*
 		Restores a list of matches saved by |getmatches()|.  Returns 0
-		if succesfull, otherwise -1.  All current matches are cleared
+		if successful, otherwise -1.  All current matches are cleared
 		before the list is restored.  See example for |getmatches()|.
 
 							*setpos()*
@@ -4653,19 +4666,23 @@
 			:call setwinvar(1, "&list", 0)
 			:call setwinvar(2, "myvar", "foobar")
 
-shellescape({string})					*shellescape()*
+shellescape({string} [, {special}])			*shellescape()*
 		Escape {string} for use as shell command argument.
 		On MS-Windows and MS-DOS, when 'shellslash' is not set, it
-		will enclose {string} double quotes and double all double
+		will enclose {string} in double quotes and double all double
 		quotes within {string}.
 		For other systems, it will enclose {string} in single quotes
 		and replace all "'" with "'\''".
-		Example: >
-			:echo shellescape('c:\program files\vim')
-<		results in:
-			"c:\program files\vim" ~
-		Example usage: >
-			:call system("chmod +x -- " . shellescape(expand("%")))
+		When the {special} argument is present and it's a non-zero
+		Number or a non-empty String (|non-zero-arg|), then special
+		items such as "%", "#" and "<cword>" will be preceded by a
+		backslash.  This backslash will be removed again by the |:!|
+		command.
+		Example of use with a |:!| command: >
+		    :exe '!dir ' . shellescape(expand('<cfile>'), 1)
+<		This results in a directory listing for the file under the
+		cursor.  Example of use with |system()|: >
+		    :call system("chmod +w -- " . shellescape(expand("%")))
 
 
 simplify({filename})					*simplify()*
@@ -4706,7 +4723,7 @@
 							*soundfold()*
 soundfold({word})
 		Return the sound-folded equivalent of {word}.  Uses the first
-		language in 'spellang' for the current window that supports
+		language in 'spelllang' for the current window that supports
 		soundfolding.  'spell' must be set.  When no sound folding is
 		possible the {word} is returned unmodified.
 		This can be used for making spelling suggestions.  Note that
@@ -5005,13 +5022,14 @@
 		passed as stdin to the command.  The string is written as-is,
 		you need to take care of using the correct line separators
 		yourself.  Pipes are not used.
-		Note: newlines in {expr} may cause the command to fail.  The
-		characters in 'shellquote' and 'shellxquote' may also cause
-		trouble.
+		Note: Use |shellescape()| to escape special characters in a
+		command argument.  Newlines in {expr} may cause the command to
+		fail.  The characters in 'shellquote' and 'shellxquote' may
+		also cause trouble.
 		This is not to be used for interactive commands.
-		The result is a String.  Example: >
 
-			:let files = system("ls")
+		The result is a String.  Example: >
+		    :let files = system("ls " .  shellescape(expand('%:h')))
 
 <		To make the result more system-independent, the shell output
 		is filtered to replace <CR> with <NL> for Macintosh, and
@@ -5214,11 +5232,15 @@
 <		This enters the same Visual mode as before.  It is also useful
 		in scripts if you wish to act differently depending on the
 		Visual mode that was used.
-
-		If an expression is supplied that results in a non-zero number
-		or a non-empty string, then the Visual mode will be cleared
-		and the old value is returned.  Note that " " and "0" are also
-		non-empty strings, thus cause the mode to be cleared.
+		If Visual mode is active, use |mode()| to get the Visual mode
+		(e.g., in a |:vmap|).
+							*non-zero-arg*
+		If [expr] is supplied and it evaluates to a non-zero Number or
+		a non-empty String, then the Visual mode will be cleared and
+		the old value is returned.  Note that " " and "0" are also
+		non-empty strings, thus cause the mode to be cleared.  A List
+		or Dictionary is not a Number or String, thus does not cause
+		the mode to be cleared.
 
 							*winbufnr()*
 winbufnr({nr})	The result is a Number, which is the number of the buffer
@@ -5400,6 +5422,7 @@
 gui_athena		Compiled with Athena GUI.
 gui_gtk			Compiled with GTK+ GUI (any version).
 gui_gtk2		Compiled with GTK+ 2 GUI (gui_gtk is also defined).
+gui_gnome		Compiled with Gnome support (gui_gtk is also defined).
 gui_mac			Compiled with Macintosh GUI.
 gui_motif		Compiled with Motif GUI.
 gui_photon		Compiled with Photon GUI.
@@ -5614,7 +5637,9 @@
 			dictionary.  See |Dictionary-function|.
 
 			The last used search pattern and the redo command "."
-			will not be changed by the function.
+			will not be changed by the function.  This also
+			implies that the effect of |:nohlsearch| is undone
+			when the function returns.
 
 					*:endf* *:endfunction* *E126* *E193*
 :endf[unction]		The end of a function definition.  Must be on a line
@@ -5823,7 +5848,7 @@
 And you will get an error message every time.
 
 Also note that if you have two script files, and one calls a function in the
-other and vise versa, before the used function is defined, it won't work.
+other and vice versa, before the used function is defined, it won't work.
 Avoid using the autoload functionality at the toplevel.
 
 Hint: If you distribute a bunch of scripts you can pack them together with the
@@ -5884,8 +5909,11 @@
 			{expr1}.  {var-name} must refer to a list and {idx}
 			must be a valid index in that list.  For nested list
 			the index can be repeated.
-			This cannot be used to add an item to a list.
-
+			This cannot be used to add an item to a |List|.
+			This cannot be used to set a byte in a String.  You
+			can do that like this: >
+				:let var = var[0:2] . 'X' . var[4:]
+<
 							*E711* *E719*
 :let {var-name}[{idx1}:{idx2}] = {expr1}		*E708* *E709* *E710*
 			Set a sequence of items in a |List| to the result of
@@ -6382,6 +6410,13 @@
 		:execute "normal ixxx\<Esc>"
 <			This has an <Esc> character, see |expr-string|.
 
+			Be careful to correctly escape special characters in
+			file names.  The |fnameescape()| function can be used
+			for Vim commands, |shellescape()| for |:!| commands.
+			Examples: >
+		:execute "e " . fnameescape(filename)
+		:execute "!ls " . shellescape(expand('%:h'), 1)
+<
 			Note: The executed string may be any command-line, but
 			you cannot start or end a "while", "for" or "if"
 			command.  Thus this is illegal: >
@@ -7251,7 +7286,7 @@
 	:
 	:function! Write(file)
 	:  try
-	:    execute "write" a:file
+	:    execute "write" fnameescape(a:file)
 	:  catch /^Vim(write):/
 	:    throw "EXCEPT:IO(" . getcwd() . ", " . a:file . "):WRITEERR"
 	:  endtry
--- vim-7.1.314.orig/runtime/doc/filetype.txt
+++ vim-7.1.314/runtime/doc/filetype.txt
@@ -502,6 +502,13 @@
 detection of source format see |ft-fortran-syntax|.
 
 
+GIT COMMIT                                              *ft-gitcommit-plugin*
+
+One command, :DiffGitCached, is provided to show a diff of the current commit
+in the preview window.  It is equivalent to calling "git diff --cached" plus
+any arguments given to the command.
+
+
 MAIL							*ft-mail-plugin*
 
 Options:
--- vim-7.1.314.orig/runtime/doc/index.txt
+++ vim-7.1.314/runtime/doc/index.txt
@@ -467,6 +467,7 @@
 |v_ab|		ab		   "a block" from "[(" to "])" (with braces)
 |v_ap|		ap		   "a paragraph" (with white space)
 |v_as|		as		   "a sentence" (with white space)
+|v_at|		at		   "a tag block" (with tags)
 |v_aw|		aw		   "a word" (with white space)
 |v_a{|		a{		   same as aB
 |v_a}|		a}		   same as aB
@@ -484,6 +485,7 @@
 |v_ib|		ib		   "inner block" from "[(" to "])"
 |v_ip|		ip		   "inner paragraph"
 |v_is|		is		   "inner sentence"
+|v_it|		it		   "inner tag block"
 |v_iw|		iw		   "inner word"
 |v_i{|		i{		   same as iB
 |v_i}|		i}		   same as iB
@@ -874,6 +876,10 @@
 				   mode
 |v_X|		X		2  delete the highlighted lines
 |v_Y|		Y		   yank the highlighted lines
+|v_aquote|	a"		   extend highlighted area with a double
+				   quoted string
+|v_a'|		a'		   extend highlighted area with a single
+				   quoted string
 |v_a(|		a(		   same as ab
 |v_a)|		a)		   same as ab
 |v_a<|		a<		   extend highlighted area with a <> block
@@ -882,9 +888,12 @@
 |v_aW|		aW		   extend highlighted area with "a WORD"
 |v_a[|		a[		   extend highlighted area with a [] block
 |v_a]|		a]		   same as a[
+|v_a`|		a`		   extend highlighted area with a backtick
+				   quoted string
 |v_ab|		ab		   extend highlighted area with a () block
 |v_ap|		ap		   extend highlighted area with a paragraph
 |v_as|		as		   extend highlighted area with a sentence
+|v_at|		at		   extend highlighted area with a tag block
 |v_aw|		aw		   extend highlighted area with "a word"
 |v_a{|		a{		   same as aB
 |v_a}|		a}		   same as aB
@@ -895,6 +904,10 @@
 |v_gq|		gq		2  format the highlighted lines
 |v_gv|		gv		   exchange current and previous highlighted
 				   area
+|v_iquote|	i"		   extend highlighted area with a double
+				   quoted string (without quotes)
+|v_i'|		i'		   extend highlighted area with a single
+				   quoted string (without quotes)
 |v_i(|		i(		   same as ib
 |v_i)|		i)		   same as ib
 |v_i<|		i<		   extend highlighted area with inner <> block
@@ -903,9 +916,12 @@
 |v_iW|		iW		   extend highlighted area with "inner WORD"
 |v_i[|		i[		   extend highlighted area with inner [] block
 |v_i]|		i]		   same as i[
+|v_i`|		i`		   extend highlighted area with a backtick
+				   quoted string (without backticks)
 |v_ib|		ib		   extend highlighted area with inner () block
 |v_ip|		ip		   extend highlighted area with inner paragraph
 |v_is|		is		   extend highlighted area with inner sentence
+|v_it|		it		   extend highlighted area with inner tag block
 |v_iw|		iw		   extend highlighted area with "inner word"
 |v_i{|		i{		   same as iB
 |v_i}|		i}		   same as iB
--- vim-7.1.314.orig/runtime/doc/options.txt
+++ vim-7.1.314/runtime/doc/options.txt
@@ -4563,7 +4563,7 @@
 
 				   *'modeline'* *'ml'* *'nomodeline'* *'noml'*
 'modeline' 'ml'		boolean	(Vim default: on (off for root),
-				 Vi default: off)
+				 Debian: off, Vi default: off)
 			local to buffer
 						*'modelines'* *'mls'*
 'modelines' 'mls'	number	(default 5)
--- vim-7.1.314.orig/runtime/doc/pi_netrw.txt
+++ vim-7.1.314/runtime/doc/pi_netrw.txt
@@ -1,93 +1,99 @@
-*pi_netrw.txt*  For Vim version 7.1.  Last change: 2007 May 08
+*pi_netrw.txt*  For Vim version 7.1.  Last change: 2008 Jun 12
 
 	    -----------------------------------------------------
 	    NETRW REFERENCE MANUAL    by Charles E. Campbell, Jr.
 	    -----------------------------------------------------
 
 
-*dav*           *http*          *network*       *Nwrite*   *netrw-file*
-*fetch*         *netrw*         *Nread*         *rcp*      *scp*
-*ftp*           *netrw.vim*     *Nsource*       *rsync*    *sftp*
+*dav*    *ftp*    *netrw-file*  *Nread*    *rcp*    *scp*
+*davs*   *http*   *netrw.vim*   *Nsource*  *rsync*  *sftp*
+*fetch*  *netrw*  *network*     *Nwrite*
 
 ==============================================================================
-1. Contents						*netrw-contents*
+1. Contents						*netrw-contents* {{{1
 
 1.  Contents.............................................|netrw-contents|
 2.  Starting With Netrw..................................|netrw-start|
 3.  Netrw Reference......................................|netrw-ref|
-      CONTROLLING EXTERNAL APPLICATIONS..................|netrw-externapp|
+      EXTERNAL APPLICATIONS AND PROTOCOLS................|netrw-externapp|
       READING............................................|netrw-read|
       WRITING............................................|netrw-write|
       DIRECTORY LISTING..................................|netrw-dirlist|
       CHANGING THE USERID AND PASSWORD...................|netrw-chgup|
-      VARIABLES..........................................|netrw-variables|
+      VARIABLES AND SETTINGS.............................|netrw-variables|
       PATHS..............................................|netrw-path|
 4.  Network-Oriented File Transfer.......................|netrw-xfer|
       NETRC..............................................|netrw-netrc|
       PASSWORD...........................................|netrw-passwd|
 5.  Activation...........................................|netrw-activate|
-6.  Transparent File Transfer............................|netrw-transparent|
+6.  Transparent File Editing.............................|netrw-transparent|
 7.  Ex Commands..........................................|netrw-ex|
 8.  Variables and Options................................|netrw-var|
-9.  Directory Browsing...................................|netrw-browse| {{{1
-      Maps...............................................|netrw-maps|
-      Exploring..........................................|netrw-explore-cmds|
-      Quick Reference Commands Table.....................|netrw-browse-cmds|
-      Netrw Browser Variables............................|netrw-browse-var|
-      Introduction To Directory Browsing.................|netrw-browse-intro|
-      Netrw Browsing And Option Incompatibilities........|netrw-incompatible|
-      Directory Exploring Commands.......................|netrw-explore|
-      Refreshing The Listing.............................|netrw-ctrl-l|
-      Going Up...........................................|netrw--|
+9.  Browsing.............................................|netrw-browse|
+      Introduction To Browsing...........................|netrw-intro-browse|
+      Quick Reference: Maps..............................|netrw-browse-maps|
+      Quick Reference: Commands..........................|netrw-browse-cmds|
+      Bookmarking A Directory............................|netrw-mb|
       Browsing...........................................|netrw-cr|
-      Obtaining A File...................................|netrw-O|
-      Change Listing Style...............................|netrw-i|
-      Making A New Directory.............................|netrw-d|
-      Deleting Files Or Directories......................|netrw-D|
-      Renaming Files Or Directories......................|netrw-move|
-      Hiding Files Or Directories........................|netrw-a|
-      Edit File Or Directory Hiding List.................|netrw-ctrl-h|
       Browsing With A Horizontally Split Window..........|netrw-o|
-      Browsing With A Vertically Split Window............|netrw-v|
       Browsing With A New Tab............................|netrw-t|
-      Preview Window.....................................|netrw-p|
-      Selecting Sorting Style............................|netrw-s|
-      Editing The Sorting Sequence.......................|netrw-S|
-      Reversing Sorting Order............................|netrw-r|
+      Browsing With A Vertically Split Window............|netrw-v|
+      Change Listing Style...............................|netrw-i|
+      Changing To A Bookmarked Directory.................|netrw-gb|
       Changing To A Predecessor Directory................|netrw-u|
       Changing To A Successor Directory..................|netrw-U|
       Customizing Browsing With A User Function..........|netrw-x|
+      Deleting Files Or Directories......................|netrw-D|
+      Directory Exploring Commands.......................|netrw-explore|
+      Exploring With Stars and Patterns..................|netrw-star|
+      Displaying Information About File..................|netrw-qf|
+      Edit File Or Directory Hiding List.................|netrw-ctrl-h|
+      Editing The Sorting Sequence.......................|netrw-S|
+      Going Up...........................................|netrw--|
+      Hiding Files Or Directories........................|netrw-a|
+      Improving Browsing.................................|netrw-ssh-hack|
+      Listing Bookmarks And History......................|netrw-qb|
+      Making A New Directory.............................|netrw-d|
       Making The Browsing Directory The Current Directory|netrw-c|
-      Bookmarking A Directory............................|netrw-mb|
-      Changing To A Bookmarked Directory.................|netrw-gb|
-      Listing Bookmarks And History......................|netrw-q|
-      Improving Directory Browsing.......................|netrw-listhack| }}}1
+      Marking Files......................................|netrw-mf|
+      Marking Files By Regular Expression................|netrw-mr|
+      Marked Files: Arbitrary Command....................|netrw-mx|
+      Marked Files: Compression And Decompression........|netrw-mz|
+      Marked Files: Copying..............................|netrw-mc|
+      Marked Files: Diff.................................|netrw-md|
+      Marked Files: Editing..............................|netrw-me|
+      Marked Files: Grep.................................|netrw-mg|
+      Marked Files: Hiding and Unhiding by Suffix........|netrw-mh|
+      Marked Files: Moving...............................|netrw-mm|
+      Marked Files: Printing.............................|netrw-mp|
+      Marked Files: Sourcing.............................|netrw-ms|
+      Marked Files: Tagging..............................|netrw-mT|
+      Marked Files: Setting the Target Directory.........|netrw-mt|
+      Marked Files: Unmarking............................|netrw-mu|
+      Netrw Browser Variables............................|netrw-browser-var|
+      Netrw Browsing And Option Incompatibilities........|netrw-incompatible|
+      Netrw Settings.....................................|netrw-settings|
+      Obtaining A File...................................|netrw-O|
+      Preview Window.....................................|netrw-p|
+      Previous Window....................................|netrw-P|
+      Refreshing The Listing.............................|netrw-ctrl-l|
+      Renaming Files Or Directories......................|netrw-move|
+      Reversing Sorting Order............................|netrw-r|
+      Selecting Sorting Style............................|netrw-s|
 10. Problems and Fixes...................................|netrw-problems|
-11. Debugging............................................|netrw-debug|
+11. Debugging Netrw Itself...............................|netrw-debug|
 12. History..............................................|netrw-history|
 13. 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>: >
-
-	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: >
-
-	:let loaded_netrw = 1
-
 {Vi does not have any of this}
 
 ==============================================================================
-2. Starting With Netrw						*netrw-start*
+2. Starting With Netrw					*netrw-start* {{{1
 
-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|) >
+Netrw makes reading files, writing files, browsing over a network, and
+browsing locally 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
@@ -96,14 +102,13 @@
 
 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 >
+account on some other machine; if you can use scp, 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|!
+Want to make ssh/scp easier to use? Check out |netrw-ssh-hack|!
 
-What if you have ftp, not ssh/scp?  That's easy, too; try >
+So, what if you have ftp, not ssh/scp?  That's easy, too; try >
 
 	vim ftp://hostname/path/to/file
 <
@@ -117,7 +122,7 @@
 	...
 	default          login USERID password "PASSWORD"
 <
-Now about browsing -- ie. when you just want to look around before editing a
+Now about browsing -- when you just want to look around before editing a
 file.  For browsing on your current host, just "edit" a directory: >
 
 	vim .
@@ -131,28 +136,49 @@
 <
 See |netrw-browse| for more!
 
-There's more protocols supported than scp and ftp, too: see the next
-section, |netrw-externapp|.
+There are more protocols supported by netrw just than scp and ftp, too: see the
+next section, |netrw-externapp|, for how to use these external applications.
+
+If you want to use plugins, but for some reason don't wish to use netrw, then
+you need to avoid loading both the plugin and the autoload portions of netrw.
+You may do so by placing the following two lines in your <.vimrc>: >
+
+	:let g:loaded_netrw       = 1
+	:let g:loaded_netrwPlugin = 1
+<
 
 ==============================================================================
-3. Netrw Reference						*netrw-ref*
+3. Netrw Reference					*netrw-ref* {{{1
+
+   Netrw supports several protocols in addition to scp and ftp mentioned
+   in |netrw-start|.  These include dav, fetch, http,... well, just look
+   at the list in |netrw-externapp|.  Each protocol is associated with a
+   variable which holds the default command supporting that protocol.
 
-CONTROLLING EXTERNAL APPLICATIONS			*netrw-externapp*
+EXTERNAL APPLICATIONS AND PROTOCOLS			*netrw-externapp* {{{2
 
 	Protocol  Variable	    Default Value
 	--------  ----------------  -------------
 	   dav:    *g:netrw_dav_cmd*  = "cadaver"
 	 fetch:  *g:netrw_fetch_cmd*  = "fetch -o"    if fetch is available
 	   ftp:    *g:netrw_ftp_cmd*  = "ftp"
-	  http:   *g:netrw_http_cmd*  = "curl -o"     if      curl  is available
-	  http:    g:netrw_http_cmd   = "wget -q -O"  else if wget  is available
-          http:    g:netrw_http_cmd   = "fetch -o"    else if fetch is available
+	  http:   *g:netrw_http_cmd*  = "curl -o"     if     curl  is available
+	  http:    g:netrw_http_cmd   = "wget -q -O"  elseif wget  is available
+          http:    g:netrw_http_cmd   = "fetch -o"    elseif fetch is available
 	   rcp:    *g:netrw_rcp_cmd*  = "rcp"
 	 rsync:  *g:netrw_rsync_cmd*  = "rsync -a"
 	   scp:    *g:netrw_scp_cmd*  = "scp -q"
 	  sftp:   *g:netrw_sftp_cmd*  = "sftp"
 
-READING						*netrw-read* *netrw-nread*
+READING						*netrw-read* *netrw-nread* {{{2
+
+	Generally, one may just use the url notation with a normal editing
+	command, such as >
+
+		:e ftp://[user@]machine/path
+<
+	Netrw also provides the Nread command:
+
 	:Nread ?					give help
 	:Nread "machine:path"				uses rcp
 	:Nread "machine path"				uses ftp w/ <.netrc>
@@ -166,7 +192,15 @@
 	:Nread "scp://[user@]machine[[:#]port]/path"	uses scp
 	:Nread "sftp://[user@]machine/path"		uses sftp
 
-WRITING						*netrw-write* *netrw-nwrite*
+WRITING					*netrw-write* *netrw-nwrite* {{{2
+
+	One may just use the url notation with a normal file writing
+	command, such as >
+
+		:w ftp://[user@]machine/path
+<
+	Netrw also provides the Nwrite command:
+
 	:Nwrite ?					give help
 	:Nwrite "machine:path"				uses rcp
 	:Nwrite "machine path"				uses ftp w/ <.netrc>
@@ -179,7 +213,15 @@
 	:Nwrite "sftp://[user@]machine/path"		uses sftp
 	http: not supported!
 
-SOURCING					*netrw-source*
+SOURCING					*netrw-source* {{{2
+
+	One may just use the url notation with the normal file sourcing
+	command, such as >
+
+		:so ftp://[user@]machine/path
+<
+	Netrw also provides the Nsource command:
+
 	:Nsource ?					give help
 	:Nsource "dav://machine[:port]/path"		uses cadaver
 	:Nsource "fetch://[user@]machine/path"		uses fetch
@@ -190,30 +232,48 @@
 	:Nsource "scp://[user@]machine[[:#]port]/path"	uses scp
 	:Nsource "sftp://[user@]machine/path"		uses sftp
 
-DIRECTORY LISTING					*netrw-dirlist*
+DIRECTORY LISTING					*netrw-dirlist* {{{2
+
+	One may browse a directory to get a listing by simply attempting to
+	edit the directory: >
+
+		:e scp://[user]@hostname/path/
+		:e ftp://[user]@hostname/path/
+<
+	For remote directories (ie. those using scp or ftp), that trailing
+	"/" is necessary (it tells netrw that its to treat it as a directory
+	to browse instead of a file to download).
+
+	However, the Nread command can also be used to accomplish this:
+
 	:Nread [protocol]://[user]@hostname/path/
 
-						*netrw-login* *netrw-password*
- CHANGING USERID AND PASSWORD			*netrw-chgup* *netrw-userpass*
+					*netrw-login* *netrw-password*
+CHANGING USERID AND PASSWORD		*netrw-chgup* *netrw-userpass* {{{2
 
 	Attempts to use ftp will prompt you for a user-id and a password.
 	These will be saved in global variables g:netrw_uid and
-	g:netrw_passwd; subsequent uses of ftp will re-use those two items to
+	s:netrw_passwd; subsequent uses of ftp will re-use those two items to
 	simplify the further use of ftp.  However, if you need to use a
 	different user id and/or password, you'll want to call NetUserPass()
 	first.  To work around the need to enter passwords, check if your ftp
 	supports a <.netrc> file in your home directory.  Also see
 	|netrw-passwd| (and if you're using ssh/scp hoping to figure out how
-	to not need to use passwords, look at |netrw-listhack|).
+	to not need to use passwords, look at |netrw-ssh-hack|).
 
 	:NetUserPass [uid [password]]		-- prompts as needed
 	:call NetUserPass()			-- prompts for uid and password
 	:call NetUserPass("uid")		-- prompts for password
 	:call NetUserPass("uid","password")	-- sets global uid and password
 
-VARIABLES						*netrw-variables*
+NETRW VARIABLES AND SETTINGS				*netrw-variables* {{{2
+(also see: |netrw-browser-var| |netrw-protocol| |netrw-settings| |netrw-var|)
 
-(also see: |netrw-browse-var| |netrw-protocol| |netrw-settings| |netrw-var|)
+Netrw provides a lot of variables which allow you to customize netrw to your
+preferences.  One way to look at them is via the command :NetrwSettings (see
+|netrw-settings|) which will display your current netrw settings.  Most such
+settings are described below, in |netrw-browser-options|, and in
+|netrw-externapp|:
 
  *b:netrw_lastfile*	last file Network-read/written retained on a per-buffer
 			basis		(supports plain :Nw )
@@ -236,8 +296,8 @@
 
  *g:netrw_ignorenetrc*	=0 (default for linux, cygwin)
 			=1 If you have a <.netrc> file but it doesn't work and
-			   you want it ignored, then set this variable as shown.
-			   (default for Windows + cmd.exe)
+			   you want it ignored, then set this variable as
+			   shown. (default for Windows + cmd.exe)
 
  *g:netrw_menu*		=0 disable netrw's menu
 			=1 (default) netrw's menu enabled
@@ -246,7 +306,13 @@
 			be available (see |netrw-gx|)
 
  *g:netrw_uid*		(ftp) user-id,      retained on a per-session basis
- *g:netrw_passwd*	(ftp) password,     retained on a per-session basis
+ *s:netrw_passwd*	(ftp) password,     retained on a per-session basis
+
+ *g:netrw_preview*	=0 (default) preview window shown in a horizontally
+                           split window
+			=1 preview window shown in a vertically split window.
+			Also affects the "previous window" (see |netrw-P|) in
+			the same way.
 
  *g:netrw_shq*		= "'" for Unix/Linux systems (ie. a single quote)
 			= "'" for Windows + cygwin systems (ie. a single quote)
@@ -258,6 +324,9 @@
  *g:netrw_scpport*      = "-P" : option to use to set port for scp
  *g:netrw_sshport*      = "-p" : option to use to set port for ssh
 
+  *g:netrw_silent*	=0 : transfers done normally
+			=1 : transfers done silently
+
  *g:netrw_use_errorwindow* =1 : messages from netrw will use a separate one
                                 line window.  This window provides reliable
 				delivery of messages. (default)
@@ -279,7 +348,7 @@
  *g:netrw_use_nt_rcp*	=0 don't use the rcp of WinNT, Win2000 and WinXP
 			=1 use WinNT's rcp in binary mode         (default)
 
-PATHS								*netrw-path*
+PATHS							*netrw-path* {{{2
 
 Paths to files are generally user-directory relative for most protocols.
 It is possible that some protocol will make paths relative to some
@@ -288,7 +357,7 @@
 	example:  vim scp://user@host/somefile
 	example:  vim scp://user@host/subdir1/subdir2/somefile
 <
-where "somefile" is the "user"'s home directory.  If you wish to get a
+where "somefile" is in the "user"'s home directory.  If you wish to get a
 file using root-relative paths, use the full path:
 >
 	example:  vim scp://user@host//somefile
@@ -296,7 +365,7 @@
 <
 
 ==============================================================================
-4. Network-Oriented File Transfer				*netrw-xfer*
+4. Network-Oriented File Transfer			*netrw-xfer* {{{1
 
 Network-oriented file transfer under Vim is implemented by a VimL-based script
 (<netrw.vim>) using plugin techniques.  It currently supports both reading and
@@ -312,7 +381,7 @@
 	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
+example, it's 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
@@ -364,6 +433,10 @@
   |  dav://host/path                |                            | cadaver    |
   |  :Nread dav://host/path         | :Nwrite dav://host/path    | cadaver    |
   +---------------------------------+----------------------------+------------+
+  | DAV + SSL:                      |                            |            |
+  |  davs://host/path               |                            | cadaver    |
+  |  :Nread davs://host/path        | :Nwrite davs://host/path   | cadaver    |
+  +---------------------------------+----------------------------+------------+
   | FETCH:                          |                            |            |
   |  fetch://[user@]host/path       |                            |            |
   |  fetch://[user@]host:http/path  |  Not Available             | fetch      |
@@ -419,6 +492,10 @@
 
 NETRC							*netrw-netrc*
 
+The <.netrc> file, typically located in your home directory, contains lines
+therein which map a hostname (machine name) to the user id and password you
+prefer to use with it.
+
 The typical syntax for lines in a <.netrc> file is given as shown below.
 Ftp under Unix usually supports <.netrc>; ftp under Windows usually doesn't.
 >
@@ -433,7 +510,7 @@
 	Since this file contains passwords, make very sure nobody else can
 	read this file!  Most programs will refuse to use a .netrc that is
 	readable for others.  Don't forget that the system administrator can
-	still read the file!
+	still read the file!  Ie. for Linux/Unix: chmod 600 .netrc
 
 
 PASSWORD						*netrw-passwd*
@@ -444,17 +521,19 @@
 
 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.
+However, |netrw-ssh-hack| can help with this problem.
 
 
 ==============================================================================
-5. Activation						*netrw-activate*
+5. Activation						*netrw-activate* {{{1
 
 Network-oriented file transfers are available by default whenever Vim's
-|'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.  I suggest that, at a minimum, you have at least the following in your
-<.vimrc> customization file: >
+|'nocompatible'| mode is enabled.  Netrw's script files reside in your
+system's plugin, autoload, and syntax directories; just the
+plugin/netrwPlugin.vim script is sourced automatically whenever you bring up
+vim.  The main script in autoload/netrw.vim is only loaded when you actually
+use netrw.  I suggest that, at a minimum, you have at least the following in
+your <.vimrc> customization file: >
 
 	set nocp
 	if version >= 600
@@ -463,11 +542,12 @@
 <
 
 ==============================================================================
-6. Transparent File Transfer				*netrw-transparent*
+6. Transparent File Editing			*netrw-transparent* {{{1
 
 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 just as simply as if they were local. >
+(invoked via an |:autocmd| for |BufReadCmd|, |BufWriteCmd|, or |SourceCmd|
+events) is made.  Thus one may read, write, or source  files across networks
+just as easily as if they were local files! >
 
 	vim ftp://[user@]machine/path
 	...
@@ -478,10 +558,10 @@
 
 
 ==============================================================================
-7. Ex Commands						*netrw-ex*
+7. Ex Commands						*netrw-ex* {{{1
 
 The usual read/write commands are supported.  There are also a few
-additional commands available.  Often you won't need to use Nw or
+additional commands available.  Often you won't need to use Nwrite or
 Nread as shown in |netrw-transparent| (ie. simply use >
   :e url
   :r url
@@ -489,20 +569,20 @@
 instead, as appropriate) -- see |netrw-urls|.  In the explanations
 below, a {netfile} is an url to a remote file.
 
-:[range]Nw	Write the specified lines to the current
+:[range]Nw[rite]	Write the specified lines to the current
 		file as specified in b:netrw_lastfile.
 
-:[range]Nw {netfile} [{netfile}]...
+:[range]Nw[rite] {netfile} [{netfile}]...
 		Write the specified lines to the {netfile}.
 
-:Nread		Read the specified lines into the current
+:Nr[ead]		Read the specified lines into the current
 		buffer from the file specified in
 		b:netrw_lastfile.
 
-:Nread {netfile} {netfile}...
+:Nr[ead] {netfile} {netfile}...
 		Read the {netfile} after the current line.
 
-:Nsource {netfile}
+:Ns[ource] {netfile}
 		Source the {netfile}.
 		To start up vim using a remote .vimrc, one may use
 		the following (all on one line) (tnx to Antoine Mechelynck) >
@@ -511,31 +591,33 @@
 		 --cmd "source scp://HOSTNAME/.vimrc"
 <								*netrw-uidpass*
 :call NetUserPass()
-		If b:netrw_uid and b:netrw_passwd don't exist,
-		this function query the user for them.
+		If g:netrw_uid and s:netrw_passwd don't exist,
+		this function will query the user for them.
 
 :call NetUserPass("userid")
-		This call will set the b:netrw_uid and, if
+		This call will set the g:netrw_uid and, if
 		the password doesn't exist, will query the user for it.
 
 :call NetUserPass("userid","passwd")
-		This call will set both the b:netrw_uid and b:netrw_passwd.
+		This call will set both the g:netrw_uid and s:netrw_passwd.
 		The user-id and password are used by ftp transfers.  One may
-		effectively remove the user-id and password by using ""
-		strings.
+		effectively remove the user-id and password by using empty
+		strings (ie. "").
 
 :NetrwSettings  This command is described in |netrw-settings| -- used to
                 display netrw settings and change netrw behavior.
 
 
 ==============================================================================
-8. Variables and Options			*netrw-options* *netrw-var*
+8. Variables and Options		*netrw-options* *netrw-var* {{{1
+
+(if you're interested in the netrw browser settings, see: |netrw-browser-var|)
 
 The <netrw.vim> script provides several variables which act as options to
-ffect <netrw.vim>'s behavior.  These variables typically may be set in the
-user's <.vimrc> file:
-(also see:
-|netrw-settings| |netrw-browse-var| |netrw-protocol| |netrw-settings|) >
+affect <netrw.vim>'s file transfer behavior.  These variables typically may be
+set in the user's <.vimrc> file: (see also |netrw-settings| |netrw-protocol|)
+
+>
 
                         -------------
                         Netrw Options
@@ -584,7 +666,7 @@
 	g:netrw_fname		Holds filename being accessed >
 	------------------------------------------------------------
 <
-								*netrw-protocol*
+							*netrw-protocol*
 
 Netrw supports a number of protocols.  These protocols are invoked using the
 variables listed below, and may be modified by the user.
@@ -706,297 +788,460 @@
 >
 
 ==============================================================================
-9. Directory Browsing	*netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
+9. Browsing		*netrw-browsing* *netrw-browse* *netrw-help* {{{1
+   			*netrw-browser*  *netrw-dir*    *netrw-list*
 
-MAPS								*netrw-maps*
-     <F1>.............Help.......................................|netrw-help|
-     <cr>.............Browsing...................................|netrw-cr|
-     <del>............Deleting Files or Directories..............|netrw-delete|
-     -................Going Up...................................|netrw--|
-     a................Hiding Files or Directories................|netrw-a|
-     mb...............Bookmarking a Directory....................|netrw-mb|
-     gb...............Changing to a Bookmarked Directory.........|netrw-gb|
-     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-ctrl-h|
-     i................Change Listing Style.......................|netrw-i|
-     <c-l>............Refreshing the Listing.....................|netrw-ctrl-l|
-     o................Browsing with a Horizontal Split...........|netrw-o|
-     p................Preview Window.............................|netrw-p|
-     q................Listing Bookmarks and History..............|netrw-q|
-     r................Reversing Sorting Order....................|netrw-r|
-     R................Renaming Files or Directories..............|netrw-R|
-     s................Selecting Sorting Style....................|netrw-s|
-     S................Editing the Sorting Sequence...............|netrw-S|
-     t................Browsing with a new tab....................|netrw-t|
-     u................Changing to a Predecessor Directory........|netrw-u|
-     U................Changing to a Successor Directory..........|netrw-U|
-     v................Browsing with a Vertical Split.............|netrw-v|
-     x................Customizing Browsing.......................|netrw-x|
-
-    COMMANDS						*netrw-explore-cmds*
-     :Explore[!]  [dir] Explore directory of current file........|netrw-explore|
-     :Sexplore[!] [dir] Split & Explore directory ...............|netrw-explore|
-     :Hexplore[!] [dir] Horizontal Split & Explore...............|netrw-explore|
-     :Vexplore[!] [dir] Vertical Split & Explore.................|netrw-explore|
-     :Texplore[!] [dir] Tab & Explore............................|netrw-explore|
-     :Pexplore[!] [dir] Vertical Split & Explore.................|netrw-explore|
-     :Nexplore[!] [dir] Vertical Split & Explore.................|netrw-explore|
-     :NetrwSettings.............................................|netrw-settings|
-
-QUICK REFERENCE COMMANDS TABLE				*netrw-browse-cmds*
->
-        -------	-----------
-	Command	Explanation
-        -------	-----------
-<	<F1>	Causes Netrw to issue help
-	 <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)
-	   mb	bookmark current directory
-	   gb	go to previous bookmarked directory
-	   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	Cycle between thin, long, wide, and tree listings|netrw-i|
-	 <c-l>	Causes Netrw to refresh the directory listing |netrw-ctrl-l|
-	   o	Enter the file/directory under the cursor in a new browser
-		 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|
-	   q	List bookmarked directories and history |netrw-q|
-	   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|
-	   t	Enter the file/directory under the cursor in a new tab|netrw-t|
-	   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. |netrw-v|
-	   x	Apply a function to a file. (special browsers) |netrw-x|
+INTRODUCTION TO BROWSING			*netrw-intro-browse* {{{2
+	(Quick References: |netrw-quickmaps| |netrw-quickcoms|)
 
-NETRW BROWSER VARIABLES					*netrw-browse-var*
->
-   ---				-----------
-   Var				Explanation
-   ---				-----------
-< *g:netrw_alto*		change from above splitting to below splitting
-				by setting this variable (see |netrw-o|)
-				 default: =&sb           (see |'sb'|)
+Netrw supports the browsing of directories on your local system and on remote
+hosts; browsing includes listing files and directories, entering directories,
+editing files therein, deleting files/directories, making new directories,
+moving (renaming) files and directories, copying files and directories, etc.
+One may mark files and execute any system command on them!  The Netrw browser
+generally implements the previous explorer's maps and commands for remote
+directories, although details (such as pertinent global variable names)
+necessarily differ.  To browse a directory, simply "edit" it! >
 
-  *g:netrw_altv*		change from left splitting to right splitting
-				by setting this variable (see |netrw-v|)
-				 default: =&spr          (see |'spr'|)
+	vim /your/directory/
+	vim .
+	vim c:\your\directory\
+<
+(Related topics: |netrw-cr|  |netrw-o|  |netrw-p| |netrw-P| |netrw-t|
+                 |netrw-mf|  |netrw-mx| |netrw-D| |netrw-R| |netrw-v| )
 
-  *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  
-				=3: open file in new tab
+The Netrw remote file and directory browser handles two protocols: ssh and
+ftp.  The protocol in the url, if it is ftp, will cause netrw also to use ftp
+in its remote browsing.  Specifying any other protocol will cause it to be
+used for file transfers; but the ssh protocol will be used to do remote
+browsing.
 
-  *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|).
+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/
+<
+where [protocol] is typically scp or ftp.  As an example, try: >
 
-  *g:netrw_fastbrowse*		=0: slow speed browsing, never re-use
-				    directory listings; always obtain
-				    directory listings.
-				=1: medium speed browsing, re-use directory
-				    listings only when remote browsing.
-				    (default value)
-				=2: fast browsing, only obtains directory
-				    listings when the directory hasn't been
-				    seen before (or |netrw-ctrl-l| is used).
-				Fast browsing retains old directory listing
-				buffers so that they don't need to be
-				re-acquired.  This feature is especially
-				important for remote browsing.  However, if
-				a file is introduced or deleted into or from
-				such directories, the old directory buffer
-				becomes out-of-date.  One may always refresh
-				such a directory listing with |netrw-ctrl-l|.
-				This option gives the choice of the trade-off
-				between accuracy and speed to the user.
+	vim ftp://ftp.home.vim.org/pub/vim/
+<
+For local directories, the trailing slash is not required.  Again, because its
+easy to miss: to browse remote directories, the url must terminate with a
+slash!
+
+If you'd like to avoid entering the password repeatedly for remote directory
+listings with ssh or scp, see |netrw-ssh-hack|.  To avoid password entry with
+ftp, see |netrw-netrc| (if your ftp supports it).
+
+There are several things you can do to affect the browser's display of files:
+
+	* To change the listing style, press the "i" key (|netrw-i|).
+	  Currently there are four styles: thin, long, wide, and tree.
+
+	* To hide files (don't want to see those xyz~ files anymore?) see
+	  |netrw-ctrl-h|.
+
+	* Press s to sort files by name, time, or size.
+
+See |netrw-browse-cmds| for all the things you can do with netrw!
+
+
+QUICK HELP						*netrw-quickhelp* {{{2
+                       (Use ctrl-] to select a topic)~
+	Intro to Browsing...............................|netrw-intro-browse|
+	  Quick Reference: Maps.........................|netrw-quickmap|
+	  Quick Reference: Commands.....................|netrw-browse-cmds|
+	Hiding
+	  Edit hiding list..............................|netrw-ctrl-h|
+	  Hiding Files or Directories...................|netrw-a|
+	  Hiding/Unhiding by suffix.....................|netrw-mh|
+	  Hiding  dot-files.............................|netrw-gh|
+	Listing Style
+	  Select listing style (thin/long/wide/tree)....|netrw-i|
+	  Associated setting variable...................|g:netrw_liststyle|
+	  Shell command used to perform listing.........|g:netrw_list_cmd|
+	  Quick file info...............................|netrw-qf|
+	Sorted by
+	  Select sorting style (name/time/size).........|netrw-s|
+	  Editing the sorting sequence..................|netrw-S|
+	  Associated setting variable...................|g:netrw_sort_sequence|
+	  Reverse sorting order.........................|netrw-r|
+
+
+				*netrw-quickmap* *netrw-quickmaps*
+QUICK REFERENCE: MAPS				*netrw-browse-maps* {{{2
+>
+	  ---			-----------------			----
+	  Map			Quick Explanation			Link
+	  ---			-----------------			----
+<	 <F1>	Causes Netrw to issue help
+	 <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)
+	   c	Make browsing directory the current directory        |netrw-c|
+	   d	Make a directory                                     |netrw-d|
+	   D	Attempt to remove the file(s)/directory(ies)         |netrw-D|
+	   gb	Go to previous bookmarked directory                  |netrw-gb|
+	   gh	Quick hide/unhide of dot-files                       |netrw-gh|
+	   gi	Display information on file                          |netrw-qf|
+	 <c-h>	Edit file hiding list                             |netrw-ctrl-h|
+	   i	Cycle between thin, long, wide, and tree listings    |netrw-i|
+	 <c-l>	Causes Netrw to refresh the directory listing     |netrw-ctrl-l|
+	   mb	Bookmark current directory                           |netrw-mb|
+	   mc	Copy marked files to marked-file target directory    |netrw-mc|
+	   md	Apply diff to marked files (up to 3)                 |netrw-md|
+	   me	Place marked files on arg list and edit them         |netrw-me|
+	   mf	Mark a file                                          |netrw-mf|
+	   mh	Toggle marked file suffices' presence on hiding list |netrw-mh|
+	   mm	Move marked files to marked-file target directory    |netrw-mm|
+	   mp	Print marked files                                   |netrw-mp|
+	   mr	Mark files satisfying a |regexp|                     |netrw-mr|
+	   mt	Current browsing directory becomes markfile target   |netrw-mt|
+	   mT	Apply ctags to marked files                          |netrw-mT|
+	   mu	Unmark all marked files                              |netrw-mu|
+	   mx	Apply arbitrary shell command to marked files        |netrw-mx|
+	   mz	Compress/decompress marked files                     |netrw-mz|
+	   o	Enter the file/directory under the cursor in a new   |netrw-o|
+	   	browser window.  A horizontal split is used.
+	   O	Obtain a file specified by cursor                    |netrw-O|
+	   p	Preview the file                                     |netrw-p|
+	   P	Browse in the previously used window                 |netrw-P|
+	   q	List bookmarked directories and history              |netrw-qb|
+	   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|
+	   t	Enter the file/directory under the cursor in a new tab|netrw-t|
+	   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   |netrw-v|
+	   	browser window.  A vertical split is used.
+	   x	View file with an associated program                 |netrw-x|
+
+	<leftmouse>	(gvim only) selects word under mouse as if a <cr>
+			had been pressed (ie. edit file, change directory)
+	<middlemouse>	(gvim only) same as P selecting word under mouse;
+			see |netrw-P|
+	<rightmouse>	(gvim only) delete file/directory using word under
+			mouse
+	<2-leftmouse>	(gvim only) when:
+	                 * in a netrw-selected file, AND
+		         * |g:netrw_retmap| == 1     AND
+		         * the user doesn't already have a <2-leftmouse> mapping
+			   defined before netrw is autoloaded,
+			then a double clicked leftmouse button will return
+			to the netrw browser window.
+	<s-leftmouse>	(gvim only) like mf, will mark files
+
+				*netrw-quickcom* *netrw-quickcoms*
+QUICK REFERENCE: COMMANDS	*netrw-explore-cmds* *netrw-browse-cmds* {{{2
+     :NetrwClean[!] ...........................................|netrw-clean|
+     :NetrwSettings ...........................................|netrw-settings|
+     :Explore[!]  [dir] Explore directory of current file......|netrw-explore|
+     :Hexplore[!] [dir] Horizontal Split & Explore.............|netrw-explore|
+     :Nexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
+     :Pexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
+     :Rexplore          Return to Explorer.....................|netrw-explore|
+     :Sexplore[!] [dir] Split & Explore directory .............|netrw-explore|
+     :Texplore[!] [dir] Tab & Explore..........................|netrw-explore|
+     :Vexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
 
-  *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
-				remove such embedded messages.  By default its
-				value is:
-				 '^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$'
+BOOKMARKING A DIRECTORY	*netrw-mb* *netrw-bookmark* *netrw-bookmarks* {{{2
+One may easily "bookmark" a directory by using >
 
-  *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"
+	{cnt}mb
+<
+Any count may be used.  One may use viminfo's "!" option (|'viminfo'|) to
+retain bookmarks between vim sessions.  See |netrw-gb| for how to return
+to a bookmark and |netrw-qb| for how to list them.
 
 
-  *g:netrw_ftp_sizelist_cmd*	options for passing along to ftp for directory
-				listing, sorted by size of file.
-				Defaults:
-				 unix or g:netrw_cygwin set: : "ls -slF"
-				 otherwise                     "dir"
+BROWSING						*netrw-cr* {{{2
 
-  *g:netrw_ftp_timelist_cmd*	options for passing along to ftp for directory
-				listing, sorted by time of last modification.
-				Defaults:
-				 unix or g:netrw_cygwin set: : "ls -tlF"
-				 otherwise                     "dir"
+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.  
 
-  *g:netrw_hide*		if true, the hiding list is used
-				 default: =0
+  CAVEAT: There are four 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 sequential spaces embedded in it, or any trailing spaces, then you'll
+  need to use the "thin" format to select it.
 
-  *g:netrw_keepdir*		=1 (default) keep current directory immune from
-				   the browsing directory.
-				=0 keep the current directory the same as the
-				   browsing directory.
-				The current browsing directory is contained in
-				b:netrw_curdir (also see |netrw-c|)
+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 or tab instead of the
+default.  When the option is one or two, the splitting will be taken
+horizontally or vertically, respectively.  When the option is set to three, a
+<cr> will cause the file to appear in a new tab.
+
+
+When using the gui (gvim) one may select a file by pressing the <leftmouse>
+button.  In addtion, if
+
+ *|g:netrw_retmap| == 1      AND   (its default value is 0)
+ * in a netrw-selected file, AND
+ * the user doesn't already have a <2-leftmouse> mapping defined before
+   netrw is loaded
+
+then a doubly-clicked leftmouse button will return to the netrw browser
+window.
+
+Netrw attempts to speed up browsing, especially for remote browsing where one
+may have to enter passwords, by keeping and re-using previously obtained
+directory listing buffers.  The |g:netrw_fastbrowse| variable is used to
+control this behavior; one may have slow browsing (no buffer re-use), medium
+speed browsing (re-use directory buffer listings only for remote directories),
+and fast browsing (re-use directory buffer listings as often as possible).
+The price for such re-use is that when changes are made (such as new files
+are introduced into a directory), the listing may become out-of-date.  One may
+always refresh directory listing buffers by pressing ctrl-L (see
+|netrw-ctrl-l|).
+
+
+Related topics: |netrw-o| |netrw-p| |netrw-P| |netrw-t| |netrw-v|
+Associated setting variables: |g:netrw_browse_split|      |g:netrw_fastbrowse|
+                              |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd|
+			      |g:netrw_ftp_timelist_cmd|  |g:netrw_ssh_cmd|
+			      |g:netrw_ssh_browse_reject| |g:netrw_use_noswf|
 
-  *g:netrw_list_cmd*		command for listing remote directories
-				 default: (if ssh is executable)
-				          "ssh HOSTNAME ls -FLa"
 
-  *g:netrw_liststyle*		Set the default listing style:
-                                = 0: thin listing (one file per line)
-                                = 1: long listing (one file per line with time
-				     stamp information and file size)
-				= 2: wide listing (multiple files in columns)
-				= 3: tree style listing
-  *g:netrw_list_hide*		comma separated pattern list for hiding files
-				 default: ""
+BROWSING WITH A HORIZONTALLY SPLIT WINDOW	*netrw-o* *netrw-horiz* {{{2
 
-  *g:netrw_local_mkdir*		command for making a local directory
-				 default: "mkdir"
+Normally one enters a file or directory using the <cr>.  However, the "o" map
+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|)
 
-  *g:netrw_local_rmdir*		remove directory command (rmdir)
-				 default: "rmdir"
+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
 
-  *g:netrw_maxfilenamelen*	=32 by default, selected so as to make long
-				    listings fit on 80 column displays.
-				If your screen is wider, and you have file
-				or directory names longer than 32 bytes,
-				you may set this option to keep listings
-				columnar.
+	let g:netrw_alto = 1
 
-  *g:netrw_mkdir_cmd*		command for making a remote directory
-				 default: "ssh USEPORT HOSTNAME mkdir"
+in your <.vimrc>.  (also see |netrw-t| |netrw-v|)
 
-  *g:netrw_rm_cmd*		command for removing files
-				 default: "ssh USEPORT HOSTNAME rm"
+There is only one tree listing buffer; using "o" on a displayed subdirectory 
+will split the screen, but the same buffer will be shown twice.
 
-  *g:netrw_rmdir_cmd*		command for removing directories
-				 default: "ssh USEPORT HOSTNAME rmdir"
+Associated setting variables: |g:netrw_alto| |g:netrw_winsize|
 
-  *g:netrw_rmf_cmd*		 command for removing softlinks
-				 default: "ssh USEPORT HOSTNAME rm -f"
 
-  *g:netrw_sort_by*		sort by "name", "time", or "size"
-				 default: "name"
+BROWSING WITH A NEW TAB				*netrw-t* {{{2
 
-  *g:netrw_sort_direction*	sorting direction: "normal" or "reverse"
-				 default: "normal"
+Normally one enters a file or directory using the <cr>.  The "t" map
+allows one to open a new window hold the new directory listing or file in a
+new tab. (also see: |netrw-o| |netrw-v|)
 
-  *g:netrw_sort_sequence*	when sorting by name, first sort by the
-				comma-separated pattern sequence
-				 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
+BROWSING WITH A VERTICALLY SPLIT WINDOW			*netrw-v* {{{2
 
-  *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\+$'
+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|)
 
-  *g:netrw_use_noswf*		netrw normally avoids writing swapfiles
-  				for browser buffers.  However, under some
-				systems this apparently is causing nasty
-				ml_get errors to appear; if you're getting
-				ml_get errors, try putting
-				  let g:netrw_use_noswf= 0
-				in your .vimrc.
+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
 
-  *g:netrw_timefmt*		specify format string to strftime() (%c)
-				 default: "%c"
+	let g:netrw_altv = 1
 
-  *g:netrw_winsize*		specify initial size of new o/v windows
-				 default: ""
+in your <.vimrc>.  (also see: |netrw-o| |netrw-t|)
 
-  *g:NetrwTopLvlMenu*		This variable specifies the top level
-				menu name; by default, its "Netrw.".  If
-				you wish to change this, do so in your
-				.vimrc.
+There is only one tree listing buffer; using "v" on a displayed subdirectory 
+will split the screen, but the same buffer will be shown twice.
 
-INTRODUCTION TO DIRECTORY BROWSING			*netrw-browse-intro*
+Associated setting variable: |g:netrw_altv| |g:netrw_winsize|
 
-Netrw supports the browsing of directories on the local system and on remote
-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
-(such as pertinent global variable names) necessarily differ.
+CHANGE LISTING STYLE					*netrw-i* {{{2
 
-The Netrw remote file and directory browser handles two protocols: ssh and
-ftp.  The protocol in the url, if it is ftp, will cause netrw to use ftp
-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.
+The "i" map cycles between the thin, long, wide, and tree listing formats.
 
-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:
+The short listing format gives just the files' and directories' names.
 
-	vim [protocol]://[user@]hostname/path/
+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.  With the long listing
+format, netrw is not able to recognize filenames which have trailing spaces.
+Use the thin listing format for such files.
 
-For local directories, the trailing slash is not required.
+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.
+This listing format is the most compact.
 
-If you'd like to avoid entering the password in for remote directory listings
-with ssh or scp, see |netrw-listhack|.
+The tree listing format has a top directory followed by files and directories
+preceded by a "|".  One may open and close directories by pressing the <cr>
+key while atop the directory name.  There is only one tree listing buffer;
+hence, using "v" or "o" on a subdirectory will only show the same buffer,
+twice.
 
+Associated setting variables: |g:netrw_liststyle| |g:netrw_maxfilenamelen|
+                              |g:netrw_timefmt|   |g:netrw_list_cmd|
 
-NETRW BROWSING AND OPTION INCOMPATIBILITIES		*netrw-incompatible*
 
-Netrw will not work properly with >
+CHANGING TO A BOOKMARKED DIRECTORY			*netrw-gb*  {{{2
 
-	:set acd
-	:set fo=...ta...
-<
-If either of these options are present when browsing is attempted, netrw
-will change them by using noacd and removing the ta suboptions from the
-|'formatoptions'|.
-
-			*netrw-explore*  *netrw-pexplore* *netrw-texplore*
-			*netrw-hexplore* *netrw-sexplore* *netrw-nexplore*
-			*netrw-vexplore*
-DIRECTORY EXPLORING COMMANDS 
+To change directory back to a bookmarked directory, use
 
-     :Explore[!]   [dir]... Explore directory of current file       *:Explore*
-     :Sexplore[!]  [dir]... Split&Explore directory of current file *:Sexplore*
+	{cnt}gb
+
+Any count may be used to reference any of the bookmarks.  See |netrw-mb| on
+how to bookmark a directory and |netrw-qb| on how to list bookmarks.
+
+
+CHANGING TO A PREDECESSOR DIRECTORY	*netrw-u* *netrw-updir* {{{2
+
+Every time you change to a new directory (new for the current session),
+netrw will save the directory in a recently-visited directory history
+list (unless g:netrw_dirhistmax is zero; by default, it's ten).  With the
+"u" map, one can change to an earlier directory (predecessor).  To do
+the opposite, see |netrw-U|.
+
+
+CHANGING TO A SUCCESSOR DIRECTORY		*netrw-U* *netrw-downdir* {{{2
+
+With the "U" map, one can change to a later directory (successor).
+This map is the opposite of the "u" map. (see |netrw-u|)  Use the
+q map to list both the bookmarks and history. (see |netrw-qb|)
+
+
+NETRW CLEAN					*netrw-clean* *:NetrwClean*
+
+With :NetrwClean one may easily remove netrw from one's home directory;
+more precisely, from the first directory on your |'runtimepath'|.
+
+With :NetrwClean!, netrw will remove netrw from all directories on your
+|'runtimepath'|.
+
+With either form of the command, netrw will first ask for confirmation
+that the removal is in fact what you want to do.  If netrw doesn't have
+permission to remove a file, it will issue an error message.
+
+						*netrw-gx*
+CUSTOMIZING BROWSING WITH A USER FUNCTION	*netrw-x* *netrw-handler* {{{2
+						(also see |netrw_filehandler|)
+
+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: >
+
+	* when Exploring, hit the "x" key
+	* when editing, hit gx with the cursor atop the special filename
+<	  (not available if the |g:netrw_nogx| variable exists)
+
+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 Mac OS X               : open 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.
+
+							*netrw_filehandler*
+
+The "x" map applies a function to a file, based on its extension.  Of course,
+the handler function must exist for it to be called!
+>
+ Ex. mypgm.html   x ->
+                  NFH_html("scp://user@host/some/path/mypgm.html")
+<
+Users may write their own netrw File Handler functions to support more
+suffixes with special handling.  See <plugin/netrwFileHandlers.vim> for
+examples on how to make file handler functions.   As an example: >
+
+	" NFH_suffix(filename)
+	fun! NFH_suffix(filename)
+	..do something special with filename..
+	endfun
+<
+These functions need to be defined in some file in your .vim/plugin
+(vimfiles\plugin) directory.  Vim's function names may not have punctuation
+characters (except for the underscore) in them.  To support suffices that
+contain such characters, netrw will first convert the suffix using the
+following table: >
+
+    @ -> AT       ! -> EXCLAMATION    % -> PERCENT  
+    : -> COLON    = -> EQUAL          ? -> QUESTION 
+    , -> COMMA    - -> MINUS          ; -> SEMICOLON
+    $ -> DOLLAR   + -> PLUS           ~ -> TILDE    
+<    
+So, for example: >
+
+	file.rcs,v  ->  NFH_rcsCOMMAv()
+<
+If more such translations are necessary, please send me email: >
+		NdrOchip at ScampbellPfamily.AbizM - NOSPAM
+with a request.
+
+Associated setting variable: |g:netrw_browsex_viewer|
+
+							*netrw-curdir*
+DELETING FILES OR DIRECTORIES	*netrw-delete* *netrw-D* *netrw-del* {{{2
+
+If files have not been marked with |netrw-mf|:   (local marked file list)
+
+    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".
+
+If files have been marked with |netrw-mf|:   (local marked file list)
+
+    Marked files (and empty directories) will be deleted; again, you'll be
+    asked to confirm the deletion before it actually takes place.
+
+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 is used with files, and its default value is:
+
+	g:netrw_rm_cmd: ssh HOSTNAME rm
+
+The g:netrw_rmdir_cmd variable is used to support the removal of directories.
+Its default value is:
+
+	g:netrw_rmdir_cmd: ssh HOSTNAME rmdir
+
+If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt
+to remove it again using the g:netrw_rmf_cmd variable.  Its default value is:
+
+	g:netrw_rmf_cmd: ssh HOSTNAME rm -f
+
+Associated setting variable: |g:netrw_local_rmdir| |g:netrw_rm_cmd|
+                             |g:netrw_rmdir_cmd|   |g:netrw_ssh_cmd|
+
+
+*netrw-explore*  *netrw-hexplore* *netrw-nexplore* *netrw-pexplore*
+*netrw-rexplore* *netrw-sexplore* *netrw-texplore* *netrw-vexplore*
+DIRECTORY EXPLORATION COMMANDS  {{{2
+
+     :Explore[!]   [dir]... Explore directory of current file       *:Explore*
      :Hexplore[!]  [dir]... Horizontal Split & Explore              *:Hexplore*
-     :Vexplore[!]  [dir]... Vertical   Split & Explore              *:Vexplore*
+     :Rexplore          ... Return to Explorer                      *:Rexplore*
+     :Sexplore[!]  [dir]... Split&Explore directory of current file *:Sexplore*
      :Texplore     [dir]... Tab              & Explore              *:Texplore*
+     :Vexplore[!]  [dir]... Vertical   Split & Explore              *:Vexplore*
 
      Used with :Explore **/pattern : (also see |netrw-starstar|)
      :Nexplore............. go to next matching file                *:Nexplore*
@@ -1021,32 +1266,51 @@
 By default, these commands use the current file's directory.  However, one
 may explicitly provide a directory (path) to use.
 
-							*netrw-starstar*
-When Explore, Sexplore, Hexplore, or Vexplore are used with a **/filepat,
-such as:
->
-	:Explore **/filename_pattern
-<
-netrw will attempt to find a file in the current directory or any subdirectory
-which matches the filename pattern.  Internally, it produces a list of files
-which match the pattern and their paths; to that extent it resembles the Unix
-operation:
->
-	find $(pwd) -name "$1" -exec "echo" "{}" ";" 2> /dev/null
-<
-The directory display is updated to show the subdirectory containing a
-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 using shift-downarrow and shift-uparrow convenient.  They're mapped by
-netrw:
+The |g:netrw_winsize| variable also is used, if specified by the user, to
+size Hexplore and Vexplore windows.
+
+:Rexplore  This command is a little different from the others.  When one
+           edits a file, for example by pressing <cr> when atop a file in
+	   a netrw browser window, :Rexplore will return the display to
+	   that of the last netrw browser window.  Its a command version
+	   of <2-leftmouse> (which is only available under gvim and
+	   cooperative terms).
+
+
+*netrw-star* *netrw-starpat* *netrw-starstar* *netrw-starstarpat*
+EXPLORING WITH STARS AND PATTERNS
+
+When Explore, Sexplore, Hexplore, or Vexplore are used with one of the
+following four styles, Explore generates a list of files which satisfy
+the request. >
+
+    */filepat	files in current directory which satisfy filepat
+    **/filepat	files in current directory or below which satisfy the
+    		file pattern
+    *//pattern	files in the current directory which contain the
+    		pattern (vimgrep is used)
+    **//pattern	files in the current directory or below which contain
+    		the pattern (vimgrep is used)
+<
+The cursor will be placed on the first file in the list.  One may then
+continue to go to subsequent files on that list via |:Nexplore| or to
+preceding files on that list with |:Pexplore|.  Explore will update the
+directory and place the cursor appropriately.
+
+A plain >
+	:Explore
+will clear the explore list.
+
+If your console or gui produces recognizable shift-up or shift-down sequences,
+then you'll likely find using shift-downarrow and shift-uparrow convenient.
+They're mapped by netrw:
 
 	<s-down>  == Nexplore, and
 	<s-up>    == Pexplore.
 
 As an example, consider
 >
-	:Explore **/*.c
+	:Explore */*.c
 	:Nexplore
 	:Nexplore
 	:Pexplore
@@ -1054,38 +1318,55 @@
 The status line will show, on the right hand side of the status line, a
 message like "Match 3 of 20".
 
-							*netrw-starpat*
-When Explore, Sexplore, Hexplore, or Vexplore are used with a */pattern,
-such as:
->
-	:Explore */pattern
-<
-netrw will use |:vimgrep| to find files which contain the given pattern.
-Like what happens with |netrw-starstar|, a list of files which contain
-matches to the given pattern is generated.  The cursor will then jump
-to the first file with the given pattern; |:Nexplore|, |:Pexplore|, and
-the shifted-down and -up arrows work with the list to move to the next
-or previous files in that list.
-
-						*netrw-starstarpat*
-When Explore, Sexplore, Hexplore, or Vexplore are used with a **//pattern,
-such as:
->
-	:Explore **//pattern
-<
-then Explore will use |:vimgrep| to find files like |netrw-starpat|;
-however, Explore will also search subdirectories as well as the current
-directory.
+Associated setting variables: |g:netrw_keepdir|      |g:netrw_browse_split|
+                              |g:netrw_fastbrowse|   |g:netrw_ftp_browse_reject|
+			      |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd|
+			      |g:netrw_ftp_timelist_cmd| |g:netrw_list_cmd|
+			      |g:netrw_liststyle|
 
 
-REFRESHING THE LISTING				*netrw-ctrl-l* *netrw-ctrl_l*
+DISPLAYING INFORMATION ABOUT FILE				*netrw-qf* {{{2
 
-To refresh either a local or remote directory listing, press ctrl-l (<c-l>) or
-hit the <cr> when atop the ./ directory entry in the listing.  One may also
-refresh a local directory by using ":e .".
+With the cursor atop a filename, pressing "qf" will reveal the file's size
+and last modification timestamp.  Currently this capability is only available
+for local files.
+
+
+EDIT FILE OR DIRECTORY HIDING LIST	*netrw-ctrl-h* *netrw-edithide* {{{2
+
+The "<ctrl-h>" map brings up a requestor allowing the user to change the
+file/directory hiding list contained in |g:netrw_list_hide|.  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|).
 
+The "gh" mapping (see |netrw-gh|) quickly alternates between the usual
+hiding list and the hiding of files or directories that begin with ".".
 
-GOING UP						*netrw--*
+Associated setting variables: |g:netrw_hide| |g:netrw_list_hide|
+Associated topics: |netrw-a| |netrw-gh| |netrw-mh|
+
+
+EDITING THE SORTING SEQUENCE		*netrw-S* *netrw-sortsequence* {{{2
+
+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 (all one line):
+>
+	'[\/]$,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,
+	\.swp$,\.bak$,\~$'
+<
+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.
+
+Related topics:              |g:netrw-s| |g:netrw-S|
+Associated setting variable: |g:netrw_sort_sequence|
+
+
+GOING UP							*netrw--* {{{2
 
 To go up a directory, press "-" or press the <cr> when atop the ../ directory
 entry in the listing.
@@ -1098,78 +1379,111 @@
 
 where the HOSTNAME becomes the [user@]hostname as requested by the attempt to
 read.  Naturally, the user may override this command with whatever is
-preferred.  The NetList function which implements remote directory browsing
+preferred.  The NetList function which implements remote browsing
 expects that directories will be flagged by a trailing slash.
 
 
-BROWSING							*netrw-cr*
+HIDING FILES OR DIRECTORIES			*netrw-a* *netrw-hiding* {{{2
 
-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.  
+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.
 
-  CAVEAT: There are four 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.
+If no files have been marked via |netrw-mf|:
 
-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 or tab.  When the option
-is one or two, the splitting will be taken horizontally or vertically,
-respectively.  When the option is set to three, a <cr> will cause the file
-to appear in a new tab.
+The "a" map allows the user to cycle through the three hiding modes.
 
+The |g:netrw_list_hide| variable holds a comma delimited list of patterns
+based on regular expressions (ex. ^.*\.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" key to show all files, hide
+matching files, or to show only the matching files.
 
-OBTAINING A FILE						*netrw-O*
+	Example: \.[ch]$
+		This hiding list command will hide/show all *.c and *.h files.
 
-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).  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.
+	Example: \.c$,\.h$
+		This hiding list command will also hide/show all *.c and *.h
+		files.
 
-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.
+Don't forget to use the "a" map to select the mode (normal/hiding/show) you
+want!
 
-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|.
+If files have been marked using |netrw-mf|, then this command will:
 
+  if showing all files or non-hidden files:
+   modify the g:netrw_list_hide list by appending the marked files to it
+   and showing only non-hidden files.
+
+  else if showing hidden files only:
+   modify the g:netrw_list_hide list by removing the marked files from it
+   and showing only non-hidden files.
+  endif
+
+					*netrw-gh* *netrw-hide*
+As a quick shortcut, one may press >
+	gh
+to toggle between hiding files which begin with a period (dot) and not hiding
+them.
 
-CHANGE LISTING STYLE						*netrw-i*
+Associated setting variable: |g:netrw_list_hide|
+Associated topics: |netrw-a| |netrw-ctrl-h| |netrw-mh|
 
-The "i" map cycles between the thin, long, wide, and tree listing formats.
+IMPROVING BROWSING			*netrw-listhack* *netrw-ssh-hack* {{{2
 
-The short listing format gives just the files' and directories' names.
+Especially with the remote directory browser, constantly entering the password
+is tedious.
 
-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.  With the long listing
-format, netrw is not able to recognize filenames which have trailing spaces.
-Use the thin listing format for such files.
+For Linux/Unix systems, the book "Linux Server Hacks - 100 industrial strength
+tips & tools" by Rob Flickenger (O'Reilly, ISBN 0-596-00461-3) gives a tip
+for setting up no-password ssh and scp and discusses associated security
+issues.  It used to be available at http://hacks.oreilly.com/pub/h/66 ,
+but apparently that address is now being redirected to some "hackzine".
+I'll attempt a summary:
 
-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.
-This listing format is the most compact.
+	1. Generate a public/private key pair on the ssh server:
+	   ssh-keygen -t rsa
+	   (saving the file in ~/.ssh/id_rsa is ok)
+	2. Just hit the <CR> when asked for passphrase (twice).
+	3. This creates two files:
+	     ~/.ssh/id_rsa
+	     ~/.ssh/id_rsa.pub
+	4. On the client:
+	    cd
+	    mkdir .ssh
+	    chmod 0700 .ssh
+	    scp {serverhostname}:.ssh/id_rsa.pub .
+	    cat id_rsa.pub >> .ssh/authorized_keys2
 
-The tree listing format has a top directory followed by files and directories
-preceded by a "|".  One may open and close directories by pressing the <cr>
-key while atop the directory name.  There is only one tree listing buffer;
-hence, using "v" or "o" on a subdirectory will only show the same buffer,
-twice.
+For Windows, folks on the vim mailing list have mentioned that Pageant helps
+with avoiding the constant need to enter the password.
+
+Kingston Fung wrote about another way to avoid constantly needing to enter
+passwords:
+
+    In order to avoid the need to type in the password for scp each time, you
+    provide a hack in the docs to set up a non password ssh account. I found a
+    better way to do that: I can use a regular ssh account which uses a
+    password to access the material without the need to key-in the password
+    each time. It's good for security and convenience. I tried ssh public key
+    authorization + ssh-agent, implementing this, and it works! Here are two
+    links with instructions:
+
+    http://www.ibm.com/developerworks/library/l-keyc2/
+    http://sial.org/howto/openssh/publickey-auth/
+
+
+LISTING BOOKMARKS AND HISTORY		*netrw-qb* *netrw-listbookmark* {{{2
 
+Pressing "qb" (query bookmarks) will list the bookmarked directories and
+directory traversal history (query).
 
-MAKING A NEW DIRECTORY						*netrw-d*
+(see |netrw-mb|, |netrw-gb|, |netrw-u|, and |netrw-U|)
+
+
+MAKING A NEW DIRECTORY					*netrw-d* {{{2
 
 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
@@ -1178,345 +1492,625 @@
 directory.  Attempts to make a local directory that already exists (as either
 a file or a directory) will be detected, reported on, and ignored.
 
+Currently, making a directory via ftp is not supported.
 
-DELETING FILES OR DIRECTORIES		*netrw-delete* *netrw-D* *netrw-del*
+Associated setting variable: |g:netrw_local_mkdir| |g:netrw_mkdir_cmd|
 
-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".
-
-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
-is used with files, and its default value is:
 
-	g:netrw_rm_cmd: ssh HOSTNAME rm
+MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY	*netrw-c* {{{2
 
-The g:netrw_rmdir_cmd variable is used to support the removal of directories.
-Its default value is:
+By default, |g:netrw_keepdir| is 1.  This setting means that the current
+directory will not track the browsing directory.
 
-	g:netrw_rmdir_cmd: ssh HOSTNAME rmdir
+Setting g:netrw_keepdir to 0 tells netrw to make vim's current directory to
+track netrw's browsing directory.
 
-If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt
-to remove it again using the g:netrw_rmf_cmd variable.  Its default value is:
+However, given the default setting for g:netrw_keepdir of 1 where netrw
+maintains its own separate notion of the current directory, in order to make
+the two directories the same, use the "c" map (just type c).  That map will
+set Vim's notion of the current directory to netrw's current browsing
+directory.
 
-	g:netrw_rmf_cmd: ssh HOSTNAME rm -f
+Associated setting variable: |g:netrw_keepdir|
 
+MARKING FILES							*netrw-mf* {{{2
+	(also see |netrw-mr|)
 
-RENAMING FILES OR DIRECTORIES		*netrw-move* *netrw-rename* *netrw-R*
+One may mark files with the cursor atop a filename and then pressing "mf".
+With gvim, one may also mark files with <s-leftmouse>.  The following netrw
+maps make use of marked files:
 
-Renaming/moving files and directories involves moving the cursor to the
-file/directory to be moved (renamed) and pressing "R".  You will then be
-queried for where you want the file/directory to be moved.  You may select a
-range of lines with the "V" command (visual selection), and then pressing "R".
+    |netrw-a|	Hide marked files/directories
+    |netrw-D|	Delete marked files/directories
+    |netrw-mc|	Copy marked files to target
+    |netrw-md|	Apply vimdiff to marked files
+    |netrw-me|	Edit marked files
+    |netrw-mg|	Apply vimgrep to marked files
+    |netrw-mm|	Move marked files
+    |netrw-mp|	Print marked files
+    |netrw-mt|	Set target for |netrw-mm| and |netrw-mc|
+    |netrw-mT|	Generate tags using marked files
+    |netrw-mx|	Apply shell command to marked files
+    |netrw-mz|	Compress/Decompress marked files
+    |netrw-O|	Obtain marked files
+    |netrw-R|	Rename marked files
 
-The g:netrw_rename_cmd variable is used to implement renaming.  By default its
-value is:
+One may unmark files one at a time the same way one marks them; ie. place
+the cursor atop a marked file and press "mf".  This process also works
+with <s-leftmouse> using gvim.  One may unmark all files by pressing
+"mu" (see |netrw-mu|).
 
-	ssh HOSTNAME mv
+*markfilelist* *global_markfilelist* *local_markfilelist*
+All marked files are entered onto the global marked file list; there is only
+one such list.  In addition, every netrw buffer also has its own local marked
+file list; since netrw buffers are associated with specific directories, this
+means that each directory has its own local marked file list.  The various
+commands which operate on marked files use one or the other of the marked file
+lists.
 
-One may rename a block of files and directories by selecting them with
-the V (|linewise-visual|).
 
+MARKING FILES BY REGULAR EXPRESSION				*netrw-mr* {{{2
+	(also see |netrw-mf|)
 
-HIDING FILES OR DIRECTORIES			*netrw-a* *netrw-hiding*
+One may also mark files by pressing "mr"; netrw will then issue a prompt,
+"Enter regexp: ".  You may then enter a regular expression such as \.c$ .
+All files in the current directory will then be marked.  Note that the
+regular expressions are vim-style |regexp| ones, not shell ones.  So
+entering *.c probably isn't what you want!
 
-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-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" key to show all files, hide matching files, or to show only the matching
-files.
+MARKED FILES: ARBITRARY COMMAND				*netrw-mx* {{{2
+	    (See |netrw-mf| and |netrw-mr| for how to mark files)
+		      (uses the local marked-file list)
 
-	Example: ^.*\.[ch]
-		This hiding list command will hide/show all *.c and *.h files.
+Upon activation of the "mx" map, netrw will query the user for some (external)
+command to be applied to all marked files.  All "%"s in the command will be
+substituted with the name of each marked file in turn.  If no "%"s are in the
+command, then the command will be followed by a space and a marked filename.
 
-	Example: ^.*\.c,^.*\.h
-		This hiding list command will also hide/show all *.c and *.h
-		files.
 
-Don't forget to use the "a" map to select the normal/hiding/show mode you want!
+MARKED FILES: COMPRESSION AND DECOMPRESSION		*netrw-mz* {{{2
+	    (See |netrw-mf| and |netrw-mr| for how to mark files)
+		      (uses the local marked file list)
 
-						*netrw-ctrl_h*
-EDIT FILE OR DIRECTORY HIDING LIST		*netrw-ctrl-h* *netrw-edithide*
+If any marked files are compressed,   then "mz" will decompress them.
+If any marked files are decompressed, then "mz" will compress them
+using the command specified by |g:netrw_compress|; by default,
+that's "gzip".
 
-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|).
+For decompression, netrw provides a |Dictionary| of suffices and their
+associated decompressing utilities; see |g:netrw_decompress|.
 
+Associated setting variables: |g:netrw_compress| |g:netrw_decompress|
 
-BROWSING WITH A HORIZONTALLY SPLIT WINDOW		*netrw-o* *netrw-horiz*
+MARKED FILES: COPYING						*netrw-mc* {{{2
+	    (See |netrw-mf| and |netrw-mr| for how to mark files)
+		      (Uses the global marked file list)
 
-Normally one enters a file or directory using the <cr>.  However, the "o" map
-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|)
+Select a target directory with mt (|netrw-mt|).  Then change directory,
+select file(s) (see |netrw-mf|), and press "mc".
 
-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
+Associated setting variable: |g:netrw_localcopycmd| |g:netrw_ssh_cmd|
 
-	let g:netrw_alto = 1
+MARKED FILES: DIFF						*netrw-md* {{{2
+	    (See |netrw-mf| and |netrw-mr| for how to mark files)
+		      (uses the global marked file list)
 
-in your <.vimrc>.  (also see |netrw-t| |netrw-v| |g:netrw_alto|)
+Use |vimdiff| to visualize difference between selected files (two or
+three may be selected for this).  Uses the global marked file list.
 
-There is only one tree listing buffer; using "o" on a displayed subdirectory 
-will split the screen, but the same buffer will be shown twice.
+MARKED FILES: EDITING						*netrw-me* {{{2
+	    (See |netrw-mf| and |netrw-mr| for how to mark files)
+		      (uses the global marked file list)
 
+This command will place the marked files on the |arglist| and commence
+editing them.  One may return the to explorer window with |:Rexplore|.
 
-BROWSING WITH A VERTICALLY SPLIT WINDOW				*netrw-v*
+MARKED FILES: GREP						*netrw-mg* {{{2
+	    (See |netrw-mf| and |netrw-mr| for how to mark files)
+		      (uses the global marked file list)
 
-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|)
+This command will apply |:vimgrep| to the marked files.  The command will ask
+for the requested pattern; one may enter: >
+	/pattern/[g][j]
+	! /pattern/[g][j]
+	pattern
+<
+MARKED FILES: HIDING AND UNHIDING BY SUFFIX			*netrw-mh* {{{2
+	    (See |netrw-mf| and |netrw-mr| for how to mark files)
+		      (uses the local marked file list)
+
+This command extracts the suffices of the marked files and toggles their
+presence on the hiding list.  Please note that marking the same suffix
+this way multiple times will result in the suffix's presence being toggled
+for each file (so an even quantity of marked files having the same suffix
+is the same as not having bothered to select them at all).
+
+Related topics: |netrw-a| |g:netrw_list_hide|
+
+MARKED FILES: MOVING						*netrw-mm* {{{2
+	    (See |netrw-mf| and |netrw-mr| for how to mark files)
+		      (uses the global marked file list)
+
+Select a target directory with mT (|netrw-mt|).  Then change directory,
+select file(s) (see |netrw-mf|), and press "mm".
+
+Associated setting variable: |g:netrw_localmovecmd| |g:netrw_ssh_cmd|
+
+MARKED FILES: PRINTING						*netrw-mp* {{{2
+	    (See |netrw-mf| and |netrw-mr| for how to mark files)
+		      (uses the local marked file list)
+
+Netrw will apply the |:hardcopy| command to marked files.  What it does
+is open each file in a one-line window, execute hardcopy, then close the
+one-line window.
+
+
+MARKED FILES: SOURCING						*netrw-ms* {{{2
+	    (See |netrw-mf| and |netrw-mr| for how to mark files)
+		      (uses the local marked file list)
+
+Netrw will source the marked files (using vim's |:source| command)
+
+
+MARKED FILES: TAGGING						*netrw-mT* {{{2
+	    (See |netrw-mf| and |netrw-mr| for how to mark files)
+		      (uses the global marked file list)
+
+The "mt" mapping will apply the command in |g:netrw_ctags| (by default, its
+"ctags") to marked files.  For remote browsing, in order to create a tags file
+netrw will use ssh (see |g:netrw_ssh_cmd|), and so ssh must be available for
+this to work on remote systems.  For your local system, see |ctags| on how to
+get a version.  I myself use hdrtags, currently available at
+http://mysite.verizon.net/astronaut/src/index.html , and have >
+
+	let g:netrw_ctags= "hdrtag"
+<
+in my <.vimrc>.
+
+When a remote set of files are tagged, the resulting tags file is "obtained";
+ie. a copy is transferred to the local system's directory.  The local tags
+file is then modified so that one may use it through the network.  The
+modification is concerns the names of the files in the tags; each filename is
+preceded by the netrw-compatible url used to obtain it.  When one subsequently
+uses one of the go to tag actions (|tags|), the url will be used by netrw to
+edit the desired file and go to the tag.
+
+Associated setting variables: |g:netrw_ctags| |g:netrw_ssh_cmd|
+
+
+MARKED FILES: SETTING THE TARGET DIRECTORY			*netrw-mt* {{{2
+     (See |netrw-mf| and |netrw-mr| for how to mark files)
+
+Set the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|):
+
+  * if the cursor is atop a file name, then the netrw window's currently
+    displayed directory is used for the copy/move-to target.
+
+  * also, if the cursor is in the banner, then the netrw window's currently
+    displayed directory is used for the copy/move-to target.
+
+  * however, if the cursor is atop a directory name, then that directory is
+    used for the copy/move-to target
+
+There is only one copy/move-to target per vim session; ie. the target is a
+script variable (see |s:var|) and is shared between all netrw windows (in an
+instance of vim).
+
+MARKED FILES: UNMARKING						*netrw-mu* {{{2
+     (See |netrw-mf| and |netrw-mr| for how to mark files)
+
+The "mu" mapping will unmark all currently marked files.
+
+
+NETRW BROWSER VARIABLES		*netrw-browser-options* *netrw-browser-var* {{{2
+
+(if you're interestd in the netrw file transfer settings, see |netrw-options|)
+
+The <netrw.vim> browser provides settings in the form of variables which
+you may modify; by placing these settings in your <.vimrc>, you may customize
+your browsing preferences.  (see also: |netrw-settings|)
+>
+   ---				-----------
+   Var				Explanation
+   ---				-----------
+< *g:netrw_alto*		change from above splitting to below splitting
+				by setting this variable (see |netrw-o|)
+				 default: =&sb           (see |'sb'|)
+
+  *g:netrw_altv*		change from left splitting to right splitting
+				by setting this variable (see |netrw-v|)
+				 default: =&spr          (see |'spr'|)
+
+  *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  
+				=3: open file in new tab
+				=4: act like "P" (ie. open previous window)
+
+  *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_cd_escape*		="[]#*$%'\" ?`!&();<>\\"
+  				This option is used to escape directory names
+				before changing directory to them.
+
+  *g:netrw_compress*		="gzip"
+				    Will compress marked files with this
+				    command
+
+  *g:netrw_decompress*		= { ".gz" : "gunzip" ,
+				    ".bz2" : "bunzip2" ,
+				    ".zip" : "unzip" ,
+				    ".tar" : "tar -xf"}
+				  A dictionary mapping suffices to
+				  decompression programs.
+
+  *g:netrw_fastbrowse*		=0: slow speed directory browsing;
+				    never re-uses directory listings,
+				    always obtains directory listings.
+				=1: medium speed directory browsing;
+				    re-use directory listings only
+				    when remote directory browsing.
+				    (default value)
+				=2: fast directory browsing;
+				    only obtains directory listings when the
+				    directory hasn't been seen before
+				    (or |netrw-ctrl-l| is used).
+
+				Fast browsing retains old directory listing
+				buffers so that they don't need to be
+				re-acquired.  This feature is especially
+				important for remote browsing.  However, if
+				a file is introduced or deleted into or from
+				such directories, the old directory buffer
+				becomes out-of-date.  One may always refresh
+				such a directory listing with |netrw-ctrl-l|.
+				This option gives the user the choice of
+				trading off accuracy (ie. up-to-date listing)
+				versus speed.
+
+  *g:netrw_fname_escape*	=' ?&;%'
+  				Used on filenames before remote reading/writing
+
+  *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
+				remove such embedded messages.  By default its
+				value is:
+				 '^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$'
+
+  *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_ftp_sizelist_cmd*	options for passing along to ftp for directory
+				listing, sorted by size of file.
+				Defaults:
+				 unix or g:netrw_cygwin set: : "ls -slF"
+				 otherwise                     "dir"
+
+  *g:netrw_ftp_timelist_cmd*	options for passing along to ftp for directory
+				listing, sorted by time of last modification.
+				Defaults:
+				 unix or g:netrw_cygwin set: : "ls -tlF"
+				 otherwise                     "dir"
+
+  *g:netrw_glob_escape*		='[]*?`{~$'
+  				These characters in directory names are
+				escaped before applying glob()
 
-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
+  *g:netrw_hide*		if true, the hiding list is used
+				 default: =0
 
-	let g:netrw_altv = 1
+  *g:netrw_keepdir*		=1 (default) keep current directory immune from
+				   the browsing directory.
+				=0 keep the current directory the same as the
+				   browsing directory.
+				The current browsing directory is contained in
+				b:netrw_curdir (also see |netrw-c|)
 
-in your <.vimrc>.  (also see: |netrw-o| |netrw-t| |g:netrw_altv|)
+  *g:netrw_list_cmd*		command for listing remote directories
+				 default: (if ssh is executable)
+				          "ssh HOSTNAME ls -FLa"
 
-There is only one tree listing buffer; using "v" on a displayed subdirectory 
-will split the screen, but the same buffer will be shown twice.
+  *g:netrw_liststyle*		Set the default listing style:
+                                = 0: thin listing (one file per line)
+                                = 1: long listing (one file per line with time
+				     stamp information and file size)
+				= 2: wide listing (multiple files in columns)
+				= 3: tree style listing
+  *g:netrw_list_hide*		comma separated pattern list for hiding files
+				Patterns are regular expressions (see |regexp|)
+				Example: let g:netrw_list_hide= '.*\.swp$'
+				 default: ""
 
+  *g:netrw_localcopycmd*	="cp" Linux/Unix/MacOS/Cygwin
+  				="copy" Windows
+				Copies marked files (|netrw-mf|) to target
+				directory (|netrw-mt|, |netrw-mc|)
+
+  *g:netrw_localmovecmd*	="mv" Linux/Unix/MacOS/Cygwin
+  				="move" Windows
+				Moves marked files (|netrw-mf|) to target
+				directory (|netrw-mt|, |netrw-mm|)
 
-BROWSING WITH A NEW TAB					*netrw-t*
+  *g:netrw_local_mkdir*		command for making a local directory
+				 default: "mkdir"
 
-Normally one enters a file or directory using the <cr>.  The "t" map
-allows one to open a new window hold the new directory listing or file in a
-new tab. (also see: |netrw-o| |netrw-v|)
+  *g:netrw_local_rmdir*		remove directory command (rmdir)
+				 default: "rmdir"
 
+  *g:netrw_maxfilenamelen*	=32 by default, selected so as to make long
+				    listings fit on 80 column displays.
+				If your screen is wider, and you have file
+				or directory names longer than 32 bytes,
+				you may set this option to keep listings
+				columnar.
 
-PREVIEW WINDOW					*netrw-p* *netrw-preview*
+  *g:netrw_mkdir_cmd*		command for making a remote directory
+				 default: "ssh USEPORT HOSTNAME mkdir"
 
-One may use a preview window by using the "p" key when the cursor is atop the
-desired filename to be previewed.
+  *g:netrw_retmap*		if it exists and is set to one, then
+				<2-leftmouse> will be mapped for easy
+				return to the netrw browser window.
+				(example: click once to select and open
+				a file, double-click to return)
+				  default: =0
 
+  *g:netrw_rm_cmd*		command for removing files
+				 default: "ssh USEPORT HOSTNAME rm"
 
-PREVIOUS WINDOW					*netrw-P* *netrw-prvwin*
+  *g:netrw_rmdir_cmd*		command for removing directories
+				 default: "ssh USEPORT HOSTNAME rmdir"
 
-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|).
+  *g:netrw_rmf_cmd*		 command for removing softlinks
+				 default: "ssh USEPORT HOSTNAME rm -f"
 
-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).
+  *g:netrw_sort_by*		sort by "name", "time", or "size"
+				 default: "name"
 
+  *g:netrw_sort_direction*	sorting direction: "normal" or "reverse"
+				 default: "normal"
 
-SELECTING SORTING STYLE				*netrw-s* *netrw-sort*
+  *g:netrw_sort_sequence*	when sorting by name, first sort by the
+				comma-separated pattern sequence
+				 default: '[\/]$,*,\.bak$,\.o$,\.h$,
+				           \.info$,\.swp$,\.obj$'
 
-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.
+  *g:netrw_special_syntax*	If true, then certain files will be shown
+  				in special syntax in the browser:
 
+					netrwBak     : *.bak
+					netrwCompress: *.gz *.bz2 *.Z *.zip
+					netrwData    : *.dat
+					netrwHdr     : *.h
+					netrwLib     : *.a *.so *.lib *.dll
+					netrwMakefile: [mM]akefile *.mak
+					netrwObj     : *.o *.obj
+					netrwTags    : tags ANmenu ANtags
+					netrwTilde   : *~ 
+					netrwTmp     : tmp* *tmp
+
+				These syntax highlighting groups are linked
+				to Folded or DiffChange by default
+				(see |hl-Folded| and |hl-DiffChange|), but
+				one may put lines like >
+					hi link netrwCompress Visual
+<				into one's <.vimrc> to use one's own
+				preferences.
 
-EDITING THE SORTING SEQUENCE		*netrw-S* *netrw-sortsequence*
+  *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
 
-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.
+  *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\+$'
 
 
-REVERSING SORTING ORDER			*netrw-r* *netrw-reverse*
+  *g:netrw_tmpfile_escape*	=' &;'
+  				escape() is applied to all temporary files
+				to escape these characters.
+
+  *g:netrw_timefmt*		specify format string to vim's strftime().
+				The default, "%c", is "the preferred date
+				and time representation for the current
+				locale" according to my manpage entry for
+				strftime(); however, not all are satisfied
+				with it.  Some alternatives:
+				 "%a %d %b %Y %T",
+				 " %a %Y-%m-%d  %I-%M-%S %p"
+				 default: "%c"
 
-One may toggle between normal and reverse sorting order by pressing the
-"r" key.
+  *g:netrw_use_noswf*		netrw normally avoids writing swapfiles
+  				for browser buffers.  However, under some
+				systems this apparently is causing nasty
+				ml_get errors to appear; if you're getting
+				ml_get errors, try putting
+				  let g:netrw_use_noswf= 0
+				in your .vimrc.
 
+  *g:netrw_winsize*		specify initial size of new windows made with
+				"o" (see |netrw-o|), "v" (see |netrw-v|),
+				|:Hexplore| or |:Vexplore|.
+				 default: ""
 
-CHANGING TO A PREDECESSOR DIRECTORY		*netrw-u* *netrw-updir*
+  *g:netrw_xstrlen*		Controls how netrw computes a string
+  				including multi-byte characters' string
+				length. (thanks to N Weibull, T Mechelynck)
+				=0: uses Vim's built-in strlen()
+				=1: number of codepoints (Latin + a combining
+				    circumflex is two codepoints)  (DEFAULT)
+				=2: number of spacing codepoints (Latin a +
+				    combining circumflex is one spacing 
+				    codepoint; a hard tab is one; wide and
+				    narrow CJK are one each; etc.)
+				=3: virtual length (counting tabs as anything
+				    between 1 and |'tabstop'|, wide CJJK as 2
+				    rather than 1, Arabic alif as zero when
+				    immediately preceded by lam, one
+				    otherwise, etc)
 
-Every time you change to a new directory (new for the current session),
-netrw will save the directory in a recently-visited directory history
-list (unless g:netrw_dirhistmax is zero; by default, its ten).  With the
-"u" map, one can change to an earlier directory (predecessor).  To do
-the opposite, see |netrw-U|.
+  *g:NetrwTopLvlMenu*		This variable specifies the top level
+				menu name; by default, it's "Netrw.".  If
+				you wish to change this, do so in your
+				.vimrc.
 
+NETRW BROWSING AND OPTION INCOMPATIBILITIES	*netrw-incompatible* {{{2
 
-CHANGING TO A SUCCESSOR DIRECTORY		*netrw-U* *netrw-downdir*
+Netrw has been designed to handle user options by saving them, setting the
+options to something that's compatible with netrw's needs, and then restoring
+them.  However, the autochdir option: >
+	:set acd
+is problematical.  Autochdir sets the current directory to that containing the
+file you edit; this apparently also applies to directories.  In other words,
+autochdir sets the current directory to that containing the "file" (even if
+that "file" is itself a directory).
 
-With the "U" map, one can change to a later directory (successor).
-This map is the opposite of the "u" map. (see |netrw-u|)  Use the
-q map to list both the bookmarks and history. (see |netrw-q|)
+NETRW SETTINGS						*netrw-settings* {{{2
 
-						*netrw-gx*
-CUSTOMIZING BROWSING WITH A USER FUNCTION	*netrw-x* *netrw-handler*
-						(also see |netrw_filehandler|)
+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.
 
-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: >
+(also see: |netrw-browser-var| |netrw-protocol| |netrw-var| |netrw-variables|)
 
-	* when Exploring, hit the "x" key
-	* when editing, hit gx with the cursor atop the special filename
-<	  (not available if the |g:netrw_nogx| variable exists)
 
-Netrw determines which special handler by the following method:
+==============================================================================
+OBTAINING A FILE					*netrw-O* {{{2
 
-  * if |g:netrw_browsex_viewer| exists, then it will be used to attempt to
-    view files.  Examples of useful settings (place into your <.vimrc>): >
+If there are no marked files:
 
-	: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|).
+    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.
 
-  * 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.
-  * otherwise the netrwFileHandler plugin is used.
+If there are marked files:
 
-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.
+    The marked files will be obtained (ie. a copy will be transferred to your
+    local machine, but not set up for editing).
 
-							*netrw_filehandler*
+Only ftp and scp are supported for this operation (but since these two are
+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.
 
-The "x" map applies a function to a file, based on its extension.  Of course,
-the handler function must exist for it to be called!
->
- Ex. mypgm.html   x ->
-                  NFH_html("scp://user@host/some/path/mypgm.html")
-<
-Users may write their own netrw File Handler functions to support more
-suffixes with special handling.  See <plugin/netrwFileHandlers.vim> for
-examples on how to make file handler functions.   As an example: >
+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.
 
-	" NFH_suffix(filename)
-	fun! NFH_suffix(filename)
-	..do something special with filename..
-	endfun
-<
-These functions need to be defined in some file in your .vim/plugin
-(vimfiles\plugin) directory.  Vim's function names may not have punctuation
-characters (except for the underscore) in them.  To support suffices that
-contain such characters, netrw will first convert the suffix using the
-following table: >
+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|.
 
-    @ -> AT       ! -> EXCLAMATION    % -> PERCENT  
-    : -> COLON    = -> EQUAL          ? -> QUESTION 
-    , -> COMMA    - -> MINUS          ; -> SEMICOLON
-    $ -> DOLLAR   + -> PLUS           ~ -> TILDE    
-<    
-So, for example: >
 
-	file.rcs,v  ->  NFH_rcsCOMMAv()
-<
-If more such translations are necessary, please send me email: >
-		NdrOchip at ScampbellPfamily.AbizM - NOSPAM
-with a request.
+PREVIEW WINDOW				*netrw-p* *netrw-preview* {{{2
 
+One may use a preview window by using the "p" key when the cursor is atop the
+desired filename to be previewed.  The display will then split to show both
+the browser (where the cursor will remain) and the file (see |:pedit|).
+By default, the split will be taken horizontally; one may use vertical
+splitting if one has set |g:netrw_preview| first.
 
-MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY	*netrw-c* *netrw-curdir*
 
-By default, |g:netrw_keepdir| is 1.  This setting means that the current
-directory will not track the browsing directory.
+PREVIOUS WINDOW				*netrw-P* *netrw-prvwin* {{{2
+
+To edit a file or directory in the previously used (last accessed) 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|).
 
-Setting g:netrw_keepdir to 0 tells netrw to make vim's current directory to
-track netrw's browsing directory.
+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).
 
-However, given the default setting for g:netrw_keepdir of 1 where netrw
-maintains its own separate notion of the current directory, in order to make
-the two directories the same, use the "c" map (just type c).  That map will
-set Vim's notion of the current directory to netrw's current browsing
-directory.
 
+REFRESHING THE LISTING			*netrw-ctrl-l* *netrw-ctrl_l* {{{2
 
-BOOKMARKING A DIRECTORY		*netrw-mb* *netrw-bookmark* *netrw-bookmarks*
-One may easily "bookmark" a directory by using >
+To refresh either a local or remote directory listing, press ctrl-l (<c-l>) or
+hit the <cr> when atop the ./ directory entry in the listing.  One may also
+refresh a local directory by using ":e .".
 
-	{cnt}mb
-<
-Any count may be used.  One may use viminfo's "!" option to retain bookmarks
-between vim sessions.  See |netrw-gb| for how to return to a bookmark and
-|netrw-q| for how to list them.
 
+RENAMING FILES OR DIRECTORIES	*netrw-move* *netrw-rename* *netrw-R* {{{2
 
-CHANGING TO A BOOKMARKED DIRECTORY			*netrw-gb* 
+If there are no marked files: (see |netrw-mf|)
 
-To change directory back to a bookmarked directory, use
+    Renaming/moving files and directories involves moving the cursor to the
+    file/directory to be moved (renamed) and pressing "R".  You will then be
+    queried for where you want the file/directory to be moved.  You may select
+    a range of lines with the "V" command (visual selection), and then
+    pressing "R".
 
-	{cnt}gb
+If there are marked files:  (see |netrw-mf|)
 
-Any count may be used to reference any of the bookmarks.  See |netrw-mb| on
-how to bookmark a directory and |netrw-q| on how to list bookmarks.
+    Marked files will be renamed (moved).  You will be queried as above in
+    order to specify where you want the file/directory to be moved.
 
+    WARNING:~
 
-LISTING BOOKMARKS AND HISTORY			*netrw-q* *netrw-listbookmark*
+    Note that moving files is a dangerous operation; copies are safer.  That's
+    because a "move" for remote files is actually a copy + delete -- and if
+    the copy fails and the delete does not, you may lose the file.
 
-Pressing "q" will list the bookmarked directories and directory traversal
-history (query). (see |netrw-mb|, |netrw-gb|, |netrw-u|, and |netrw-U|)
+The g:netrw_rename_cmd variable is used to implement renaming.  By default its
+value is:
 
+	ssh HOSTNAME mv
 
-IMPROVING DIRECTORY BROWSING				*netrw-listhack*
+One may rename a block of files and directories by selecting them with
+the V (|linewise-visual|).
 
-Especially with the remote directory browser, constantly entering the password
-is tedious.
 
-For Linux/Unix systems, the book "Linux Server Hacks - 100 industrial strength
-tips & tools" by Rob Flickenger (O'Reilly, ISBN 0-596-00461-3) gives a tip
-for setting up no-password ssh and scp and discusses associated security
-issues.  It used to be available at http://hacks.oreilly.com/pub/h/66 ,
-but apparently that address is now being redirected to some "hackzine".
-I'll attempt a summary:
+REVERSING SORTING ORDER		*netrw-r* *netrw-reverse* {{{2
 
-	1. Generate a public/private key pair on the ssh server:
-	   ssh-keygen -t rsa
-	   (saving the file in ~/.ssh/id_rsa is ok)
-	2. Just hit the <CR> when asked for passphrase (twice).
-	3. This creates two files:
-	     ~/.ssh/id_rsa
-	     ~/.ssh/id_rsa.pub
-	4. On the client:
-	    cd
-	    mkdir .ssh
-	    chmod 0700 .ssh
-	    scp {serverhostname}:.ssh/id_rsa.pub .
-	    cat id_rsa.pub >> .ssh/authorized_keys2
+One may toggle between normal and reverse sorting order by pressing the
+"r" key.
 
-For Windows, folks on the vim mailing list have mentioned that Pageant helps
-with avoiding the constant need to enter the password.
+Related topics:              |g:netrw-s|
+Associated setting variable: |g:netrw_sort_direction|
 
 
-NETRW SETTINGS						*netrw-settings*
+SELECTING SORTING STYLE			*netrw-s* *netrw-sort* {{{2
 
-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.
+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.
 
-(also see: |netrw-browse-var| |netrw-protocol| |netrw-var| |netrw-variables|)
+Related topics:               |g:netrw-r| |g:netrw-S|
+Associated setting variables: |g:netrw_sort_by| |g:netrw_sort_sequence|
 
 
-==============================================================================
-10. Problems and Fixes						*netrw-problems*
+10. Problems and Fixes					*netrw-problems* {{{1
 
 	(This section is likely to grow as I get feedback)
 	(also see |netrw-debug|)
@@ -1568,9 +2162,11 @@
 								*netrw-p4*
 	P4. I would like long listings to be the default.
 
-			let g:netrw_liststyle= 1
+		Put the following statement into your |.vimrc|: >
 
-		Check out |netrw-browse-var| for more customizations that
+			let g:netrw_liststyle= 1
+<
+		Check out |netrw-browser-var| for more customizations that
 		you can set.
 
 								*netrw-p5*
@@ -1579,15 +2175,18 @@
 		Does your system's strftime() accept the "%c" to yield dates
 		such as "Sun Apr 27 11:49:23 1997"?  If not, do a "man strftime"
 		and find out what option should be used.  Then put it into
-		your <.vimrc>:
-			let g:netrw_timefmt= "%X"  (where X is the option)
+		your |.vimrc|: >
 
+			let g:netrw_timefmt= "%X"  (where X is the option)
+<
 								*netrw-p6*
 	P6. I want my current directory to track my browsing.
 	    How do I do that?
 
+	    Put the following line in your |.vimrc|:
+>
 		let g:netrw_keepdir= 0
-	
+<	
 								*netrw-p7*
 	P7. I use Chinese (or other non-ascii) characters in my filenames, and
 	    netrw (Explore, Sexplore, Hexplore, etc) doesn't display them!
@@ -1652,9 +2251,9 @@
 			  {asterisk}.{asterisk} (all files), or whatever types
 			  you want (cec: change {asterisk} to * ; I had to
 			  write it that way because otherwise the helptags
-			  system thinks its a tag)
-			- Make sure its at the top of the listbox (click it,
-			  then click "Up" if its not)
+			  system thinks it's a tag)
+			- Make sure it's at the top of the listbox (click it,
+			  then click "Up" if it's not)
 		If using the Norton Commander style, you just have to hit <F4>
 		to edit a file in a local copy of gvim.
 
@@ -1663,16 +2262,24 @@
   http://www.tartarus.org/~simon/puttydoc/Chapter8.html#pubkey-gettingready
 			8.3 Getting ready for public key authentication
 <
-		How to use private key with 'pscp': >
+		How to use a private key with 'pscp': >
+
 			http://www.tartarus.org/~simon/puttydoc/Chapter5.html
 			5.2.4 Using public key authentication with PSCP 
 <
+		(Ben Schmidt) I find the ssh included with cwRsync is
+		brilliant, and install cwRsync or cwRsyncServer on most
+		Windows systems I come across these days. I guess COPSSH,
+		packed by the same person, is probably even better for use as
+		just ssh on Windows, and probably includes sftp, etc. which I
+		suspect the cwRsync doesn't, though it might
+
 		(cec) To make proper use of these suggestions above, you will
 		need to modify the following user-settable variables in your
 		.vimrc:
 
-			|g:netrw_ssh_cmd| |g:netrw_list_cmd|  |g:netrw_mkdir_cmd|
-			|g:netrw_rm_cmd|  |g:netrw_rmdir_cmd| |g:netrw_rmf_cmd|
+		|g:netrw_ssh_cmd| |g:netrw_list_cmd|  |g:netrw_mkdir_cmd|
+		|g:netrw_rm_cmd|  |g:netrw_rmdir_cmd| |g:netrw_rmf_cmd|
 
 		The first one (|g:netrw_ssh_cmd|) is the most important; most
 		of the others will use the string in g:netrw_ssh_cmd by
@@ -1688,52 +2295,77 @@
 		in your <.vimrc>: >
 			let g:netrw_use_noswf= 0
 <
+								*netrw-p10*
+	P10. I'm being pestered with "[something] is a directory" and
+	     "Press ENTER or type command to continue" prompts...
+
+		The "[something] is a directory" prompt is issued by Vim,
+		not by netrw, and there appears to be no way to work around
+		it.  Coupled with the default cmdheight of 1, this message
+		causes the "Press ENTER..." prompt.  So:  read |hit-enter|;
+		I also suggest that you set your |'cmdheight'| to 2 (or more) in
+		your <.vimrc> file.
+
+								*netrw-p11*
+	P11. I want to have two windows; a thin one on the left and my editing
+	     window on the right.  How can I do this?
+
+		* Put the following line in your <.vimrc>:
+			let g:netrw_altv = 1
+		* Edit the current directory:  :e .
+		* Select some file, press v
+		* Resize the windows as you wish (see |ctrl-w_<| and
+		  |ctrl-w_>|).  If you're using gvim, you can drag
+		  the separating bar with your mouse.
+		* When you want a new file, use  ctrl-w h  to go back to the
+		  netrw browser, select a file, then press P  (see |ctrl-w_h|
+		  and |netrw-P|).  If you're using gvim, you can press
+		  <leftmouse> in the browser window and then press the
+		  <middlemouse> to select the file.
 
 ==============================================================================
-11. Debugging						*netrw-debug*
+11. Debugging Netrw Itself				*netrw-debug* {{{1
 
 The <netrw.vim> script is typically available as:
 >
-	/usr/local/share/vim/vim6x/plugin/netrw.vim
+	/usr/local/share/vim/vim6x/plugin/netrwPlugin.vim
+	/usr/local/share/vim/vim6x/autoload/netrw.vim
 < -or- >
-	/usr/local/share/vim/vim7x/plugin/netrw.vim
+	/usr/local/share/vim/vim7x/plugin/netrwPlugin.vim
+	/usr/local/share/vim/vim7x/autoload/netrw.vim
 <
 which is loaded automatically at startup (assuming :set nocp).
 
 	1. Get the <Decho.vim> script, available as:
 
-	     http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_scripts
-	     as "Decho, a vimL debugging aid"
+	     http://mysite.verizon.net/astronaut/vim/index.html#DECHO
 	   or
 	     http://vim.sourceforge.net/scripts/script.php?script_id=120
 
-	   and put it into your local plugin directory.
-
-	2. <Decho.vim> itself needs the <cecutil.vim> script, so you'll need
-	   to put it into your .vim/plugin, too.  You may obtain it from:
+	  It now comes as a "vimball"; if you're using vim 7.0 or earlier,
+	  you'll need to update vimball, too.  See
+	     http://mysite.verizon.net/astronaut/vim/index.html#VIMBALL
 
-		http://mysite.verizon.net/astronaut/vim/index.html#VimFuncs
-		as "DrC's Utilities"
-
-	3. Edit the <netrw.vim> file by typing:
+	2. Edit the <netrw.vim> file by typing: >
 
 		vim netrw.vim
 		:DechoOn
 		:wq
-
-	   To restore to normal non-debugging behavior, edit <netrw.vim>
-	   by typing
+<
+	   To restore to normal non-debugging behavior, re-edit <netrw.vim>
+	   and type >
 
 		vim netrw.vim
 		:DechoOff
 		:wq
-
+<
 	   This command, provided by <Decho.vim>, will comment out all
 	   Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()).
 
-	4. Then bring up vim and attempt a transfer or do browsing.  A set of
-	   messages should appear concerning the steps that <netrw.vim> took
-	   in attempting to read/write your file over the network.
+	3. Then bring up vim and attempt to evoke the problem by doing a
+	   transfer or doing some browsing.  A set of messages should appear
+	   concerning the steps that <netrw.vim> took in attempting to
+	   read/write your file over the network in a separate tab.
 
 	   To save the file, use >
 		:wincmd j
@@ -1745,15 +2377,218 @@
 ==============================================================================
 12. History						*netrw-history* {{{1
 
+	v125: Apr 07, 2008 * (Cristian Rigamonti) CR provides a patch; he
+			     noted that gx was failing since its call to
+			     netrw#NetBrowseX() wasn't updated to
+			     netrw#NetrwBrowseX().
+			   * (Stanis Trendelenburg) ST provides a patch to
+			     supports davs: (dav + ssl)
+			   * (Rick Choi) noted that directory names comprised
+			     of three digits were not being displayed by
+			     the internal browser.  Fixed.
+			   * (Erik Falor) provided a patch to handle problems
+			     with changing directory and |'acd'| option.
+			   * (James Vega, Teemu Likonen) noted that netrw
+			     wasn't handling multi-byte filenames/directories
+			     correctly.  Fixed.
+			   * (Rick) found problem with g:netrw_maxfilenamelen
+			     being overridden.
+			   * (James Vega) pointed out that netrw was
+			     misidentifying all files in a symbolically linked
+			     directory as being symbolically linked
+			     themselves.  This particular problem was fixed;
+			     however, there are now situations where
+			     symbolically linked files will not be detected.
+			     Really need an internal vim function to do this
+			     identification.
+	      Apr 17, 2008 * When g:netrw_keepdir==0, current directory
+	                     doesn't necessarily equal b:netrw_curdir
+			     initially.  Problem is due to the patch directly
+			     above.
+			   * Fixed qf to handle case where b:netrw_curdir
+			     isn't the same as the current directory under
+			     linux/macosx.
+			   * New: |netrw-mg| (apply vimgrep to marked files)
+	      May 05, 2008 * (Rick) pointed out that a "setlocal ts=32" was
+			     interfering with g:netrw_maxfilenamelen
+	      May 05, 2008 * (James Vega) a file inside a linked directory
+			     was showing up as a symbolic link itself.
+	      May 22, 2008 * symbolic links, fifos, and sockets are now
+	                     indicated by a trailing @, |, or =, respectively.
+	      Jun 06, 2008 * Removed numerous bugs from the marked file
+			     move and copy.  Tested these changes under
+			     Unix only thus far.
+			   * :Rexplore returns to the screen position in the
+			     netrw listing from whence the file was edited
+	v124: Apr 02, 2008 * (Adrian Rollett) change the line supporting the
+			    "x" action for mac to use g:netrw_shq
+	v123: Feb 27, 2008 * Marked files now keeps a "global" marked file
+			     list.  The global marked file list is used to
+			     support tag processing and vimdiff'ing
+			     (|netrw-md| |netrw-mt|)
+			   * Been insuring that mm and mc works with various
+			     combinations of local and remote directories
+			   * (Stefan Bittner) http://.../ should always have
+			     filetype "html" -- fixed.
+			   * (Stefan Bittner) a "?" in a http://.../ request
+			     wasn't being handled correctly.  Fixed by
+			     removing ? from default |g:netrw_tmpfile_escape|.
+			   * (Nico Weber) % codes in http://.../ requests
+			     weren't being handled correctly.  Fixed by
+			     including % in default |g:netrw_fname_escape|.
+			   * (Stefan Bittner) attempts to update Buffers.Refresh
+			     were failing because locale use changed the menu
+			     names.  I implemented a workaround.
+	v122: Feb 12, 2008 * bugfix - first sorting sequence match now has
+			     priority
+	      Feb 14, 2008 * bugfix - sorting sequence was effectively ignoring
+			     sequencing priority of anything following '*'
+			   * toggling a marked file was showing incorrect list
+			     (list was correct, but displayed matches weren't)
+			   * |g:netrw_special_syntax| implemented
+	v121: Feb 11, 2008 * Bram M reported that :e file ... :e . would not
+			     retain the alternate file.  Fixed -- I hope!
+			   * bugfix -- apparently v120 broke an explicit
+			     :Explore dirname
+	v120: Jan 21, 2008 * |netrw-mt| changed to allow for target selection
+	                     based on whether or not word under cursor is a
+			     directory or file, or if cursor is in banner
+			     area.
+			   * |netrw-mh| included (hiding by marked-file suffix)
+			   * functions moved about a bit (improved
+			     categorization)
+			   * executable files now displayed with trailing (*)
+			   * symbolically linked files now displayed with
+			     trailing (@)
+			   * Somewhen, s:NetrwMarkFileMove() got damaged.  Its
+			     now restored (missing an endif, for example).
+			   * |netrw-mu| implemented (unmarking marked files)
+			   * many bugs have been removed from the marked file
+			     system (tnx to Mark S. for feedback)
+			   * |netrw-ms| implemented (sourcing marked files)
+			   * fixed use of P with tree listing style
+			   * multiple tree listing now supported
+			   * ./ suppressed
+			   * changed q -> qb (query bookmarks)
+			   * implemented |netrw-qf|
+			   * Explore now has four special list-generation
+			     modes: */filepat **/filepat
+			           *//pattern **//pattern
+			   * gh (|netrw-gh|) is a shortcut for toggling the
+			     hiding of files and directories beginning with a
+			     dot
+	v119: Jan 10, 2008 * When g:netrw_keepdir is false,
+			     NetrwOptionsRestore() had a problem
+			     (Bill McCarthy)
+	      Jan 11, 2008 * Netrw now shows symbolic links with a trailing
+	                     "@" and special highlighting.
+	      Jan 15, 2008 * Changed g:netrw_noretmap -> |g:netrw_retmap|.
+	                     Changed: disabled by default at Bram's
+			     preference.
+	v118: Jan 02, 2008 * Fixed a problem with Windows;
+			     :Explore c:/path/ would not work,
+			     but :Explore c:/path would.
+			   * Fixed a bug in s:NetrwOptionRestore() - lcd's
+			     argument wasn't being properly escaped so it
+			     wouldn't handle spaces in directory names.
+			     (Gary Johnson)
+	v117: Jan 02, 2008 * Fixed a problem with P; had to include
+			     a b:netrw_curdir bypass (Bram Moolenaar)
+	v116: Nov 27, 2007 * netrw#LocalBrowseCheck() has &ft=="netrw"
+			     check to prevent doing a directory listing
+			     (was getting unexpected directory refreshes
+			     in the middle of some function calls)
+			   * NetrwOptionRestore moved after e! filename
+			     in order to retain user options for editing
+			     in s:NetrwBrowseChgDir()
+	      Dec 12, 2007 * Bug fix -- netrw does a better job of retaining
+	                     user options when editing files under the aegis
+			     of the browser
+	v115: Oct 04, 2007 * Erik Remmelzwaal pointed out that the use of
+			     shellslash in s:GetTempfile() was incorrect
+	      Oct 11, 2007 * Tracked down and eliminated a bug with editing
+			     remote *.tar.gz and *.tar.bz2 files
+	      Oct 11, 2007 * g:netrw_localmovecmd wasn't being initialized
+			     properly, and g:netrw_localcopycmd was being
+			     overwritten.
+	      Oct 12, 2007 * Placed all :Rexplore and <2-leftmouse> setup
+			     in a new support function (s:SetRexDir()).
+	      Oct 15, 2007 * new: g:netrw_browse_split == 4; means <cr>
+			     based selection will use previous window
+	      Oct 20, 2007 * also checks on |'shellxquote'| to set g:netrw_shq
+	      Oct 24, 2007 * Explore handles path/**/filename
+	      Oct 27, 2007 * sourcing remote files often didn't work with ftp,
+	                     turns out that b:netrw_method was undefined, so
+			     s:SaveBufVars and s:RestoreBufVars() fixed it.
+	v114: Sep 28, 2007 * mT, the map that invokes tags, has been improved
+			     to support use of remote tags files.
+	      Oct 02, 2007 * changed Netrw menu to use more submenus
+	v113: Sep 07, 2007 * worked out why the cursor position wasn't being
+			     saved and restored as intended after doing such
+			     things as deleting and renaming files.
+	      Sep 11, 2007 * Fixed bug which effectively disabled <c-l> and
+			     <c-h> maps
+	      Sep 18, 2007 * there used to be one NetrwOptionRestore() call at
+			     the end of the s:NetrwBrowseChgDir() function;
+			     they're now at the end of every if..elseif..else
+			     block.  The edit-a-file one is not quite at the end
+			     of its block; instead, its just before the edit.
+			     Restores user options, then this new placement
+			     allows ftplugins, autocmds, etc to change settings
+			     (ex. ftplugin/cpp.vim sets cindent).
+	      Sep 19, 2007 * changed all strlen() calls to use s:Strlen(), a
+			     function which handles utf-8 wide characters
+			     correctly.
+	      Sep 20, 2007 * (Nico Weber) the "x" command has been extended
+			     to Mac's OS/X (macunix); it now uses open to
+			     handle |netrw-x| browsing with special files.
+	      Sep 22, 2007 * Added |g:netrw_noretmap| to netrw at Tony M's
+			     request.
+			   * Included path to NetrwRemoteRmFile()
+	v112: Aug 18, 2007 * added mx (|netrw-mx|) for executing arbitrary
+			     commands on marked files
+	      Aug 22, 2007 * more option save/restore work for
+			     s:NetrwBrowseChgDir(); s:NetrwOptionSave()
+			     and s:NetrwOptionRestore() now take a parameter
+			     specifying the type of variables to be used for
+			     saving and restoring (either "w:" or "s:")
+	      Sep 04, 2007 * added the :NetrwClean[!] command
+	v111: Jul 25, 2007 * using Windows but not using Cygwin, netrw does a
+			     "file bufname" where the bufname uses /s
+			     instead of \s; Vim "fixes" it by changing the
+			     bufname to use \s anyway.  This meant that
+			     NetrwGetBuffer() didn't find the appropriately
+			     named buffer, and so would generate a new
+			     buffer listing; hence the cursor would appear
+			     to have been moved when doing a preview.
+			   * added <2-leftmouse> map to return to netrw's
+			     browser display
+	      Aug 16, 2007 * added the mark-file system, including
+			     maps for mf mp mt mz and mu.  Modifications
+			     made to maps for a D O and R to support
+			     marked files.
+	v110: May 10, 2007 * added [ and ] maps to NetrwTreeListing
+	      May 25, 2007 * |g:netrw_preview| included
+	      May 29, 2007 * modifed netrw#NetBrowseX to consistently use
+			    |g:netrw_shq| instead of hardcoded quotes,
+			     and modified the snippet that sets up redir
+			     so Windows machines use "nul" instead of
+			     "/dev/null".
+	      Jun 01, 2007 * fixed bug -- NetGetBuffer() wasn't always
+			     recognizing a buffer name match when it should,
+			     thus resulting in [Scratch] buffers.
+	      Jun 04, 2007 * Gary Johnson found a bugfix for the "c" mapping
+			     when the directory is to be made current but
+			     the name contains spaces.
 	v109: Mar 26, 2007 * if a directory name includes a "$" character,
 			     Explore() will use expand() in an attempt to
 			     decipher the name.
 	      May 07, 2007 * g:netrw_use_errorwindow now allows one to
-	                     have error messages go to a reliable window
+			     have error messages go to a reliable window
 			     or to use a less reliable but recallable 
 			     echoerr method
 	      May 07, 2007 * g:netrw_scpport and g:netrw_sshport support
-	                     use of -P and -p, respectively, to set port
+			     use of -P and -p, respectively, to set port
 			     for scp/ssh.
 	v108: Jan 03, 2007 * included preview map (|netrw-p|), supporting
 			     remote browsing
@@ -1879,257 +2714,319 @@
 	v97: May 01, 2006  * exists("&acd") now used to determine if
 			     the 'acd' option exists
 			   * "obtain" now works again under Windows
-	v96: * bugfix - the |'acd'| option is not always defined but is
-	       now bypassed only when it is
-	v95: * bugfix - Hiding mode worked correctly (don't show any file
-	       matching any of the g:netrw_hide patterns), but
-	       showing mode was showing only those files that didn't
-	       match any of the g:netrw_hide patterns.  Instead, it now
-	       shows all files that match any of the g:netrw_hide patterns
-	       (the difference between a logical and and logical or).
-	v94: * bugfix - a Decho() had a missing quote; only affects things
-	       when debugging was enabled.
-	v93: * bugfix - removed FocusGained event from causing a slow-browser
-	       refresh for Windows
-	v92: * :Explore **//pattern implemented  (**/filepattern already taken)
-	v91: * :Explore */pattern implemented
-	     * |'acd'| option bypassed
-	v90: * mark ', as suggested by Yegappan Lakshmanan, used to help
-	       guarantee entry into the jump list when appropriate.
-	     * <s-down> and <s-up> are no longer defined until a
-	       :Explore **/pattern  is used (if the user already has a map
-	       for them).  They will be defined for new browser windows
-	       from that point forward.
-	v89: * A <s-down>, <s-up>, :Nexplore, or a :Pexplore without having
-	       first done an :Explore **/pattern (see |netrw-starstar|) caused
-	       a lot of unhelpful error messages to appear
-	v88: * moved DrChip.Netrw menu to Netrw.  Now has priority 80 by
-	       default.  g:NetrwTopLvlMenu == "Netrw" and can be changed
-	       by the user to suit.  The priority is g:NetrwMenuPriority.
-	     * Changed filetype for browser displays from netrwlist to netrw.
-	v87: * bug fix -- menus were partially disappearing
-	v85: * bug fix -- missing an endif
-	     * bug fix -- handles spaces in names and directories when using
-	       ftp-based browsing
-	v83: * disabled stop-acd handling; the change in directory handling
-	       may allow acd to be used again.  Awaiting feedback.
-	     * D was refusing to delete remote files/directories in wide
-	       listing mode.
-	v81: * FocusGained also used to refresh/wipe local browser directory
-	       buffers
-	     * (bugfix) netrw was leaving [Scratch] buffers behind when the
-	       user had the "hidden" option set.  The 'hidden' option is
-	       now bypassed.
-	v80: * ShellCmdPost event used in conjunction with g:netrw_fastbrowse
-	       to refresh/wipe local browser directory buffers.
-	v79: * directories are now displayed with nowrap
-	     * (bugfix) if the column width was smaller than the largest
-	       file's name, then netrw would hang when using wide-listing
-	       mode - fixed
-	     * g:netrw_fastbrowse introduced
-	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)
-	     * 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
-	     * O now obtains a file: remote browsing file -> local copy,
-	       locally browsing file -> current directory (see :pwd)
-	     * i now cycles between thin, long, and wide listing styles
-	     * NB and Nb are maps that are always available; corresponding
-	       B and b maps are only available when not using wide listing
-	       in order to allow them to be used for motions
-	v65: * Browser functions now use NetOptionSave/Restore; in particular,
-	       netrw now works around the report setting
-	v64: * Bugfix - browsing a "/" directory (Unix) yielded buffers 
-	       named "[Scratch]" instead of "/"
-	     * Bugfix - remote browsing with ftp was omitting the ./ and ../
-	v63: * netrw now takes advantage of autoload (and requires 7.0)
-	     * Bugfix - using r (to reverse sort) working again
-	v62: * Bugfix - spaces allowed again in directory names with
-	       g:netrw_keepdir=0.  In fact, I've tested netrw (again)
-	       with most ANSI punctuation marks for directory names.
-	     * Bugfix - NetrwSettings gave errors when g:netrw_silent
-	       had not be set.
-	v61: * document upgrade -- netrw variable-based settings all should
-	       have tags.  Supports NetrwSettings command.
-	     * several important variables are window-oriented.  Netrw has
-	       to transfer these across a window split.  See s:BufWinVars()
-	       and s:UseBufWinVars().
-	v60: * when using the i map to switch between long and short listings,
-	       netrw will now keep cursor on same line
-	     * "Match # of #" now uses status line
-	     * :Explore **/*.c  will now work from a non-netrw-browser window
-	     * :Explore **/patterns can now be run in separate browser windows
-	     * active banner (hit <cr> will cause various things to happen)
-	v59: * bugfix -- another keepalt work-around installed (for vim6.3)
-	     * "Match # of #" for Explore **/pattern matches
-	v58: * Explore and relatives can now handle **/somefilepattern (v7)
-	     * Nexplore and Pexplore introduced (v7).  shift-down and shift-up
-	       cursor keys will invoke Nexplore and Pexplore, respectively.
-	     * bug fixed with o and v
-	     * autochdir only worked around for vim when it has been
-	       compiled with either |+netbeans_intg| or |+sun_workshop|
-	     * Under Windows, all directories and files were being preceded
-	       with a "/" when local browsing.  Fixed.
-	     * When: syntax highlighting is off, laststatus=2, and remote
-	       browsing is used, sometimes the laststatus highlighting
-	       bleeds into the entire display.  Work around - do an extra
-	       redraw in that case.
-	     * Bugfix: when g:netrw_keepdir=0, due to re-use of buffers,
-	       netrw didn't change the directory when it should've
-	     * Bugfix: D and R commands work again
-	v57: * Explore and relatives can now handle RO files
-	     * reverse sort restored with vim7's sort command
-	     * g:netrw_keepdir now being used to keep the current directory
-	       unchanged as intended (sense change)
-	     * vim 6.3 still supported
-	v56: * LocalBrowse now saves autochdir setting, unsets it, and
-	       restores it before returning.
-	     * using vim's rename() instead of system + local_rename variable
-	     * avoids changing directory when g:netrw_keepdir is false
-	v55: * -bar used with :Explore :Sexplore etc to allow multiple
-	       commands to be separated by |s
-	     * browser listings now use the "nowrap" option
-	     * browser: some unuseful error messages now suppressed
-	v54: * For backwards compatibility, Explore and Sexplore have been
-	       implemented.  In addition, Hexplore and Vexplore commands
-	       are available, too.
-	     * <amatch> used instead of <afile> in the transparency
-	       support (BufReadCmd, FileReadCmd, FileWriteCmd)
-	     * ***netrw*** prepended to various error messages netrw may emit
-	     * g:netrw_port used instead of b:netrw_port for scp
-	     * any leading [:#] is removed from port numbers
-	v53: * backslashes as well as slashes placed in various patterns
-	       (ex. g:netrw_sort_sequence) to better support Windows
-	v52: * nonumber'ing now set for browsing buffers
-	     * when the hiding list hid all files, error messages ensued. Fixed
-	     * when browsing, swf is set, but directory is not set, when netrw
-	       was attempting to restore options, vim wanted to save a swapfile
-	       to a local directory using an url-style path.  Fixed
-	v51: * cygwin detection now automated (using windows and &shell is bash)
-	     * customizable browser "file" rejection patterns
-	     * directory history
-	     * :[range]w url  now supported (ie. netrw has a FileWriteCmd event)
-	     * error messages have a "Press <cr> to continue" to allow them
-	       to be seen
-	     * directory browser displays no longer bother the swapfile
-	     * u/U commands to go up and down the history stack
-	     * history stack may be saved with viminfo with its "!" option
-	     * bugfixes associated with unwanted [No Files] entries
-	v50: * directories now displayed using buftype=nofile; should keep the
-	       directory names as-is
-	     * attempts to remove empty "[No File]" buffers leftover
-	       from :file ..name.. commands
-	     * bugfix: a "caps-lock" editing difficulty left in v49 was fixed
-	     * syntax highlighting for "Showing:" the hiding list included
-	     * bookmarks can now be retained if "!" is in the viminfo option
-	v49: * will use ftp for http://.../ browsing v48:
-	     * One may use ftp to do remote host file browsing
-	     * (windows and !cygwin) remote browsing with ftp can now use
-	       the "dir" command internally to provide listings
-	     * g:netrw_keepdir now allows one to keep the initial current
-	       directory as the current directory (normally the local file
-	       browser makes the currently viewed directory the current
-	       directory)
-	     * g:netrw_alto and g:netrw_altv now support alternate placement
-	       of windows started with o or v
-	     * Nread ? and Nwrite ?  now uses echomsg (instead of echo) so
-	       :messages can repeat showing the help
-	     * bugfix: avoids problems with partial matches of directory names
-	       to prior buffers with longer names
-	     * one can suppress error messages with g:netrw_quiet ctrl-h used
-	     * instead of <Leader>h for editing hiding list one may edit the
-	     * sorting sequence with the S map now allows confirmation of
-	     * deletion with [y(es) n(o) a(ll) q(uit)] the "x" map now handles
-	     * 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.
-	     * directory bookmarking during both local and remote browsing
-	       implemented
-	     * one may view all, use the hiding list to suppress, or use the
-	       hiding list to show-only remote and local file/directory
-	       listings
-	     * improved unusual file and directory name handling preview
-	     * window support
-	v47: * now handles local directory browsing.
-	v46: * now handles remote directory browsing
-	     * g:netrw_silent (if 1) will cause all transfers to be silent
-	v45: * made the [user@]hostname:path form a bit more restrictive to
-	       better handle errors in using protocols (e.g. scp:usr@host:file
-	       was being recognized as an rcp request) v44: * changed from
-	       "rsync -a" to just "rsync"
-	     * somehow an editing error messed up the test to recognize
-	       use of the fetch method for NetRead.
-	     * more debugging statements included
-	v43: * moved "Explanation" comments to <pi_netrw.txt> help file as
-	       "Network Reference" (|netrw-ref|)
-	     * <netrw.vim> now uses Dfunc() Decho() and Dret() for debugging
-	     * removed superfluous NetRestorePosn() calls
-	v42: * now does BufReadPre and BufReadPost events on file:///* and
-	       file://localhost/* v41: * installed file:///* and
-	       file://localhost/* handling v40: * prevents redraw when a
-	       protocol error occurs so that the user may see it v39: * sftp
-	       support v38: * Now uses NetRestorePosn() calls with
-	       Nread/Nwrite commands
-	     * Temporary files now removed via bwipe! instead of bwipe
-	       (thanks to Dave Roberts) v37: * Claar's modifications which
-	       test if ftp is successful, otherwise give an error message
-	     * After a read, the alternate file was pointing to the temp file.
-	       The temp file buffer is now wiped out.
-	     * removed silent from transfer methods so user can see what's
-	       happening
+	v96:		   * bugfix - the |'acd'| option is not always defined
+			     but is now bypassed only when it is
+	v95:		   * bugfix - Hiding mode worked correctly (don't show
+			     any file matching any of the g:netrw_hide
+			     patterns), but showing mode was showing only those
+			     files that didn't match any of the g:netrw_hide
+			     patterns.  Instead, it now shows all files that
+			     match any of the g:netrw_hide patterns (the
+			     difference between a logical and and logical or).
+	v94:		   * bugfix - a Decho() had a missing quote; only
+			     affects things when debugging was enabled.
+	v93:		   * bugfix - removed FocusGained event from causing a
+			     slow-browser refresh for Windows
+	v92:		   * :Explore **//pattern implemented
+			      (**/filepattern was already taken)
+	v91:		   * :Explore */pattern implemented
+			   * |'acd'| option bypassed
+	v90:		   * mark ', as suggested by Yegappan Lakshmanan, used
+			     to help guarantee entry into the jump list when
+			     appropriate.
+			   * <s-down> and <s-up> are no longer defined until a
+			     :Explore **/pattern  is used (if the user already
+			     has a map for them).  They will be defined for new
+			     browser windows from that point forward.
+	v89:		   * A <s-down>, <s-up>, :Nexplore, or a :Pexplore
+			     without having first done an :Explore **/pattern
+			     (see |netrw-starstar|) caused
+			     a lot of unhelpful error messages to appear
+	v88:		   * moved DrChip.Netrw menu to Netrw.  Now has
+			     priority 80 by default.
+			     g:NetrwTopLvlMenu == "Netrw" and can be changed
+			     by the user to suit.  The priority is given by
+			     g:NetrwMenuPriority.
+			   * Changed filetype for browser displays from
+			     netrwlist to netrw.
+	v87:		   * bug fix -- menus were partially disappearing
+	v85:		   * bug fix -- missing an endif
+			   * bug fix -- handles spaces in names and directories
+			     when using ftp-based browsing
+	v83:		   * disabled stop-acd handling; the change in directory
+			     handling may allow acd to be used again.
+			   * D was refusing to delete remote files/directories
+			     in wide listing mode.
+	v81:		   * FocusGained also used to refresh/wipe local browser
+			     directory buffers
+			   * (bugfix) netrw was leaving [Scratch] buffers behind
+			     when the user had the "hidden" option set.  The
+			     'hidden' option is now bypassed.
+	v80:		   * ShellCmdPost event used in conjunction with
+			     g:netrw_fastbrowse to refresh/wipe local browser
+			     directory buffers.
+	v79:		   * directories are now displayed with nowrap
+			   * (bugfix) if the column width was smaller than the
+			     largest file's name, then netrw would hang when
+			     using wide-listing mode - fixed
+			   * g:netrw_fastbrowse introduced
+	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 cmd
+			   * 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 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)
+			   * 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 itself 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
+			   * O now obtains a file: remote browsing
+			     file -> local copy, locally browsing
+			     file -> current directory (see :pwd)
+			   * i now cycles between thin, long, and wide listing
+			     styles
+			   * NB and Nb are maps that are always available;
+			     corresponding B and b maps are only available when
+			     not using wide listing in order to allow them to
+			     be used for motions
+	v65:		   * Browser functions now use NetOptionSave/Restore; in
+			     particular, netrw now works around the report
+			     setting
+	v64:		   * Bugfix - browsing a "/" directory (Unix) yielded
+			     buffers named "[Scratch]" instead of "/"
+			   * Bugfix - remote browsing with ftp was omitting
+			     the ./ and ../
+	v63:		   * netrw now takes advantage of autoload (needs 7.0)
+			   * Bugfix - using r (to reverse sort) working again
+	v62:		   * Bugfix - spaces allowed again in directory names
+			     with g:netrw_keepdir=0.  In fact, I've tested netrw
+			     with most ANSI punctuation marks for directory
+			     names.
+			   * Bugfix - NetrwSettings gave errors when
+			     g:netrw_silent had not be set.
+	v61:		   * Document upgrade -- netrw variable-based settings
+			     all should have tags.  Supports NetrwSettings cmd.
+			   * Several important variables are window-oriented.
+			     Netrw has to transfer these across a window split.
+			     See s:BufWinVars() and s:UseBufWinVars().
+	v60:		   * When using the i map to switch between long and
+			     short listings, netrw will now keep cursor on same
+			     line
+			   * "Match # of #" now uses status line
+			   * :Explore **/*.c  will now work from a
+			     non-netrw-browser window
+			   * :Explore **/patterns can now be run in separate
+			     browser windows
+			   * active banner (hit <cr> will cause various things
+			     to happen)
+	v59:		   * bugfix -- another keepalt work-around installed
+			     (for vim6.3)
+			   * "Match # of #" for Explore **/pattern matches
+	v58:		   * Explore and relatives can now handle
+			     **/somefilepattern (v7)
+			   * Nexplore and Pexplore introduced (v7).  shift-down
+			     and shift-up cursor keys will invoke Nexplore and
+			     Pexplore, respectively.
+			   * bug fixed with o and v
+			   * autochdir only worked around for vim when it has
+			     been compiled with either
+			     |+netbeans_intg| or |+sun_workshop|
+			   * Under Windows, all directories and files were
+			     being preceded with a "/" when local browsing.
+			     Fixed.
+			   * When: syntax highlighting is off, laststatus=2, and
+			     remote browsing is used, sometimes the laststatus
+			     highlighting bleeds into the entire display.  Work
+			     around - do an extra redraw in that case.
+			   * Bugfix: when g:netrw_keepdir=0, due to re-use of
+			     buffers, netrw didn't change the directory when it
+			     should've
+			   * Bugfix: D and R commands work again
+	v57:		   * Explore and relatives can now handle RO files
+			   * reverse sort restored with vim7's sort command
+			   * g:netrw_keepdir now being used to keep the current
+			     directory unchanged as intended (sense change)
+			   * vim 6.3 still supported
+	v56:		   * LocalBrowse now saves autochdir setting, unsets it,
+			     and restores it before returning.
+			   * using vim's rename() instead of system +
+			     local_rename variable
+			   * avoids changing directory when g:netrw_keepdir is
+			     false
+	v55:		   * -bar used with :Explore :Sexplore etc to allow
+			     multiple commands to be separated by |s
+			   * browser listings now use the "nowrap" option
+			   * browser: some unuseful error messages now
+			     suppressed
+	v54:		   * For backwards compatibility, Explore and Sexplore
+			     have been implemented.  In addition, Hexplore and
+			     Vexplore commands are available, too.
+			   * <amatch> used instead of <afile> in the
+			     transparency support (BufReadCmd, FileReadCmd,
+			     FileWriteCmd)
+			   * ***netrw*** prepended to various error messages
+			     netrw may emit
+			   * g:netrw_port used instead of b:netrw_port for scp
+			   * any leading [:#] is removed from port numbers
+	v53:		   * backslashes as well as slashes placed in various
+			     patterns (ex. g:netrw_sort_sequence) to better
+			     support Windows
+	v52:		   * nonumber'ing now set for browsing buffers
+			   * when the hiding list hid all files, error messages
+			     ensued. Fixed
+			   * when browsing, swf is set, but directory is not
+			     set, when netrw was attempting to restore options,
+			     vim wanted to save a swapfile to a local directory
+			     using an url-style path.  Fixed
+	v51:		   * cygwin detection now automated
+			     (using windows and &shell is bash)
+			   * customizable browser "file" rejection patterns
+			   * directory history
+			   * :[range]w url  now supported (ie. netrw uses a
+			     FileWriteCmd event)
+			   * error messages have a "Press <cr> to continue" to
+			     allow them to be seen
+			   * directory browser displays no longer bother the
+			     swapfile
+			   * u/U commands to go up and down the history stack
+			   * history stack may be saved with viminfo with it's
+			     "!" option
+			   * bugfixes associated with unwanted [No Files]
+			     entries
+	v50:		   * directories now displayed using buftype=nofile;
+			     should keep the directory names as-is
+			   * attempts to remove empty "[No File]" buffers
+			     leftover from :file ..name.. commands
+			   * bugfix: a "caps-lock" editing difficulty left in
+			     v49 was fixed
+			   * syntax highlighting for "Showing:" the hiding list
+			     included
+			   * bookmarks can now be retained if "!" is in the
+			     viminfo option
+	v49:		   * will use ftp for http://.../ browsing
+	v48:		   * One may use ftp to do remote host file browsing
+			   * (windows and !cygwin) remote browsing with ftp can
+			     now use the "dir" command internally to provide
+			     listings
+			   * g:netrw_keepdir now allows one to keep the initial
+			     current directory as the current directory
+			     (normally the local file browser makes the
+			     currently viewed directory the current directory)
+			   * g:netrw_alto and g:netrw_altv now support
+			     alternate placement of windows started with o or v
+			   * Nread ? and Nwrite ?  now uses echomsg (instead of
+			     echo) so :messages can repeat showing the help
+			   * bugfix: avoids problems with partial matches of
+			     directory names to prior buffers with longer names
+			   * one can suppress error messages with g:netrw_quiet
+			     ctrl-h used
+			   * instead of <Leader>h for editing hiding list one
+			     may edit the sorting sequence with the S map, which
+			     now allows confirmation of deletion with
+			     [y(es) n(o) a(ll) q(uit)]
+			   * the "x" map now handles 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.
+			   * directory bookmarking during both local and remote
+			     browsing implemented
+			   * one may view all, use the hiding list to suppress,
+			     or use the hiding list to show-only remote and
+			     local file/directory listings
+			   * improved unusual file and directory name handling
+			     preview window support
+	v47:		   * now handles local browsing.
+	v46:		   * now handles remote browsing
+			   * g:netrw_silent (if 1) will cause all transfers to
+			     be silent
+	v45:		   * made the [user@]hostname:path form a bit more
+			     restrictive to better handle errors in using
+			     protocols (e.g. scp:usr@host:file was being
+			     recognized as an rcp request)
+	v44:		   * changed from "rsync -a" to just "rsync"
+			   * somehow an editing error messed up the test to
+			     recognize use of the fetch method for NetRead.
+			   * more debugging statements included
+	v43:		   * moved "Explanation" comments to <pi_netrw.txt> help
+			     file as "Network Reference" (|netrw-ref|)
+			   * <netrw.vim> now uses Dfunc() Decho() and Dret() for
+			     debugging
+			   * removed superfluous NetRestorePosn() calls
+	v42:		   * now does BufReadPre and BufReadPost events on
+			     file:///* and file://localhost/*
+	v41:		   * installed file:///* and file://localhost/* handling
+	v40:		   * prevents redraw when a protocol error occurs so
+			     that the user may see it
+	v39:		   * sftp support
+	v38:		   * Now uses NetRestorePosn() calls with Nread/Nwrite
+			     commands
+			   * Temporary files now removed via bwipe! instead of
+			     bwipe (thanks to Dave Roberts)
+	v37:		   * Claar's modifications which test if ftp is
+			     successful, otherwise give an error message
+			   * After a read, the alternate file was pointing to
+			     the temp file.  The temp file buffer is now wiped
+			     out.
+			   * removed silent from transfer methods so user can
+			     see what's happening
 
 
 ==============================================================================
@@ -2157,4 +3054,5 @@
 	                           operation
 
 ==============================================================================
+Modelines: {{{1
  vim:tw=78:ts=8:ft=help:norl:fdm=marker
--- vim-7.1.314.orig/runtime/doc/pi_tar.txt
+++ vim-7.1.314/runtime/doc/pi_tar.txt
@@ -1,13 +1,13 @@
-*pi_tar.txt*	For Vim version 7.1.  Last change: 2006 Sep 29
+*pi_tar.txt*	For Vim version 7.1.  Last change: 2008 Jun 12
 
-       	       	       +====================+
-       	       	       | Tar File Interface |
-       	       	       +====================+
+		       +====================+
+		       | Tar File Interface |
+		       +====================+
 
 Author:  Charles E. Campbell, Jr.  <NdrOchip@ScampbellPfamily.AbizM>
 	  (remove NOSPAM from Campbell's email first)
-Copyright: The GPL (gnu public license) applies to	*tar-copyright*
-	   tarPlugin.vim, and pi_tar.txt.
+Copyright 2005-2008: The GPL (gnu public license) applies to	*tar-copyright*
+	   tar.vim, tarPlugin.vim, and pi_tar.txt.
 	   No warranty, express or implied.  Use At-Your-Own-Risk.
 
 ==============================================================================
@@ -36,32 +36,53 @@
    *g:tar_browseoptions*  "Ptf"   used to get a list of contents
    *g:tar_readoptions*    "OPxf"  used to extract a file from a tarball
    *g:tar_cmd*            "tar"   the name of the tar program
+   *g:tar_nomax*            0     if true, file window will not be maximized
+   *g:tar_secure*         undef   if exists:
+					"--" will be used to prevent unwanted
+					option expansion in tar commands.
+					Please be sure that your tar command
+					accepts "--"; Posix compliant tar
+					utilities do accept it.
+				  if not exists:
+					The tar plugin will reject any member
+					files that begin with "-"
+				  Not all tar's support the "--" which is why
+				  it isn't default.
    *g:tar_writeoptions*   "uf"    used to update/replace a file
 
 
 ==============================================================================
 4. History						*tar-history*
 
+   v16 Jun 06, 2008 * tarfile:: used instead of tarfile: when editing files
+		      inside tarballs.  Fixes a problem with tarballs called
+		      things like c:\abc.tar. (tnx to Bill McCarthy)
+   v14 May 09, 2008 * arno caught a security bug
+       May 28, 2008 * various security improvements.  Now requires patch 299
+		      which provides the fnameescape() function
+       May 30, 2008 * allows one to view *.gz and *.bz2 files that are in
+		    *.tar files.
+   v12 Sep 07, 2007 * &shq now used if not the empty string for g:tar_shq
    v10 May 02, 2006 * now using "redraw then echo" to show messages, instead
-                      of "echo and prompt user"
+		      of "echo and prompt user"
    v9 May 02, 2006 * improved detection of masquerading as tar file
    v8 May 02, 2006 * allows editing of files that merely masquerade as tar
-                     files
+		     files
    v7 Mar 22, 2006 * work on making tar plugin work across network
       Mar 27, 2006 * g:tar_cmd now available for users to change the name
-                     of the tar program to be used.  By default, of course,
-		     its "tar".
+		     of the tar program to be used.  By default, of course,
+		     it's "tar".
    v6 Dec 21, 2005 * writing to files not in directories caused problems -
-                     fixed (pointed out by Christian Robinson)
+		     fixed (pointed out by Christian Robinson)
    v5 Nov 22, 2005 * report option workaround installed
    v3 Sep 16, 2005 * handles writing files in an archive back to the
-                     archive
+		     archive
       Oct 18, 2005 * <amatch> used instead of <afile> in autocmds
       Oct 18, 2005 * handles writing to compressed archives
       Nov 03, 2005 * handles writing tarfiles across a network using
-                     netrw#NetWrite()
+		     netrw#NetWrite()
    v2              * converted to use Vim7's new autoload feature by
-                     Bram Moolenaar
+		     Bram Moolenaar
    v1 (original)   * Michael Toren (see http://michael.toren.net/code/)
 
 ==============================================================================
--- vim-7.1.314.orig/runtime/doc/pi_vimball.txt
+++ vim-7.1.314/runtime/doc/pi_vimball.txt
@@ -1,4 +1,4 @@
-*pi_vimball.txt*	For Vim version 7.1.  Last change: 2007 May 11
+*pi_vimball.txt*	For Vim version 7.1.  Last change: 2008 Jun 05
 
 			       ----------------
 			       Vimball Archiver
@@ -6,7 +6,7 @@
 
 Author:  Charles E. Campbell, Jr.  <NdrOchip@ScampbellPfamily.AbizM>
 	  (remove NOSPAM from Campbell's email first)
-Copyright: (c) 2004-2006 by Charles E. Campbell, Jr.	*Vimball-copyright*
+Copyright: (c) 2004-2008 by Charles E. Campbell, Jr.	*Vimball-copyright*
 	   The VIM LICENSE applies to Vimball.vim, and Vimball.txt
 	   (see |copyright|) except use "Vimball" instead of "Vim".
 	   No warranty, express or implied.
@@ -16,21 +16,51 @@
 1. Contents				*vba* *vimball* *vimball-contents*
 
 	1. Contents......................................: |vimball-contents|
-	2. Vimball Manual................................: |vimball-manual|
+	3. Vimball Manual................................: |vimball-manual|
 	   MkVimball.....................................: |:MkVimball|
 	   UseVimball....................................: |:UseVimball|
 	   RmVimball.....................................: |:RmVimball|
-	3. Vimball History...............................: |vimball-history|
+	4. Vimball History...............................: |vimball-history|
 
 
 ==============================================================================
-2. Vimball Manual					*vimball-manual*
+2. Vimball Introduction						*vimball-intro*
+
+	Vimball is intended to make life simpler for users of plugins.  All
+	a user needs to do with a vimball is: >
+		vim someplugin.vba
+		:so %
+		:q
+<	and the plugin and all its components will be installed into their
+	appropriate directories.  Note that one doesn't need to be in any
+	particular directory when one does this.  Plus, any help for the
+	plugin will also be automatically installed.
+
+	If a user has decided to use the AsNeeded plugin, vimball is smart
+	enough to put scripts nominally intended for .vim/plugin/ into
+	.vim/AsNeeded/ instead.
+
+	Removing a plugin that was installed with vimball is really easy: >
+		vim
+		:RmVimball someplugin
+<	This operation is not at all easy for zips and tarballs, for example.
+
+	Vimball examines the user's |'runtimepath'| to determine where to put
+	the scripts.  The first directory mentioned on the runtimepath is
+	usually used if possible.  Use >
+		:echo &rtp
+<	to see that directory.
+
+
+==============================================================================
+3. Vimball Manual					*vimball-manual*
 
 							*:MkVimball*
 		:[range]MkVimball[!] filename [path]
 
 	The range is composed of lines holding paths to files to be included
-	in your new vimball.  As an example: >
+	in your new vimball, omitting the portion of the paths that is
+	normally specified by the runtimepath (|'rtp'|).  As an example: >
 		plugin/something.vim
 		doc/something.txt
 <	using >
@@ -44,14 +74,34 @@
 	directory.  The vimball plugin normally uses the first |'runtimepath'|
 	directory that exists as a prefix; don't use absolute paths, unless
 	the user has specified such a path.
-							*g:vimball_home*
-	You may override the use of the |'runtimepath'| by specifying a
-	variable, g:vimball_home.
 
 	If you use the exclamation point (!), then MkVimball will create the
 	"filename.vba" file, overwriting it if it already exists.  This
 	behavior resembles that for |:w|.
 
+							*g:vimball_mkdir*
+	First, the |mkdir()| command is tried (not all systems support it).
+
+	If it doesn't exist, then g:vimball_mkdir doesn't exist, it is set to:
+	  |g:netrw_local_mkdir|, if it exists
+	   "mkdir", if it is executable
+	   "makedir", if it is executable
+	   Otherwise, it is undefined.
+	One may explicitly specify the directory making command using
+	g:vimball_mkdir.  This command is used to make directories that
+	are needed as indicated by the vimball.
+
+							*g:vimball_home*
+	You may override the use of the |'runtimepath'| by specifying a
+	variable, g:vimball_home.
+
+	Path Preprocessing				*g:vimball_path_escape*
+
+	Paths used in vimball are preprocessed by s:Path(); in addition,
+	certain characters are escaped (by prepending a backslash).  The
+	characters are in g:vimball_path_escape, and may be overridden by
+	the user in his/her .vimrc initialization script.
+
 							*vimball-extract*
 		vim filename.vba
 
@@ -88,8 +138,21 @@
 
 
 ==============================================================================
-3. Vimball History					*vimball-history* {{{1
+4. Vimball History					*vimball-history* {{{1
 
+	26 : May 27, 2008 * g:vimball_mkdir usage installed.  Makes the
+	                    $HOME/.vim (or $HOME\vimfiles) directory if
+			    necessary.
+	     May 30, 2008 * (tnx to Bill McCarthy) found and fixed a bug:
+			    vimball wasn't updating plugins to AsNeeded/
+			    when it should
+	25 : Mar 24, 2008 * changed vimball#Vimball() to recognize doc/*.??x
+			    files as help files, too.
+	     Apr 18, 2008 * RmVimball command is now protected by saving and
+	                    restoring settings -- in particular, acd was
+			    causing problems as reported by Zhang Shuhan
+	24 : Nov 15, 2007 * |g:vimball_path_escape| used by s:Path() to
+	                    prevent certain characters from causing trouble
 	22 : Mar 21, 2007 * uses setlocal instead of set during BufEnter
 	21 : Nov 27, 2006 * (tnx to Bill McCarthy) vimball had a header
 	                    handling problem and it now changes \s to /s
@@ -101,7 +164,7 @@
 			    will extract plugin/somefile to the AsNeeded/
 			    directory
 	17 : Jun 28, 2006 * changes all \s to /s internally for Windows
-	16 : Jun 15, 2006 * A. Mechelynck's idea to allow users to specify
+	16 : Jun 15, 2006 * A. Mechylynck's idea to allow users to specify
 			    installation root paths implemented for
 			    UseVimball, MkVimball, and RmVimball.
 			  * RmVimball implemented
@@ -115,7 +178,7 @@
 	10 : Apr 27, 2006 * moved all setting saving/restoration to a pair of
 			    functions.  Included some more settings in them
 			    which frequently cause trouble.
-	9  : Apr 26, 2006 * various changes to support Windows predilection
+	9  : Apr 26, 2006 * various changes to support Windows' predilection
 			    for backslashes and spaces in file and directory
 			    names.
 	7  : Apr 25, 2006 * bypasses foldenable
--- vim-7.1.314.orig/runtime/doc/pi_zip.txt
+++ vim-7.1.314/runtime/doc/pi_zip.txt
@@ -1,4 +1,4 @@
-*pi_zip.txt*	For Vim version 7.1.  Last change: 2007 May 11
+*pi_zip.txt*	For Vim version 7.1.  Last change: 2008 Jun 12
 
 				+====================+
 				| Zip File Interface |
@@ -6,7 +6,7 @@
 
 Author:  Charles E. Campbell, Jr.  <NdrOchip@ScampbellPfamily.AbizM>
 	  (remove NOSPAM from Campbell's email first)
-Copyright: Copyright (C) 2005,2006 Charles E Campbell, Jr *zip-copyright*
+Copyright: Copyright (C) 2005-2008 Charles E Campbell, Jr *zip-copyright*
            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,
@@ -33,7 +33,13 @@
    zip archives via the plugin.
 
    OPTIONS
-							*zip_shq*
+
+   							*g:zip_nomax*
+
+   If this variable exists and is true, the file window will not be
+   automatically maximized when opened.
+
+							*g:zip_shq*
    Different operating systems may use one or more shells to execute
    commands.  Zip will try to guess the correct quoting mechanism to
    allow spaces and whatnot in filenames; however, if it is incorrectly
@@ -45,12 +51,12 @@
 
    							*g:zip_unzipcmd*
    Use this option to specify the program which does the duty of "unzip".
-   Its used during browsing. By default: >
+   It's used during browsing. By default: >
    	let g:zip_unzipcmd= "unzip"
 <
 							*g:zip_zipcmd*
    Use this option to specify the program which does the duty of "zip".
-   Its used during the writing (updating) of a file already in a zip
+   It's used during the writing (updating) of a file already in a zip
    file; by default: >
    	let g:zip_zipcmd= "zip"
 <
@@ -64,11 +70,13 @@
 
 	au BufReadCmd *.jar,*.xpi call zip#Browse(expand("<amatch>"))
 <
-   One can simply extend this line to accommodate additional extensions that
-   are actually zip files.
+   One simply can extend this line to accomodate additional extensions that
+   should be treated as zip files.
 
 ==============================================================================
 4. History					*zip-history* {{{1
+   v17 May 09, 2008 * arno caught a security bug
+   v15 Sep 07, 2007 * &shq now used if not the empty string for g:zip_shq
    v14 May 07, 2007 * using b:zipfile instead of w:zipfile to avoid problem
                       when editing alternate file to bring up a zipfile
    v10 May 02, 2006 * now using "redraw then echo" to show messages, instead
--- vim-7.1.314.orig/runtime/doc/spell.txt
+++ vim-7.1.314/runtime/doc/spell.txt
@@ -1,4 +1,4 @@
-*spell.txt*	For Vim version 7.1.  Last change: 2007 May 07
+*spell.txt*	For Vim version 7.1.  Last change: 2007 Dec 07
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -619,7 +619,8 @@
 If the spell file for the language you are using is not available, you will
 get an error message.  But if the "spellfile.vim" plugin is active it will
 offer you to download the spell file.  Just follow the instructions, it will
-ask you where to write the file.
+ask you where to write the file (there must be a writable directory in
+'runtimepath' for this).
 
 The plugin has a default place where to look for spell files, on the Vim ftp
 server.  If you want to use another location or another protocol, set the
--- vim-7.1.314.orig/runtime/doc/tags
+++ vim-7.1.314/runtime/doc/tags
@@ -702,8 +702,10 @@
 'qe'	options.txt	/*'qe'*
 'quote	motion.txt	/*'quote*
 'quoteescape'	options.txt	/*'quoteescape'*
+'rdt'	options.txt	/*'rdt'*
 'readonly'	options.txt	/*'readonly'*
 'redraw'	vi_diff.txt	/*'redraw'*
+'redrawtime'	options.txt	/*'redrawtime'*
 'remap'	options.txt	/*'remap'*
 'report'	options.txt	/*'report'*
 'restorescreen'	options.txt	/*'restorescreen'*
@@ -1227,6 +1229,7 @@
 --servername	remote.txt	/*--servername*
 --socketid	starting.txt	/*--socketid*
 --version	starting.txt	/*--version*
+--windowid	starting.txt	/*--windowid*
 -A	starting.txt	/*-A*
 -C	starting.txt	/*-C*
 -D	starting.txt	/*-D*
@@ -1752,11 +1755,13 @@
 :Man	filetype.txt	/*:Man*
 :MkVimball	pi_vimball.txt	/*:MkVimball*
 :N	editing.txt	/*:N*
+:NetrwClean	pi_netrw.txt	/*:NetrwClean*
 :Nexplore	pi_netrw.txt	/*:Nexplore*
 :Next	editing.txt	/*:Next*
 :P	various.txt	/*:P*
 :Pexplore	pi_netrw.txt	/*:Pexplore*
 :Print	various.txt	/*:Print*
+:Rexplore	pi_netrw.txt	/*:Rexplore*
 :RmVimball	pi_vimball.txt	/*:RmVimball*
 :Sexplore	pi_netrw.txt	/*:Sexplore*
 :TOhtml	syntax.txt	/*:TOhtml*
@@ -2153,6 +2158,7 @@
 :highlight-link	syntax.txt	/*:highlight-link*
 :highlight-normal	syntax.txt	/*:highlight-normal*
 :highlight-verbose	syntax.txt	/*:highlight-verbose*
+:his	cmdline.txt	/*:his*
 :history	cmdline.txt	/*:history*
 :history-indexing	cmdline.txt	/*:history-indexing*
 :i	insert.txt	/*:i*
@@ -4079,8 +4085,13 @@
 E795	eval.txt	/*E795*
 E796	editing.txt	/*E796*
 E797	spell.txt	/*E797*
+E798	eval.txt	/*E798*
+E799	eval.txt	/*E799*
 E80	message.txt	/*E80*
 E800	arabic.txt	/*E800*
+E801	eval.txt	/*E801*
+E802	eval.txt	/*E802*
+E803	eval.txt	/*E803*
 E81	map.txt	/*E81*
 E82	message.txt	/*E82*
 E83	message.txt	/*E83*
@@ -4195,6 +4206,7 @@
 Normal-mode	intro.txt	/*Normal-mode*
 Nread	pi_netrw.txt	/*Nread*
 Nsource	pi_netrw.txt	/*Nsource*
+Number	eval.txt	/*Number*
 Nvi	intro.txt	/*Nvi*
 Nwrite	pi_netrw.txt	/*Nwrite*
 O	insert.txt	/*O*
@@ -4777,6 +4789,7 @@
 cindent()	eval.txt	/*cindent()*
 cinkeys-format	indent.txt	/*cinkeys-format*
 cinoptions-values	indent.txt	/*cinoptions-values*
+clearmatches()	eval.txt	/*clearmatches()*
 client-server	remote.txt	/*client-server*
 clientserver	remote.txt	/*clientserver*
 clipboard	gui.txt	/*clipboard*
@@ -4983,6 +4996,7 @@
 dap	motion.txt	/*dap*
 das	motion.txt	/*das*
 dav	pi_netrw.txt	/*dav*
+davs	pi_netrw.txt	/*davs*
 daw	motion.txt	/*daw*
 dd	change.txt	/*dd*
 debug-gcc	debug.txt	/*debug-gcc*
@@ -5297,6 +5311,7 @@
 fname_in-variable	eval.txt	/*fname_in-variable*
 fname_new-variable	eval.txt	/*fname_new-variable*
 fname_out-variable	eval.txt	/*fname_out-variable*
+fnameescape()	eval.txt	/*fnameescape()*
 fnamemodify()	eval.txt	/*fnamemodify()*
 fo-table	change.txt	/*fo-table*
 fold-behavior	fold.txt	/*fold-behavior*
@@ -5384,6 +5399,7 @@
 ft-fortran-plugin	filetype.txt	/*ft-fortran-plugin*
 ft-fortran-syntax	syntax.txt	/*ft-fortran-syntax*
 ft-fvwm-syntax	syntax.txt	/*ft-fvwm-syntax*
+ft-gitcommit-plugin	filetype.txt	/*ft-gitcommit-plugin*
 ft-groff-syntax	syntax.txt	/*ft-groff-syntax*
 ft-gsp-syntax	syntax.txt	/*ft-gsp-syntax*
 ft-haskell-syntax	syntax.txt	/*ft-haskell-syntax*
@@ -5536,11 +5552,15 @@
 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_cd_escape	pi_netrw.txt	/*g:netrw_cd_escape*
+g:netrw_compress	pi_netrw.txt	/*g:netrw_compress*
 g:netrw_cygwin	pi_netrw.txt	/*g:netrw_cygwin*
 g:netrw_dav_cmd	pi_netrw.txt	/*g:netrw_dav_cmd*
+g:netrw_decompress	pi_netrw.txt	/*g:netrw_decompress*
 g:netrw_extracmd	pi_netrw.txt	/*g:netrw_extracmd*
 g:netrw_fastbrowse	pi_netrw.txt	/*g:netrw_fastbrowse*
 g:netrw_fetch_cmd	pi_netrw.txt	/*g:netrw_fetch_cmd*
+g:netrw_fname_escape	pi_netrw.txt	/*g:netrw_fname_escape*
 g:netrw_ftp	pi_netrw.txt	/*g:netrw_ftp*
 g:netrw_ftp_browse_reject	pi_netrw.txt	/*g:netrw_ftp_browse_reject*
 g:netrw_ftp_cmd	pi_netrw.txt	/*g:netrw_ftp_cmd*
@@ -5548,6 +5568,7 @@
 g:netrw_ftp_sizelist_cmd	pi_netrw.txt	/*g:netrw_ftp_sizelist_cmd*
 g:netrw_ftp_timelist_cmd	pi_netrw.txt	/*g:netrw_ftp_timelist_cmd*
 g:netrw_ftpmode	pi_netrw.txt	/*g:netrw_ftpmode*
+g:netrw_glob_escape	pi_netrw.txt	/*g:netrw_glob_escape*
 g:netrw_hide	pi_netrw.txt	/*g:netrw_hide*
 g:netrw_http_cmd	pi_netrw.txt	/*g:netrw_http_cmd*
 g:netrw_ignorenetrc	pi_netrw.txt	/*g:netrw_ignorenetrc*
@@ -5557,12 +5578,15 @@
 g:netrw_liststyle	pi_netrw.txt	/*g:netrw_liststyle*
 g:netrw_local_mkdir	pi_netrw.txt	/*g:netrw_local_mkdir*
 g:netrw_local_rmdir	pi_netrw.txt	/*g:netrw_local_rmdir*
+g:netrw_localcopycmd	pi_netrw.txt	/*g:netrw_localcopycmd*
+g:netrw_localmovecmd	pi_netrw.txt	/*g:netrw_localmovecmd*
 g:netrw_maxfilenamelen	pi_netrw.txt	/*g:netrw_maxfilenamelen*
 g:netrw_menu	pi_netrw.txt	/*g:netrw_menu*
 g:netrw_mkdir_cmd	pi_netrw.txt	/*g:netrw_mkdir_cmd*
 g:netrw_nogx	pi_netrw.txt	/*g:netrw_nogx*
-g:netrw_passwd	pi_netrw.txt	/*g:netrw_passwd*
+g:netrw_preview	pi_netrw.txt	/*g:netrw_preview*
 g:netrw_rcp_cmd	pi_netrw.txt	/*g:netrw_rcp_cmd*
+g:netrw_retmap	pi_netrw.txt	/*g:netrw_retmap*
 g:netrw_rm_cmd	pi_netrw.txt	/*g:netrw_rm_cmd*
 g:netrw_rmdir_cmd	pi_netrw.txt	/*g:netrw_rmdir_cmd*
 g:netrw_rmf_cmd	pi_netrw.txt	/*g:netrw_rmf_cmd*
@@ -5571,25 +5595,34 @@
 g:netrw_scpport	pi_netrw.txt	/*g:netrw_scpport*
 g:netrw_sftp_cmd	pi_netrw.txt	/*g:netrw_sftp_cmd*
 g:netrw_shq	pi_netrw.txt	/*g:netrw_shq*
+g:netrw_silent	pi_netrw.txt	/*g:netrw_silent*
 g:netrw_sort_by	pi_netrw.txt	/*g:netrw_sort_by*
 g:netrw_sort_direction	pi_netrw.txt	/*g:netrw_sort_direction*
 g:netrw_sort_sequence	pi_netrw.txt	/*g:netrw_sort_sequence*
+g:netrw_special_syntax	pi_netrw.txt	/*g:netrw_special_syntax*
 g:netrw_ssh_browse_reject	pi_netrw.txt	/*g:netrw_ssh_browse_reject*
 g:netrw_ssh_cmd	pi_netrw.txt	/*g:netrw_ssh_cmd*
 g:netrw_sshport	pi_netrw.txt	/*g:netrw_sshport*
 g:netrw_timefmt	pi_netrw.txt	/*g:netrw_timefmt*
+g:netrw_tmpfile_escape	pi_netrw.txt	/*g:netrw_tmpfile_escape*
 g:netrw_uid	pi_netrw.txt	/*g:netrw_uid*
 g:netrw_use_errorwindow	pi_netrw.txt	/*g:netrw_use_errorwindow*
 g:netrw_use_noswf	pi_netrw.txt	/*g:netrw_use_noswf*
 g:netrw_use_nt_rcp	pi_netrw.txt	/*g:netrw_use_nt_rcp*
 g:netrw_win95ftp	pi_netrw.txt	/*g:netrw_win95ftp*
 g:netrw_winsize	pi_netrw.txt	/*g:netrw_winsize*
+g:netrw_xstrlen	pi_netrw.txt	/*g:netrw_xstrlen*
 g:tar_browseoptions	pi_tar.txt	/*g:tar_browseoptions*
 g:tar_cmd	pi_tar.txt	/*g:tar_cmd*
+g:tar_nomax	pi_tar.txt	/*g:tar_nomax*
 g:tar_readoptions	pi_tar.txt	/*g:tar_readoptions*
 g:tar_writeoptions	pi_tar.txt	/*g:tar_writeoptions*
 g:var	eval.txt	/*g:var*
 g:vimball_home	pi_vimball.txt	/*g:vimball_home*
+g:vimball_mkdir	pi_vimball.txt	/*g:vimball_mkdir*
+g:vimball_path_escape	pi_vimball.txt	/*g:vimball_path_escape*
+g:zip_nomax	pi_zip.txt	/*g:zip_nomax*
+g:zip_shq	pi_zip.txt	/*g:zip_shq*
 g:zip_unzipcmd	pi_zip.txt	/*g:zip_unzipcmd*
 g:zip_zipcmd	pi_zip.txt	/*g:zip_zipcmd*
 g;	motion.txt	/*g;*
@@ -5649,6 +5682,8 @@
 getlatestvimscripts-install	pi_getscript.txt	/*getlatestvimscripts-install*
 getline()	eval.txt	/*getline()*
 getloclist()	eval.txt	/*getloclist()*
+getmatches()	eval.txt	/*getmatches()*
+getpid()	eval.txt	/*getpid()*
 getpos()	eval.txt	/*getpos()*
 getqflist()	eval.txt	/*getqflist()*
 getreg()	eval.txt	/*getreg()*
@@ -5674,6 +5709,7 @@
 global-ime	mbyte.txt	/*global-ime*
 global-local	options.txt	/*global-local*
 global-variable	eval.txt	/*global-variable*
+global_markfilelist	pi_netrw.txt	/*global_markfilelist*
 globpath()	eval.txt	/*globpath()*
 glvs	pi_getscript.txt	/*glvs*
 glvs-alg	pi_getscript.txt	/*glvs-alg*
@@ -5752,6 +5788,7 @@
 gui-w32-printing	gui_w32.txt	/*gui-w32-printing*
 gui-w32-start	gui_w32.txt	/*gui-w32-start*
 gui-w32-various	gui_w32.txt	/*gui-w32-various*
+gui-w32-windowid	gui_w32.txt	/*gui-w32-windowid*
 gui-w32s	gui_w32.txt	/*gui-w32s*
 gui-win32-maximized	gui_w32.txt	/*gui-win32-maximized*
 gui-x11	gui_x11.txt	/*gui-x11*
@@ -5828,7 +5865,6 @@
 highlight-term	syntax.txt	/*highlight-term*
 highlightID()	eval.txt	/*highlightID()*
 highlight_exists()	eval.txt	/*highlight_exists()*
-his	cmdline.txt	/*his*
 hist-names	eval.txt	/*hist-names*
 histadd()	eval.txt	/*histadd()*
 histdel()	eval.txt	/*histdel()*
@@ -6191,6 +6227,7 @@
 local-options	options.txt	/*local-options*
 local-variable	eval.txt	/*local-variable*
 local-variables	eval.txt	/*local-variables*
+local_markfilelist	pi_netrw.txt	/*local_markfilelist*
 locale	mbyte.txt	/*locale*
 locale-name	mbyte.txt	/*locale-name*
 localtime()	eval.txt	/*localtime()*
@@ -6260,11 +6297,14 @@
 mapping	map.txt	/*mapping*
 mark	motion.txt	/*mark*
 mark-motions	motion.txt	/*mark-motions*
+markfilelist	pi_netrw.txt	/*markfilelist*
 masm.vim	syntax.txt	/*masm.vim*
 match()	eval.txt	/*match()*
 match-highlight	pattern.txt	/*match-highlight*
 match-parens	tips.txt	/*match-parens*
+matchadd()	eval.txt	/*matchadd()*
 matcharg()	eval.txt	/*matcharg()*
+matchdelete()	eval.txt	/*matchdelete()*
 matchend()	eval.txt	/*matchend()*
 matchit-install	usr_05.txt	/*matchit-install*
 matchlist()	eval.txt	/*matchlist()*
@@ -6408,17 +6448,20 @@
 netrw-bookmarks	pi_netrw.txt	/*netrw-bookmarks*
 netrw-browse	pi_netrw.txt	/*netrw-browse*
 netrw-browse-cmds	pi_netrw.txt	/*netrw-browse-cmds*
-netrw-browse-intro	pi_netrw.txt	/*netrw-browse-intro*
-netrw-browse-var	pi_netrw.txt	/*netrw-browse-var*
+netrw-browse-maps	pi_netrw.txt	/*netrw-browse-maps*
+netrw-browser	pi_netrw.txt	/*netrw-browser*
+netrw-browser-options	pi_netrw.txt	/*netrw-browser-options*
+netrw-browser-var	pi_netrw.txt	/*netrw-browser-var*
+netrw-browsing	pi_netrw.txt	/*netrw-browsing*
 netrw-c	pi_netrw.txt	/*netrw-c*
 netrw-cadaver	pi_netrw.txt	/*netrw-cadaver*
 netrw-chgup	pi_netrw.txt	/*netrw-chgup*
+netrw-clean	pi_netrw.txt	/*netrw-clean*
 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-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*
@@ -6437,23 +6480,40 @@
 netrw-fixup	pi_netrw.txt	/*netrw-fixup*
 netrw-ftp	pi_netrw.txt	/*netrw-ftp*
 netrw-gb	pi_netrw.txt	/*netrw-gb*
+netrw-gh	pi_netrw.txt	/*netrw-gh*
 netrw-gx	pi_netrw.txt	/*netrw-gx*
 netrw-handler	pi_netrw.txt	/*netrw-handler*
 netrw-help	pi_netrw.txt	/*netrw-help*
 netrw-hexplore	pi_netrw.txt	/*netrw-hexplore*
+netrw-hide	pi_netrw.txt	/*netrw-hide*
 netrw-hiding	pi_netrw.txt	/*netrw-hiding*
 netrw-history	pi_netrw.txt	/*netrw-history*
 netrw-horiz	pi_netrw.txt	/*netrw-horiz*
 netrw-i	pi_netrw.txt	/*netrw-i*
 netrw-incompatible	pi_netrw.txt	/*netrw-incompatible*
+netrw-intro-browse	pi_netrw.txt	/*netrw-intro-browse*
 netrw-list	pi_netrw.txt	/*netrw-list*
 netrw-listbookmark	pi_netrw.txt	/*netrw-listbookmark*
 netrw-listhack	pi_netrw.txt	/*netrw-listhack*
 netrw-login	pi_netrw.txt	/*netrw-login*
-netrw-maps	pi_netrw.txt	/*netrw-maps*
+netrw-mT	pi_netrw.txt	/*netrw-mT*
 netrw-mb	pi_netrw.txt	/*netrw-mb*
+netrw-mc	pi_netrw.txt	/*netrw-mc*
+netrw-md	pi_netrw.txt	/*netrw-md*
+netrw-me	pi_netrw.txt	/*netrw-me*
+netrw-mf	pi_netrw.txt	/*netrw-mf*
+netrw-mg	pi_netrw.txt	/*netrw-mg*
+netrw-mh	pi_netrw.txt	/*netrw-mh*
 netrw-ml_get	pi_netrw.txt	/*netrw-ml_get*
+netrw-mm	pi_netrw.txt	/*netrw-mm*
 netrw-move	pi_netrw.txt	/*netrw-move*
+netrw-mp	pi_netrw.txt	/*netrw-mp*
+netrw-mr	pi_netrw.txt	/*netrw-mr*
+netrw-ms	pi_netrw.txt	/*netrw-ms*
+netrw-mt	pi_netrw.txt	/*netrw-mt*
+netrw-mu	pi_netrw.txt	/*netrw-mu*
+netrw-mx	pi_netrw.txt	/*netrw-mx*
+netrw-mz	pi_netrw.txt	/*netrw-mz*
 netrw-netrc	pi_netrw.txt	/*netrw-netrc*
 netrw-nexplore	pi_netrw.txt	/*netrw-nexplore*
 netrw-nread	pi_netrw.txt	/*netrw-nread*
@@ -6462,6 +6522,8 @@
 netrw-options	pi_netrw.txt	/*netrw-options*
 netrw-p	pi_netrw.txt	/*netrw-p*
 netrw-p1	pi_netrw.txt	/*netrw-p1*
+netrw-p10	pi_netrw.txt	/*netrw-p10*
+netrw-p11	pi_netrw.txt	/*netrw-p11*
 netrw-p2	pi_netrw.txt	/*netrw-p2*
 netrw-p3	pi_netrw.txt	/*netrw-p3*
 netrw-p4	pi_netrw.txt	/*netrw-p4*
@@ -6481,18 +6543,27 @@
 netrw-pscp	pi_netrw.txt	/*netrw-pscp*
 netrw-psftp	pi_netrw.txt	/*netrw-psftp*
 netrw-putty	pi_netrw.txt	/*netrw-putty*
-netrw-q	pi_netrw.txt	/*netrw-q*
+netrw-qb	pi_netrw.txt	/*netrw-qb*
+netrw-qf	pi_netrw.txt	/*netrw-qf*
+netrw-quickcom	pi_netrw.txt	/*netrw-quickcom*
+netrw-quickcoms	pi_netrw.txt	/*netrw-quickcoms*
+netrw-quickhelp	pi_netrw.txt	/*netrw-quickhelp*
+netrw-quickmap	pi_netrw.txt	/*netrw-quickmap*
+netrw-quickmaps	pi_netrw.txt	/*netrw-quickmaps*
 netrw-r	pi_netrw.txt	/*netrw-r*
 netrw-read	pi_netrw.txt	/*netrw-read*
 netrw-ref	pi_netrw.txt	/*netrw-ref*
 netrw-rename	pi_netrw.txt	/*netrw-rename*
 netrw-reverse	pi_netrw.txt	/*netrw-reverse*
+netrw-rexplore	pi_netrw.txt	/*netrw-rexplore*
 netrw-s	pi_netrw.txt	/*netrw-s*
 netrw-settings	pi_netrw.txt	/*netrw-settings*
 netrw-sexplore	pi_netrw.txt	/*netrw-sexplore*
 netrw-sort	pi_netrw.txt	/*netrw-sort*
 netrw-sortsequence	pi_netrw.txt	/*netrw-sortsequence*
 netrw-source	pi_netrw.txt	/*netrw-source*
+netrw-ssh-hack	pi_netrw.txt	/*netrw-ssh-hack*
+netrw-star	pi_netrw.txt	/*netrw-star*
 netrw-starpat	pi_netrw.txt	/*netrw-starpat*
 netrw-starstar	pi_netrw.txt	/*netrw-starstar*
 netrw-starstarpat	pi_netrw.txt	/*netrw-starstarpat*
@@ -6626,6 +6697,7 @@
 online-help	various.txt	/*online-help*
 opening-window	windows.txt	/*opening-window*
 operator	motion.txt	/*operator*
+operator-variable	eval.txt	/*operator-variable*
 option-backslash	options.txt	/*option-backslash*
 option-list	quickref.txt	/*option-list*
 option-summary	options.txt	/*option-summary*
@@ -6745,6 +6817,12 @@
 print-options	print.txt	/*print-options*
 print.txt	print.txt	/*print.txt*
 printf()	eval.txt	/*printf()*
+printf-X	eval.txt	/*printf-X*
+printf-c	eval.txt	/*printf-c*
+printf-d	eval.txt	/*printf-d*
+printf-o	eval.txt	/*printf-o*
+printf-s	eval.txt	/*printf-s*
+printf-x	eval.txt	/*printf-x*
 printing	print.txt	/*printing*
 printing-formfeed	print.txt	/*printing-formfeed*
 profile	repeat.txt	/*profile*
@@ -6943,6 +7021,7 @@
 s/\t	change.txt	/*s\/\\t*
 s/\u	change.txt	/*s\/\\u*
 s/\~	change.txt	/*s\/\\~*
+s:netrw_passwd	pi_netrw.txt	/*s:netrw_passwd*
 s:var	eval.txt	/*s:var*
 s<CR>	change.txt	/*s<CR>*
 sandbox	eval.txt	/*sandbox*
@@ -7000,6 +7079,7 @@
 setcmdpos()	eval.txt	/*setcmdpos()*
 setline()	eval.txt	/*setline()*
 setloclist()	eval.txt	/*setloclist()*
+setmatches()	eval.txt	/*setmatches()*
 setpos()	eval.txt	/*setpos()*
 setqflist()	eval.txt	/*setqflist()*
 setreg()	eval.txt	/*setreg()*
@@ -7244,6 +7324,7 @@
 synload-4	syntax.txt	/*synload-4*
 synload-5	syntax.txt	/*synload-5*
 synload-6	syntax.txt	/*synload-6*
+synstack()	eval.txt	/*synstack()*
 syntax	syntax.txt	/*syntax*
 syntax-highlighting	syntax.txt	/*syntax-highlighting*
 syntax-loading	syntax.txt	/*syntax-loading*
@@ -7668,6 +7749,7 @@
 v:mouse_col	eval.txt	/*v:mouse_col*
 v:mouse_lnum	eval.txt	/*v:mouse_lnum*
 v:mouse_win	eval.txt	/*v:mouse_win*
+v:operator	eval.txt	/*v:operator*
 v:prevcount	eval.txt	/*v:prevcount*
 v:profiling	eval.txt	/*v:profiling*
 v:progname	eval.txt	/*v:progname*
@@ -7843,6 +7925,7 @@
 vimball-contents	pi_vimball.txt	/*vimball-contents*
 vimball-extract	pi_vimball.txt	/*vimball-extract*
 vimball-history	pi_vimball.txt	/*vimball-history*
+vimball-intro	pi_vimball.txt	/*vimball-intro*
 vimball-manual	pi_vimball.txt	/*vimball-manual*
 vimdev	intro.txt	/*vimdev*
 vimdiff	diff.txt	/*vimdiff*
@@ -8074,7 +8157,6 @@
 zip-history	pi_zip.txt	/*zip-history*
 zip-manual	pi_zip.txt	/*zip-manual*
 zip-usage	pi_zip.txt	/*zip-usage*
-zip_shq	pi_zip.txt	/*zip_shq*
 zj	fold.txt	/*zj*
 zk	fold.txt	/*zk*
 zl	scroll.txt	/*zl*
--- vim-7.1.314.orig/runtime/filetype.vim
+++ vim-7.1.314/runtime/filetype.vim
@@ -17,7 +17,7 @@
 
 " Ignored extensions
 if exists("*fnameescape")
-au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.rpmsave,?\+.rpmnew
+au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.dpkg-{dist,old},?\+.rpmsave,?\+.rpmnew
 	\ exe "doau filetypedetect BufRead " . fnameescape(expand("<afile>:r"))
 au BufNewFile,BufRead *~
 	\ let s:name = expand("<afile>") |
@@ -25,7 +25,7 @@
 	\ if s:name != s:short && s:short != "" |
 	\   exe "doau filetypedetect BufRead " . fnameescape(s:short) |
 	\ endif |
-	\ unlet s:name s:short
+	\ unlet! s:name s:short
 au BufNewFile,BufRead ?\+.in
 	\ if expand("<afile>:t") != "configure.in" |
 	\   exe "doau filetypedetect BufRead " . fnameescape(expand("<afile>:r")) |
@@ -111,7 +111,7 @@
 
 " Apache config file
 au BufNewFile,BufRead .htaccess			 setf apache
-au BufNewFile,BufRead httpd.conf*,srm.conf*,access.conf*,apache.conf*,apache2.conf*,/etc/apache2/*.conf* call s:StarSetf('apache')
+au BufNewFile,BufRead httpd.conf*,srm.conf*,access.conf*,apache.conf*,apache2.conf*,/etc/apache2/*.conf*,/etc/apache2/conf.*/*,/etc/apache2/sites-*/*,/etc/apache2/mods-*/* call s:StarSetf('apache')
 
 " XA65 MOS6510 cross assembler
 au BufNewFile,BufRead *.a65			setf a65
@@ -181,7 +181,7 @@
     endif
   endif
 
-  exe "setf " . b:asmsyntax
+  exe "setf " . fnameescape(b:asmsyntax)
 endfunc
 
 func! s:FTasmsyntax()
@@ -189,8 +189,9 @@
   " b:asmsyntax appropriately
   let head = " ".getline(1)." ".getline(2)." ".getline(3)." ".getline(4).
 	\" ".getline(5)." "
-  if head =~ '\sasmsyntax=\S\+\s'
-    let b:asmsyntax = substitute(head, '.*\sasmsyntax=\([a-zA-Z0-9]\+\)\s.*','\1', "")
+  let match = matchstr(head, '\sasmsyntax=\zs[a-zA-Z0-9]\+\ze\s')
+  if match != ''
+    let b:asmsyntax = match
   elseif ((head =~? '\.title') || (head =~? '\.ident') || (head =~? '\.macro') || (head =~? '\.subtitle') || (head =~? '\.library'))
     let b:asmsyntax = "vmasm"
   endif
@@ -514,6 +515,11 @@
 " Debian Control
 au BufNewFile,BufRead */debian/control		setf debcontrol
 
+au BufNewFile,BufRead control
+	\  if getline(1) =~ '^Source:'
+	\|   setf debcontrol
+	\| endif
+
 " Debian Sources.list
 au BufNewFile,BufRead /etc/apt/sources.list	setf debsources
 
@@ -661,6 +667,19 @@
 " Gedcom
 au BufNewFile,BufRead *.ged			setf gedcom
 
+" Git
+autocmd BufNewFile,BufRead *.git/COMMIT_EDITMSG    setf gitcommit
+autocmd BufNewFile,BufRead *.git/config,.gitconfig setf gitconfig
+autocmd BufNewFile,BufRead git-rebase-todo         setf gitrebase
+autocmd BufNewFile,BufRead .msg.[0-9]*
+      \ if getline(1) =~ '^From.*# This line is ignored.$' |
+      \   setf gitsendemail |
+      \ endif
+autocmd BufNewFile,BufRead *.git/**
+      \ if getline(1) =~ '^\x\{40\}\>\|^ref: ' |
+      \   setf git |
+      \ endif
+
 " Gkrellmrc
 au BufNewFile,BufRead gkrellmrc,gkrellmrc_?	setf gkrellmrc
 
@@ -688,7 +707,7 @@
 au BufNewFile,BufRead *.gsp			setf gsp
 
 " Group file
-au BufNewFile,BufRead /etc/group		setf group
+au BufNewFile,BufRead /etc/group{-,.edit,},/etc/gshadow{-,.edit,},/var/backups/{group,gshadow}.bak setf group
 
 " GTK RC
 au BufNewFile,BufRead .gtkrc,gtkrc		setf gtkrc
@@ -956,6 +975,9 @@
 " Maple V
 au BufNewFile,BufRead *.mv,*.mpl,*.mws		setf maple
 
+" Map (UMN mapserver config file)
+au BufNewFile,BufRead *.map			setf map
+
 " Mason
 au BufNewFile,BufRead *.mason,*.mhtml		setf mason
 
@@ -1161,7 +1183,7 @@
 au BufNewFile,BufRead *.papp,*.pxml,*.pxsl	setf papp
 
 " Password file
-au BufNewFile,BufRead /etc/passwd,/etc/shadow,/etc/shadow- setf passwd
+au BufNewFile,BufRead /etc/passwd{-,.edit,},/etc/shadow{-,.edit,},/var/backups/{passwd,shadow}.bak setf passwd
 
 " Pascal (also *.p)
 au BufNewFile,BufRead *.pas			setf pascal
@@ -1267,7 +1289,7 @@
     else
       call s:FTasmsyntax()
       if exists("b:asmsyntax")
-	exe "setf " . b:asmsyntax
+	exe "setf " . fnameescape(b:asmsyntax)
       else
 	setf pov
       endif
@@ -1710,6 +1732,10 @@
 
 let s:ft_rules_udev_rules_pattern = '^\s*\cudev_rules\s*=\s*"\([^"]\{-1,}\)/*".*'
 func! s:FTRules()
+  if expand('<amatch>:p') =~ '^/etc/udev.d'
+    setf udevrules
+    return
+  endif
   try
     let config_lines = readfile('/etc/udev/udev.conf')
   catch /^Vim\%((\a\+)\)\=:E484/
@@ -1860,7 +1886,7 @@
     call cursor(1,1)
     let firstNC = search('^\s*[^[:space:]%]', 'c', 1000)
     if firstNC " Check the next thousand lines for a LaTeX or ConTeXt keyword.
-      let lpat = 'documentclass\>\|usepackage\>\|begin{\|newcommand\>\|renewcommand\>'
+      let lpat = 'documentclass\>\|usepackage\>\|begin{\|newcommand\>\|renewcommand\>\|part\>\|chapter\>\|section\>\|subsection\>\|subsubsection\>\|paragraph\>\|subparagraph\>\|subsubparagraph'
       let cpat = 'start\a\+\|setup\a\+\|usemodule\|enablemode\|enableregime\|setvariables\|useencoding\|usesymbols\|stelle\a\+\|verwende\a\+\|stel\a\+\|gebruik\a\+\|usa\a\+\|imposta\a\+\|regle\a\+\|utilisemodule\>'
       let kwline = search('^\s*\\\%(' . lpat . '\)\|^\s*\\\(' . cpat . '\)',
 			      \ 'cnp', firstNC + 1000)
@@ -2164,7 +2190,7 @@
 	\|endif
 
 " Crontab
-au BufNewFile,BufRead crontab,crontab.*		call s:StarSetf('crontab')
+au BufNewFile,BufRead crontab,crontab.*,/etc/cron.d/*	call s:StarSetf('crontab')
 
 " Debian Sources.list
 au BufNewFile,BufRead /etc/apt/sources.list.d/*	call s:StarSetf('debsources')
--- vim-7.1.314.orig/runtime/ftplugin/ada.vim
+++ vim-7.1.314/runtime/ftplugin/ada.vim
@@ -1,14 +1,15 @@
 "------------------------------------------------------------------------------
 "  Description: Perform Ada specific completion & tagging.
 "     Language: Ada (2005)
-"	   $Id: ada.vim,v 1.3 2007/05/05 17:17:45 vimboss Exp $
-"   Maintainer: Martin Krischik
+"	   $Id: ada.vim 774 2007-09-17 09:11:59Z krischik $
+"   Maintainer: Martin Krischik <krischik@users.sourceforge.net>
+"		Taylor Venable <taylor@metasyntax.net>
 "		Neil Bird <neil@fnxweb.com>
-"      $Author: vimboss $
-"	 $Date: 2007/05/05 17:17:45 $
-"      Version: 4.2
-"    $Revision: 1.3 $
-"     $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/ftplugin/ada.vim $
+"      $Author: krischik $
+"	 $Date: 2007-09-17 05:11:59 -0400 (Mon, 17 Sep 2007) $
+"      Version: 4.5
+"    $Revision: 774 $
+"     $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/tags/vim-ada-mode/4.3.9/vim/ftplugin/ada.vim $
 "      History: 24.05.2006 MK Unified Headers
 "		26.05.2006 MK ' should not be in iskeyword.
 "		16.07.2006 MK Ada-Mode as vim-ball
@@ -17,6 +18,7 @@
 "               05.11.2006 MK Bram suggested not to use include protection for
 "                             autoload
 "		05.11.2006 MK Bram suggested to save on spaces
+"		08.07.2007 TV fix default compiler problems.
 "    Help Page: ft-ada-plugin
 "------------------------------------------------------------------------------
 " Provides mapping overrides for tag jumping that figure out the current
@@ -30,7 +32,7 @@
 endif
 
 " Don't load another plugin for this buffer
-let b:did_ftplugin = 38
+let b:did_ftplugin = 45
 
 "
 " Temporarily set cpoptions to ensure the script loads OK
@@ -104,8 +106,17 @@
       \ s:notend . '\<record\>:\<end\>\s\+\<record\>'
 endif
 
+
 " Section: Compiler {{{1
 "
+if ! exists("g:ada_default_compiler")
+   if has("vms")
+      let g:ada_default_compiler = 'decada'
+   else
+      let g:ada_default_compiler = 'gnat'
+   endif
+endif
+
 if ! exists("current_compiler")			||
    \ current_compiler != g:ada_default_compiler
    execute "compiler " . g:ada_default_compiler
--- vim-7.1.314.orig/runtime/ftplugin/changelog.vim
+++ vim-7.1.314/runtime/ftplugin/changelog.vim
@@ -131,7 +131,7 @@
 
   " Regular expression used to find the end of a date entry
   if !exists('g:changelog_date_end_entry_search')
-    let g:changelog_date_entry_search = '^\s*$'
+    let g:changelog_date_end_entry_search = '^\s*$'
   endif
 
 
--- vim-7.1.314.orig/runtime/ftplugin/debchangelog.vim
+++ vim-7.1.314/runtime/ftplugin/debchangelog.vim
@@ -1,10 +1,14 @@
-" Vim filetype plugin file (GUI menu and folding)
+" Vim filetype plugin file (GUI menu, folding and completion)
 " Language:	Debian Changelog
-" Maintainer:	Michael Piefel <piefel@informatik.hu-berlin.de>
-"		Stefano Zacchiroli <zack@debian.org>
-" Last Change:	$LastChangedDate: 2006-08-24 23:41:26 +0200 (gio, 24 ago 2006) $
+" Maintainer:	Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
+" Former Maintainers:	Michael Piefel <piefel@informatik.hu-berlin.de>
+"			Stefano Zacchiroli <zack@debian.org>
+" Last Change:	2008-03-08
 " License:	GNU GPL, version 2.0 or later
-" URL:		http://svn.debian.org/wsvn/pkg-vim/trunk/runtime/ftplugin/debchangelog.vim?op=file&rev=0&sc=0
+" URL:		http://git.debian.org/?p=pkg-vim/vim.git;a=blob_plain;f=runtime/ftplugin/debchangelog.vim;hb=debian
+
+" Bug completion requires apt-listbugs installed for Debian packages or
+" python-launchpad-bugs installed for Ubuntu packages
 
 if exists("b:did_ftplugin")
   finish
@@ -12,9 +16,11 @@
 let b:did_ftplugin=1
 
 " {{{1 Local settings (do on every load)
-setlocal foldmethod=expr
-setlocal foldexpr=GetDebChangelogFold(v:lnum)
-setlocal foldtext=DebChangelogFoldText()
+if exists("g:debchangelog_fold_enable")
+  setlocal foldmethod=expr
+  setlocal foldexpr=DebGetChangelogFold(v:lnum)
+  setlocal foldtext=DebChangelogFoldText()
+endif
 
 " Debian changelogs are not supposed to have any other text width,
 " so the user cannot override this setting
@@ -107,14 +113,15 @@
     call append(2, "")
     call append(3, " -- ")
     call append(4, "")
-    call Distribution("unstable")
     call Urgency("low")
-    normal 1G
+    normal 1G0
     call search(")")
     normal h
     normal 
     call setline(1, substitute(getline(1), '-\$\$', '-', ''))
-    normal zo
+    if exists("g:debchangelog_fold_enable")
+        foldopen
+    endif
     call AddEntry()
 endfunction
 
@@ -240,6 +247,22 @@
   return '[unknown]'
 endfunction
 
+" Look for a package source name searching backward from the givenline and
+" returns it. Return the empty string if the package name can't be found
+function! DebGetPkgSrcName(lineno)
+  let lineidx = a:lineno
+  let pkgname = ''
+  while lineidx > 0
+    let curline = getline(lineidx)
+    if curline =~ '^\S'
+      let pkgname = matchlist(curline, '^\(\S\+\).*$')[1]
+      break
+    endif
+    let lineidx = lineidx - 1
+  endwhile
+  return pkgname
+endfunction
+
 function! DebChangelogFoldText()
   if v:folddashes == '-'  " changelog entry fold
     return foldtext() . ' -- ' . s:getAuthor(v:foldstart, v:foldend) . ' '
@@ -247,7 +270,7 @@
   return foldtext()
 endfunction
 
-function! GetDebChangelogFold(lnum)
+function! DebGetChangelogFold(lnum)
   let line = getline(a:lnum)
   if line =~ '^\w\+'
     return '>1' " beginning of a changelog entry
@@ -261,7 +284,90 @@
   return '='
 endfunction
 
-foldopen!   " unfold the entry the cursor is on (usually the first one)
+if exists("g:debchangelog_fold_enable")
+  silent! foldopen!   " unfold the entry the cursor is on (usually the first one)
+endif
+
+" }}}
+
+" {{{1 omnicompletion for Closes: #
+
+if !exists('g:debchangelog_listbugs_severities')
+  let g:debchangelog_listbugs_severities = 'critical,grave,serious,important,normal,minor,wishlist'
+endif
+
+fun! DebCompleteBugs(findstart, base)
+  if a:findstart
+    let line = getline('.')
+
+    " try to detect whether this is closes: or lp:
+    let g:debchangelog_complete_mode = 'debbugs'
+    let try_colidx = col('.') - 1
+    let colidx = -1 " default to no-completion-possible
+
+    while try_colidx > 0 && line[try_colidx - 1] =~ '\s\|\d\|#\|,\|:'
+      let try_colidx = try_colidx - 1
+      if line[try_colidx] == '#' && colidx == -1
+        " found hash, where we complete from:
+        let colidx = try_colidx
+      elseif line[try_colidx] == ':'
+        if try_colidx > 1 && strpart(line, try_colidx - 2, 3) =~ '\clp:'
+          let g:debchangelog_complete_mode = 'lp'
+        endif
+        break
+      endif
+    endwhile
+    return colidx
+  else " return matches:
+    let bug_lines = []
+    if g:debchangelog_complete_mode == 'lp'
+      if ! has('python')
+        echoerr 'vim must be built with Python support to use LP bug completion'
+        return
+      endif
+      let pkgsrc = DebGetPkgSrcName(line('.'))
+      python << EOF
+import vim
+try:
+    from launchpadbugs import connector
+    buglist = connector.ConnectBugList()
+    bl = list(buglist('https://bugs.launchpad.net/ubuntu/+source/%s' % vim.eval('pkgsrc')))
+    bl.sort(None, int)
+    liststr = '['
+    for bug in bl:
+        liststr += "'#%d - %s'," % (int(bug), bug.summary.replace('\'', '\'\''))
+    liststr += ']'
+    vim.command('silent let bug_lines = %s' % liststr)
+except ImportError:
+    vim.command('echoerr \'python-launchpad-bugs needs to be installed to use Launchpad bug completion\'')
+EOF
+    else
+      if ! filereadable('/usr/sbin/apt-listbugs')
+        echoerr 'apt-listbugs not found, you should install it to use Closes bug completion'
+        return
+      endif
+      let pkgsrc = DebGetPkgSrcName(line('.'))
+      let listbugs_output = system('/usr/sbin/apt-listbugs -s ' . g:debchangelog_listbugs_severities . ' list ' . pkgsrc . ' | grep "^ #" 2> /dev/null')
+      let bug_lines = split(listbugs_output, '\n')
+    endif
+    let completions = []
+    for line in bug_lines
+      let parts = matchlist(line, '^\s*\(#\S\+\)\s*-\s*\(.*\)$')
+      " filter only those which match a:base:
+      if parts[1] !~ "^" . a:base
+        continue
+      endif
+      let completion = {}
+      let completion['word'] = parts[1]
+      let completion['menu'] = parts[2]
+      let completion['info'] = parts[0]
+      let completions += [completion]
+    endfor
+    return completions
+  endif
+endfun
+
+setlocal omnifunc=DebCompleteBugs
 
 " }}}
 
--- vim-7.1.314.orig/runtime/ftplugin/ocaml.vim
+++ vim-7.1.314/runtime/ftplugin/ocaml.vim
@@ -68,14 +68,14 @@
   map <LocalLeader>S :call OCaml_switch(1)<CR>
   fun OCaml_switch(newwin)
     if (match(bufname(""), "\\.mli$") >= 0)
-      let fname = substitute(bufname(""), "\\.mli$", ".ml", "")
+      let fname = fnameescape(substitute(bufname(""), "\\.mli$", ".ml", ""))
       if (a:newwin == 1)
         exec "new " . fname
       else
         exec "arge " . fname
       endif
     elseif (match(bufname(""), "\\.ml$") >= 0)
-      let fname = bufname("") . "i"
+      let fname = fnameescape(bufname("") . "i")
       if (a:newwin == 1)
         exec "new " . fname
       else
--- vim-7.1.314.orig/runtime/ftplugin/perl.vim
+++ vim-7.1.314/runtime/ftplugin/perl.vim
@@ -39,6 +39,9 @@
 set isfname+=:
 "setlocal iskeyword=48-57,_,A-Z,a-z,:
 
+" Debian patch: use perldoc for keyword lookup
+setlocal keywordprg=perldoc\ -f
+
 " Set this once, globally.
 if !exists("perlpath")
     if executable("perl")
--- vim-7.1.314.orig/runtime/ftplugin/python.vim
+++ vim-7.1.314/runtime/ftplugin/python.vim
@@ -8,12 +8,15 @@
 
 setlocal cinkeys-=0#
 setlocal indentkeys-=0#
-setlocal include=\s*\\(from\\\|import\\)
+setlocal include=^\\s*\\(from\\\|import\\)
 setlocal includeexpr=substitute(v:fname,'\\.','/','g')
 setlocal suffixesadd=.py
 setlocal comments-=:%
 setlocal commentstring=#%s
 
+" Debian patch: use pydoc for keyword lookup
+setlocal keywordprg=pydoc
+
 setlocal omnifunc=pythoncomplete#Complete
 
 set wildignore+=*.pyc
--- vim-7.1.314.orig/runtime/ftplugin/verilog.vim
+++ vim-7.1.314/runtime/ftplugin/verilog.vim
@@ -12,6 +12,10 @@
 " Don't load another plugin for this buffer
 let b:did_ftplugin = 1
 
+" Set 'cpoptions' to allow line continuations
+let s:cpo_save = &cpo
+set cpo&vim
+
 " Undo the plugin effect
 let b:undo_ftplugin = "setlocal fo< com< tw<"
     \ . "| unlet! b:browsefilter b:match_ignorecase b:match_words"
@@ -28,8 +32,6 @@
   setlocal tw=78
 endif
 
-set cpo-=C
-
 " Win32 can filter files in the browse dialog
 if has("gui_win32") && !exists("b:browsefilter")
   let b:browsefilter = "Verilog Source Files (*.v)\t*.v\n" .
@@ -49,3 +51,6 @@
     \ '\<task\>:\<endtask\>,' .
     \ '\<specify\>:\<endspecify\>'
 endif
+
+" Reset 'cpoptions' back to the user's setting
+let &cpo = s:cpo_save
--- vim-7.1.314.orig/runtime/ftplugin/gitcommit.vim
+++ vim-7.1.314/runtime/ftplugin/gitcommit.vim
@@ -0,0 +1,68 @@
+" Vim filetype plugin
+" Language:	git config file
+" Maintainer:	Tim Pope <vimNOSPAM@tpope.info>
+" Last Change:	2008 Jun 04
+
+" Only do this when not done yet for this buffer
+if (exists("b:did_ftplugin"))
+  finish
+endif
+
+runtime! ftplugin/git.vim
+let b:did_ftplugin = 1
+
+if &textwidth == 0
+  " make sure that log messages play nice with git-log on standard terminals
+  setlocal textwidth=72
+  if !exists("b:undo_ftplugin")
+      let b:undo_ftplugin = ""
+  endif
+  let b:undo_ftplugin = b:undo_ftplugin . "|setl tw<"
+endif
+
+if exists("g:no_gitcommit_commands") || v:version < 700
+  finish
+endif
+
+if !exists("b:git_dir")
+    let b:git_dir = expand("%:p:h")
+endif
+
+" Automatically diffing can be done with:
+"   autocmd FileType gitcommit DiffGitCached | wincmd p
+command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>)
+
+function! s:diffcomplete(A,L,P)
+    let args = ""
+    if a:P <= match(a:L." -- "," -- ")+3
+        let args = args . "-p\n--stat\n--shortstat\n--summary\n--patch-with-stat\n--no-renames\n-B\n-M\n-C\n"
+    end
+    if exists("b:git_dir") && a:A !~ '^-'
+        let tree = fnamemodify(b:git_dir,':h')
+        if strpart(getcwd(),0,strlen(tree)) == tree
+            let args = args."\n".system("git diff --cached --name-only")
+        endif
+    endif
+    return args
+endfunction
+
+function! s:gitdiffcached(bang,gitdir,...)
+    let tree = fnamemodify(a:gitdir,':h')
+    let name = tempname()
+    let git = "git"
+    if strpart(getcwd(),0,strlen(tree)) != tree
+        let git .= " --git-dir=".(exists("*shellescape") ? shellescape(a:gitdir) : '"'.a:gitdir.'"')
+    endif
+    if a:0
+        let extra = join(map(copy(a:000),exists("*shellescape") ? 'shellescape(v:val)' : "'\"'.v:val.'\"'"))
+    else
+        let extra = "-p --stat=".&columns
+    endif
+    call system(git." diff --cached --no-color ".extra." > ".(exists("*shellescape") ? shellescape(name) : name))
+    exe "pedit ".(exists("*fnameescape") ? fnameescape(name) : name)
+    wincmd P
+    let b:git_dir = a:gitdir
+    command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>)
+    nnoremap <silent> q :q<CR>
+    setlocal buftype=nowrite nobuflisted noswapfile nomodifiable filetype=git
+endfunction
--- vim-7.1.314.orig/runtime/ftplugin/gitsendemail.vim
+++ vim-7.1.314/runtime/ftplugin/gitsendemail.vim
@@ -0,0 +1,6 @@
+" Vim filetype plugin
+" Language:	git send-email message
+" Maintainer:	Tim Pope <vimNOSPAM@tpope.info>
+" Last Change:	2007 Dec 16
+
+runtime! ftplugin/mail.vim
--- vim-7.1.314.orig/runtime/ftplugin/debcontrol.vim
+++ vim-7.1.314/runtime/ftplugin/debcontrol.vim
@@ -0,0 +1,70 @@
+" Vim filetype plugin file (GUI menu and folding)
+" Language:	Debian control files
+" Maintainer:	Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
+" Former Maintainer:	Pierre Habouzit <madcoder@debian.org>
+" Last Change:	2008-03-08
+" URL:		http://git.debian.org/?p=pkg-vim/vim.git;a=blob_plain;f=runtime/ftplugin/debcontrol.vim;hb=debian
+
+" Do these settings once per buffer
+if exists("b:did_ftplugin")
+  finish
+endif
+let b:did_ftplugin=1
+
+" {{{1 Local settings (do on every load)
+if exists("g:debcontrol_fold_enable")
+  setlocal foldmethod=expr
+  setlocal foldexpr=DebControlFold(v:lnum)
+  setlocal foldtext=DebControlFoldText()
+endif
+setlocal textwidth=0
+
+" Clean unloading
+let b:undo_ftplugin = "setlocal tw< foldmethod< foldexpr< foldtext<"
+
+" }}}1
+
+" {{{1 folding
+
+function! s:getField(f, lnum)
+  let line = getline(a:lnum)
+  let fwdsteps = 0
+  while line !~ '^'.a:f.':'
+    let fwdsteps += 1
+    let line = getline(a:lnum + fwdsteps)
+    if line == ''
+      return 'unknown'
+    endif
+  endwhile
+  return substitute(line, '^'.a:f.': *', '', '')
+endfunction
+
+function! DebControlFoldText()
+  if v:folddashes == '-'  " debcontrol entry fold
+    let type = substitute(getline(v:foldstart), ':.*', '', '')
+    if type == 'Source'
+      let ftext = substitute(foldtext(), ' *Source: *', ' ', '')
+      return ftext . ' -- ' . s:getField('Maintainer', v:foldstart) . ' '
+    endif
+    let arch  = s:getField('Architecture', v:foldstart)
+    let ftext = substitute(foldtext(), ' *Package: *', ' [' . arch . '] ', '')
+    return ftext . ': ' . s:getField('Description', v:foldstart) . ' '
+  endif
+  return foldtext()
+endfunction
+
+function! DebControlFold(l)
+
+  " This is for not merging blank lines around folds to them
+  if getline(a:l) =~ '^Source:'
+    return '>1'
+  endif
+
+  if getline(a:l) =~ '^Package:'
+    return '>1'
+  endif
+
+  return '='
+endfunction
+
+" }}}1
--- vim-7.1.314.orig/runtime/ftplugin/git.vim
+++ vim-7.1.314/runtime/ftplugin/git.vim
@@ -0,0 +1,34 @@
+" Vim filetype plugin
+" Language:	generic git output
+" Maintainer:	Tim Pope <vimNOSPAM@tpope.info>
+" Last Change:	2008 Feb 27
+
+" Only do this when not done yet for this buffer
+if (exists("b:did_ftplugin"))
+    finish
+endif
+let b:did_ftplugin = 1
+
+if !exists('b:git_dir')
+    if expand('%:p') =~# '\.git\>'
+        let b:git_dir = matchstr(expand('%:p'),'.*\.git\>')
+    elseif $GIT_DIR != ''
+        let b:git_dir = $GIT_DIR
+    endif
+    if has('win32') || has('win64')
+        let b:git_dir = substitute(b:git_dir,'\\','/','g')
+    endif
+endif
+
+if exists('*shellescape') && exists('b:git_dir') && b:git_dir != ''
+    if b:git_dir =~# '/\.git$' " Not a bare repository
+        let &l:path = escape(fnamemodify(b:git_dir,':t'),'\, ').','.&l:path
+    endif
+    let &l:path = escape(b:git_dir,'\, ').','.&l:path
+    let &l:keywordprg = 'git --git-dir='.shellescape(b:git_dir).' show'
+else
+    setlocal keywordprg=git\ show
+endif
+
+setlocal includeexpr=substitute(v:fname,'^[^/]\\+/','','')
+let b:undo_ftplugin = "setl keywordprg< path< includeexpr<"
--- vim-7.1.314.orig/runtime/ftplugin/gitrebase.vim
+++ vim-7.1.314/runtime/ftplugin/gitrebase.vim
@@ -0,0 +1,41 @@
+" Vim filetype plugin
+" Language:	git rebase --interactive
+" Maintainer:	Tim Pope <vimNOSPAM@tpope.info>
+" Last Change:	2008 Apr 16
+
+" Only do this when not done yet for this buffer
+if (exists("b:did_ftplugin"))
+    finish
+endif
+
+runtime! ftplugin/git.vim
+let b:did_ftplugin = 1
+
+setlocal comments=:# commentstring=#\ %s formatoptions-=t
+if !exists("b:undo_ftplugin")
+    let b:undo_ftplugin = ""
+endif
+let b:undo_ftplugin = b:undo_ftplugin."|setl com< cms< fo<"
+
+function! s:choose(word)
+    s/^\(\w\+\>\)\=\(\s*\)\ze\x\{4,40\}\>/\=(strlen(submatch(1)) == 1 ? a:word[0] : a:word) . substitute(submatch(2),'^$',' ','')/e
+endfunction
+
+function! s:cycle()
+    call s:choose(get({'s':'edit','p':'squash'},getline('.')[0],'pick'))
+endfunction
+
+command! -buffer -bar Pick   :call s:choose('pick')
+command! -buffer -bar Squash :call s:choose('squash')
+command! -buffer -bar Edit   :call s:choose('edit')
+command! -buffer -bar Cycle  :call s:cycle()
+" The above are more useful when they are mapped; for example:
+"nnoremap <buffer> <silent> S :Cycle<CR>
+
+if exists("g:no_plugin_maps") || exists("g:no_gitrebase_maps")
+    finish
+endif
+
+nnoremap <buffer> <expr> K col('.') < 7 && expand('<Lt>cword>') =~ '\X' && getline('.') =~ '^\w\+\s\+\x\+\>' ? 'wK' : 'K'
+
+let b:undo_ftplugin = b:undo_ftplugin . "|nunmap <buffer> K"
--- vim-7.1.314.orig/runtime/ftplugin/gitconfig.vim
+++ vim-7.1.314/runtime/ftplugin/gitconfig.vim
@@ -0,0 +1,15 @@
+" Vim filetype plugin
+" Language:	git config file
+" Maintainer:	Tim Pope <vimNOSPAM@tpope.info>
+" Last Change:	2007 Dec 16
+
+" Only do this when not done yet for this buffer
+if (exists("b:did_ftplugin"))
+  finish
+endif
+let b:did_ftplugin = 1
+
+setlocal formatoptions-=t formatoptions+=croql
+setlocal comments=:#,:; commentstring=;\ %s
+
+let b:undo_ftplugin = "setl fo< com< cms<"
--- vim-7.1.314.orig/runtime/indent/ada.vim
+++ vim-7.1.314/runtime/indent/ada.vim
@@ -1,19 +1,21 @@
 "------------------------------------------------------------------------------
 "  Description: Vim Ada indent file
 "     Language: Ada (2005)
-"	   $Id: ada.vim,v 1.4 2007/05/05 17:25:37 vimboss Exp $
+"	   $Id: ada.vim 774 2007-09-17 09:11:59Z krischik $
 "    Copyright: Copyright (C) 2006 Martin Krischik
-"   Maintainer: Martin Krischik
+"   Maintainer: Martin Krischik <krischik@users.sourceforge.net>
 "		Neil Bird <neil@fnxweb.com>
-"      $Author: vimboss $
-"	 $Date: 2007/05/05 17:25:37 $
-"      Version: 4.2
-"    $Revision: 1.4 $
-"     $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/indent/ada.vim $
+"		Ned Okie <nokie@radford.edu>
+"      $Author: krischik $
+"	 $Date: 2007-09-17 05:11:59 -0400 (Mon, 17 Sep 2007) $
+"      Version: 4.5
+"    $Revision: 774 $
+"     $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/tags/vim-ada-mode/4.3.9/vim/indent/ada.vim $
 "      History: 24.05.2006 MK Unified Headers
 "		16.07.2006 MK Ada-Mode as vim-ball
 "		15.10.2006 MK Bram's suggestion for runtime integration
 "		05.11.2006 MK Bram suggested to save on spaces
+"		19.09.2007 NO g: missing before ada#Comment
 "    Help Page: ft-vim-indent
 "------------------------------------------------------------------------------
 " ToDo:
@@ -27,7 +29,7 @@
    finish
 endif
 
-let b:did_indent = 1
+let b:did_indent = 45
 
 setlocal indentexpr=GetAdaIndent()
 setlocal indentkeys-=0{,0}
@@ -58,7 +60,7 @@
 " Seems to work OK as it 'starts' with the indent of the /previous/ line.
 function s:MainBlockIndent (prev_indent, prev_lnum, blockstart, stop_at)
    let lnum = a:prev_lnum
-   let line = substitute( getline(lnum), ada#Comment, '', '' )
+   let line = substitute( getline(lnum), g:ada#Comment, '', '' )
    while lnum > 1
       if a:stop_at != ''  &&  line =~ '^\s*' . a:stop_at  &&  indent(lnum) < a:prev_indent
 	 return a:prev_indent
@@ -72,7 +74,7 @@
       let lnum = prevnonblank(lnum - 1)
       " Get previous non-blank/non-comment-only line
       while 1
-	 let line = substitute( getline(lnum), ada#Comment, '', '' )
+	 let line = substitute( getline(lnum), g:ada#Comment, '', '' )
 	 if line !~ '^\s*$' && line !~ '^\s*#'
 	    break
 	 endif
@@ -116,7 +118,7 @@
       " Get previous non-blank/non-comment-only line
       while 1
 	 let line = getline(lnum)
-	 let line = substitute( line, ada#Comment, '', '' )
+	 let line = substitute( line, g:ada#Comment, '', '' )
 	 if line !~ '^\s*$'
 	    break
 	 endif
@@ -143,7 +145,8 @@
       let lnum = prevnonblank(lnum - 1)
       " Get previous non-blank/non-comment-only line
       while 1
-	 let line = substitute( getline(lnum), ada#Comment, '', '' )
+	 let line = substitute( getline(lnum), g:ada#Comment, '', '' )
+	 
 	 if line !~ '^\s*$' && line !~ '^\s*#'
 	    break
 	 endif
@@ -222,7 +225,7 @@
       exe lnum
       exe 'normal! $F)%'
       if getline('.') =~ '^\s*('
-	 " Dire layout - use previous indent (could check for ada#Comment here)
+	 " Dire layout - use previous indent (could check for g:ada#Comment here)
 	 let ind = indent( prevnonblank( line('.')-1 ) )
       else
 	 let ind = indent('.')
--- vim-7.1.314.orig/runtime/indent/perl.vim
+++ vim-7.1.314/runtime/indent/perl.vim
@@ -133,7 +133,7 @@
 	    \ || synid == "perlMatchStartEnd"
 	    \ || synid == "perlHereDoc"
 	    \ || synid =~ "^perlFiledescStatement"
-	    \ || synid =~ '^perl\(Sub\|BEGINEND\|If\)Fold'
+	    \ || synid =~ '^perl\(Sub\|BEGINEND\|Block\|If\)Fold'
 	let brace = strpart(line, bracepos, 1)
 	if brace == '(' || brace == '{'
 	  let ind = ind + &sw
@@ -148,7 +148,7 @@
       let synid = synIDattr(synID(v:lnum, bracepos, 0), "name")
       if synid == ""
 	    \ || synid == "perlMatchStartEnd"
-	    \ || synid =~ '^perl\(Sub\|BEGINEND\|If\)Fold'
+	    \ || synid =~ '^perl\(Sub\|BEGINEND\|Block\|If\)Fold'
 	let ind = ind - &sw
       endif
     endif
--- vim-7.1.314.orig/runtime/indent/ruby.vim
+++ vim-7.1.314/runtime/indent/ruby.vim
@@ -78,7 +78,7 @@
 " Expression used for searchpair() call for finding match for 'end' keyword.
 let s:end_skip_expr = s:skip_expr .
       \ ' || (expand("<cword>") == "do"' .
-      \ ' && getline(".") =~ "^\\s*\\<while\\|until\\|for\\>")'
+      \ ' && getline(".") =~ "^\\s*\\<\\(while\\|until\\|for\\)\\>")'
 
 " Regex that defines continuation lines, not including (, {, or [.
 let s:continuation_regex = '\%([\\*+/.,=:-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$'
--- vim-7.1.314.orig/runtime/indent/gitconfig.vim
+++ vim-7.1.314/runtime/indent/gitconfig.vim
@@ -0,0 +1,35 @@
+" Vim indent file
+" Language:	git config file
+" Maintainer:	Tim Pope <vimNOSPAM@tpope.info>
+" Last Change:	2007 Dec 16
+
+if exists("b:did_indent")
+  finish
+endif
+let b:did_indent = 1
+
+setlocal autoindent
+setlocal indentexpr=GetGitconfigIndent()
+setlocal indentkeys=o,O,*<Return>,0[,],0;,0#,=,!^F
+
+" Only define the function once.
+if exists("*GetGitconfigIndent")
+  finish
+endif
+
+function! GetGitconfigIndent()
+    let line  = getline(v:lnum-1)
+    let cline = getline(v:lnum)
+    if line =~ '[^\\]\@<=\%(\\\\\)*\\$'
+	" odd number of slashes, in a line continuation
+	return -1
+    elseif cline =~ '^\s*\['
+        return 0
+    elseif cline =~ '^\s*\a'
+        return &sw
+    elseif cline == ''       && line =~ '^\['
+        return &sw
+    else
+        return -1
+    endif
+endfunction
--- vim-7.1.314.orig/runtime/macros/editexisting.vim
+++ vim-7.1.314/runtime/macros/editexisting.vim
@@ -103,7 +103,7 @@
   if winnr > 0
     exe winnr . "wincmd w"
   else
-    exe "split " . escape(a:fname, ' #%"|')
+    exe "split " . fnameescape(a:fname)
   endif
 
   if a:command != ''
--- vim-7.1.314.orig/runtime/macros/justify.vim
+++ vim-7.1.314/runtime/macros/justify.vim
@@ -256,17 +256,18 @@
 	let str = substitute(str, '\s\+$', '', '')
 	let str = substitute(str, '^\s\+', '', '')
 	let str = substitute(str, '\s\+', ' ', 'g')
-	let str_n = strlen(str)
+	" Use substitute() hack to get strlen in characters instead of bytes
+	let str_n = strlen(substitute(str, '.', 'x', 'g'))
 
 	" Possible addition of space after punctuation
 	if exists("join_str")
 	    let str = substitute(str, join_str, '\1 ', 'g')
 	endif
-	let join_n = strlen(str) - str_n
+	let join_n = strlen(substitute(str, '.', 'x', 'g')) - str_n
 
 	" Can extraspaces be added?
 	" Note that str_n may be less than strlen(str) [joinspaces above]
-	if strlen(str) < tw - indent_n && str_n > 0
+	if strlen(substitute(str, '.', 'x', 'g')) < tw - indent_n && str_n > 0
 	    " How many spaces should be added
 	    let s_add = tw - str_n - indent_n - join_n
 	    let s_nr  = strlen(substitute(str, '\S', '', 'g') ) - join_n
--- vim-7.1.314.orig/runtime/menu.vim
+++ vim-7.1.314/runtime/menu.vim
@@ -2,7 +2,7 @@
 " You can also use this as a start for your own set of menus.
 "
 " Maintainer:	Bram Moolenaar <Bram@vim.org>
-" Last Change:	2007 Nov 19
+" Last Change:	2008 May 29
 
 " Note that ":an" (short for ":anoremenu") is often used to make a menu work
 " in all modes and avoid side effects from mappings defined by the user.
@@ -135,6 +135,11 @@
   exe "norm gg" . (&slm == "" ? "VG" : "gH\<C-O>G")
 endfunc
 
+func! s:FnameEscape(fname)
+  if exists('*fnameescape')
+    return fnameescape(a:fname)
+  return escape(a:fname, " \t\n*?[{`$\\%#'\"|!<")
+endfunc
 
 " Edit menu
 an 20.310 &Edit.&Undo<Tab>u			u
@@ -193,6 +198,7 @@
   else
     let fname = "$HOME/.vimrc"
   endif
+  let fname = s:FnameEscape(fname)
   if &mod
     exe "split " . fname
   else
@@ -806,7 +812,7 @@
       if @% == ""
 	20vsp .
       else
-	exe "20vsp " . expand("%:p:h")
+	exe "20vsp " . s:FnameEscape(expand("%:p:h"))
       endif
     endfun
   endif
@@ -1028,7 +1034,7 @@
 " Select a session to load; default to current session name if present
 fun! s:LoadVimSesn()
   if strlen(v:this_session) > 0
-    let name = escape(v:this_session, ' \t#%$|<>"*?[{`')
+    let name = s:FnameEscape(v:this_session)
   else
     let name = "Session.vim"
   endif
@@ -1040,7 +1046,7 @@
   if strlen(v:this_session) == 0
     let v:this_session = "Session.vim"
   endif
-  execute "browse mksession! " . escape(v:this_session, ' \t#%$|<>"*?[{`')
+  execute "browse mksession! " . s:FnameEscape(v:this_session)
 endfun
 
 endif
--- vim-7.1.314.orig/runtime/plugin/netrwPlugin.vim
+++ vim-7.1.314/runtime/plugin/netrwPlugin.vim
@@ -1,6 +1,6 @@
 " netrwPlugin.vim: Handles file transfer and remote directory listing across a network
 "            PLUGIN SECTION
-" Date:		Jan 05, 2007
+" Date:		Apr 07, 2008
 " Maintainer:	Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
 " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
 " Copyright:    Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
@@ -22,7 +22,7 @@
 if &cp || exists("g:loaded_netrwPlugin")
  finish
 endif
-let g:loaded_netrwPlugin = 1
+let g:loaded_netrwPlugin = "v125+Debian"
 let s:keepcpo            = &cpo
 if v:version < 700
  echohl WarningMsg | echo "***netrw*** you need vim version 7.0 for this version of netrw" | echohl None
@@ -47,28 +47,27 @@
 augroup Network
  au!
  if has("win32") || has("win95") || has("win64") || has("win16")
-  au BufReadCmd  file://*		exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
+  au BufReadCmd  file://*		exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://\(.*\)','\1',"")|exe "bwipe ".expand("<amatch>")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
  else
-  au BufReadCmd  file://*		exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
-  au BufReadCmd  file://localhost/*	exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://localhost/\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
+  au BufReadCmd  file://*		exe "silent doau BufReadPre ".fnameescape(netrw#RFC2396(expand("<amatch>")))|exe 'e '.fnameescape(substitute(netrw#RFC2396(expand("<amatch>")),'file://\(.*\)','\1',""))|exe "bwipe ".fnameescape(expand("<amatch>"))|exe "silent doau BufReadPost ".fnameescape(netrw#RFC2396(expand("<amatch>")))
+  au BufReadCmd  file://localhost/*	exe "silent doau BufReadPre ".fnameescape(netrw#RFC2396(expand("<amatch>")))|exe 'e '.fnameescape(substitute(netrw#RFC2396(expand("<amatch>")),'file://localhost/\(.*\)','\1',""))|exe "bwipe ".fnameescape(substitute(expand("<amatch>"),'file://\(\k\+@\)\=','',''))|exe "silent doau BufReadPost ".fnameescape(netrw#RFC2396(expand("<amatch>")))
  endif
- au BufReadCmd   ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://*	exe "silent doau BufReadPre ".expand("<amatch>")|exe '2Nread "'.expand("<amatch>").'"'|exe "silent doau BufReadPost ".expand("<amatch>")
- au FileReadCmd  ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://*	exe "silent doau FileReadPre ".expand("<amatch>")|exe 'Nread "'   .expand("<amatch>").'"'|exe "silent doau FileReadPost ".expand("<amatch>")
- au BufWriteCmd  ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://*		exe "silent doau BufWritePre ".expand("<amatch>")|exe 'Nwrite "' .expand("<amatch>").'"'|exe "silent doau BufWritePost ".expand("<amatch>")
- au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://*		exe "silent doau FileWritePre ".expand("<amatch>")|exe "'[,']".'Nwrite "' .expand("<amatch>").'"'|exe "silent doau FileWritePost ".expand("<amatch>")
+ au BufReadCmd   ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://*	exe "silent doau BufReadPre ".fnameescape(expand("<amatch>"))|exe '2Nread '.fnameescape(expand("<amatch>"))|exe "silent doau BufReadPost ".fnameescape(expand("<amatch>"))
+ au FileReadCmd  ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://*	exe "silent doau FileReadPre ".fnameescape(expand("<amatch>"))|exe 'Nread '.fnameescape(expand("<amatch>"))|exe "silent doau FileReadPost ".fnameescape(expand("<amatch>"))
+ au BufWriteCmd  ftp://*,rcp://*,scp://*,dav://*,davs://*,rsync://*,sftp://*		exe "silent doau BufWritePre ".fnameescape(expand("<amatch>"))|exe 'Nwrite '.fnameescape(expand("<amatch>"))|exe "silent doau BufWritePost ".fnameescape(expand("<amatch>"))
+ au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,davs://*,rsync://*,sftp://*		exe "silent doau FileWritePre ".fnameescape(expand("<amatch>"))|exe "'[,']".'Nwrite '.fnameescape(expand("<amatch>"))|exe "silent doau FileWritePost ".fnameescape(expand("<amatch>"))
  try
-  au SourceCmd    ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://*	exe 'Nsource "'.expand("<amatch>").'"'
+  au SourceCmd    ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://*	exe 'Nsource '.fnameescape(expand("<amatch>"))
  catch /^Vim\%((\a\+)\)\=:E216/
-  au SourcePre    ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://*	exe 'Nsource "'.expand("<amatch>").'"'
+  au SourcePre    ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://*	exe 'Nsource '.fnameescape(expand("<amatch>"))
  endtry
 augroup END
 
 " Commands: :Nread, :Nwrite, :NetUserPass {{{2
-com! -count=1 -nargs=*	Nread		call netrw#NetSavePosn()<bar>call netrw#NetRead(<count>,<f-args>)<bar>call netrw#NetRestorePosn()
-com! -range=% -nargs=*	Nwrite		call netrw#NetSavePosn()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call netrw#NetRestorePosn()
+com! -count=1 -nargs=*	Nread		call netrw#NetrwSavePosn()<bar>call netrw#NetRead(<count>,<f-args>)<bar>call netrw#NetrwRestorePosn()
+com! -range=% -nargs=*	Nwrite		call netrw#NetrwSavePosn()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call netrw#NetrwRestorePosn()
 com! -nargs=*		NetUserPass	call NetUserPass(<f-args>)
-com! -nargs=+           Ncopy           call netrw#NetObtain(<f-args>)
-com! -nargs=*	        Nsource		call netrw#NetSavePosn()<bar>call netrw#NetSource(<f-args>)<bar>call netrw#NetRestorePosn()
+com! -nargs=*	        Nsource		call netrw#NetrwSavePosn()<bar>call netrw#NetSource(<f-args>)<bar>call netrw#NetrwRestorePosn()
 
 " Commands: :Explore, :Sexplore, Hexplore, Vexplore {{{2
 com! -nargs=* -bar -bang -count=0 -complete=dir	Explore		call netrw#Explore(<count>,0,0+<bang>0,<q-args>)
@@ -80,14 +79,15 @@
 com! -nargs=* -bar -bang			Pexplore	call netrw#Explore(-2,0,0,<q-args>)
 
 " Commands: NetrwSettings {{{2
-com! -nargs=0 NetrwSettings :call netrwSettings#NetrwSettings()
+com! -nargs=0	NetrwSettings	call netrwSettings#NetrwSettings()
+com! -bang	NetrwClean	call netrw#NetrwClean(<bang>0)
 
 " Maps:
 if !exists("g:netrw_nogx") && maparg('g','n') == ""
  if !hasmapto('<Plug>NetrwBrowseX')
   nmap <unique> gx <Plug>NetrwBrowseX
  endif
- nno <silent> <Plug>NetrwBrowseX :call netrw#NetBrowseX(expand("<cWORD>"),0)<cr>
+ nno <silent> <Plug>NetrwBrowseX :call netrw#NetrwBrowseX(expand("<cWORD>"),0)<cr>
 endif
 
 " ---------------------------------------------------------------------
--- vim-7.1.314.orig/runtime/plugin/rrhelper.vim
+++ vim-7.1.314/runtime/plugin/rrhelper.vim
@@ -1,6 +1,6 @@
 " Vim plugin with helper function(s) for --remote-wait
 " Maintainer: Flemming Madsen <fma@cci.dk>
-" Last Change: 2004 May 30
+" Last Change: 2008 May 29
 
 " Has this already been loaded?
 if exists("loaded_rrhelper")
@@ -27,7 +27,12 @@
 
       " Path separators are always forward slashes for the autocommand pattern.
       " Escape special characters with a backslash.
-      let f = escape(substitute(argv(cnt), '\\', '/', "g"), ' *,?[{')
+      let f = substitute(argv(cnt), '\\', '/', "g")
+      if exists('*fnameescape')
+       let f = fnameescape(f)
+      else
+       let f = escape(f, " \t\n*?[{`$\\%#'\"|!<")
+      endif
       execute "augroup ".uniqueGroup
       execute "autocmd ".uniqueGroup." BufUnload ". f ."  call DoRemoteReply('".id."', '".cnt."', '".uniqueGroup."', '". f ."')"
       let cnt = cnt + 1
--- vim-7.1.314.orig/runtime/plugin/tarPlugin.vim
+++ vim-7.1.314/runtime/plugin/tarPlugin.vim
@@ -14,7 +14,7 @@
 if &cp || exists("g:loaded_tarPlugin")
  finish
 endif
-let g:loaded_tarPlugin = 1
+let g:loaded_tarPlugin = "v16"
 let s:keepcpo          = &cpo
 set cpo&vim
 
@@ -22,20 +22,21 @@
 "  Public Interface: {{{1
 augroup tar
   au!
-  au BufReadCmd   tarfile:*	call tar#Read(expand("<amatch>"), 1)
-  au FileReadCmd  tarfile:*	call tar#Read(expand("<amatch>"), 0)
-  au BufWriteCmd  tarfile:*	call tar#Write(expand("<amatch>"))
-  au FileWriteCmd tarfile:*	call tar#Write(expand("<amatch>"))
+  au BufReadCmd   tarfile::*	call tar#Read(expand("<amatch>"), 1)
+  au FileReadCmd  tarfile::*	call tar#Read(expand("<amatch>"), 0)
+  au BufWriteCmd  tarfile::*	call tar#Write(expand("<amatch>"))
+  au FileWriteCmd tarfile::*	call tar#Write(expand("<amatch>"))
 
   if has("unix")
-   au BufReadCmd   tarfile:*/*	call tar#Read(expand("<amatch>"), 1)
-   au FileReadCmd  tarfile:*/*	call tar#Read(expand("<amatch>"), 0)
-   au BufWriteCmd  tarfile:*/*	call tar#Write(expand("<amatch>"))
-   au FileWriteCmd tarfile:*/*	call tar#Write(expand("<amatch>"))
+   au BufReadCmd   tarfile::*/*	call tar#Read(expand("<amatch>"), 1)
+   au FileReadCmd  tarfile::*/*	call tar#Read(expand("<amatch>"), 0)
+   au BufWriteCmd  tarfile::*/*	call tar#Write(expand("<amatch>"))
+   au FileWriteCmd tarfile::*/*	call tar#Write(expand("<amatch>"))
   endif
 
-  au BufReadCmd   *.tar		call tar#Browse(expand("<amatch>"))
   au BufReadCmd   *.tar.gz	call tar#Browse(expand("<amatch>"))
+  au BufReadCmd   *.tar		call tar#Browse(expand("<amatch>"))
+  au BufReadCmd   *.lrp		call tar#Browse(expand("<amatch>"))
   au BufReadCmd   *.tar.bz2	call tar#Browse(expand("<amatch>"))
   au BufReadCmd   *.tar.Z	call tar#Browse(expand("<amatch>"))
   au BufReadCmd   *.tgz		call tar#Browse(expand("<amatch>"))
--- vim-7.1.314.orig/runtime/plugin/vimballPlugin.vim
+++ vim-7.1.314/runtime/plugin/vimballPlugin.vim
@@ -1,6 +1,6 @@
 " vimballPlugin : construct a file containing both paths and files
 " Author: Charles E. Campbell, Jr.
-" Copyright: (c) 2004-2006 by Charles E. Campbell, Jr.
+" Copyright: (c) 2004-2007 by Charles E. Campbell, Jr.
 "            The VIM LICENSE applies to Vimball.vim, and Vimball.txt
 "            (see |copyright|) except use "Vimball" instead of "Vim".
 "            No warranty, express or implied.
@@ -16,18 +16,18 @@
 if &cp || exists("g:loaded_vimballPlugin")
  finish
 endif
-let g:loaded_vimballPlugin = 1
+let g:loaded_vimballPlugin = "v27"
 let s:keepcpo              = &cpo
 set cpo&vim
 
 " ------------------------------------------------------------------------------
 " Public Interface: {{{1
-com! -ra   -complete=dir -na=+ -bang MkVimball call vimball#MkVimball(<line1>,<line2>,<bang>0,<f-args>)
-com! -na=? -complete=dir UseVimball  call vimball#Vimball(1,<f-args>)
-com! -na=0               VimballList call vimball#Vimball(0)
-com! -na=* -complete=dir RmVimball   call vimball#RmVimball(<f-args>)
+com! -ra   -complete=file -na=+ -bang MkVimball call vimball#MkVimball(<line1>,<line2>,<bang>0,<f-args>)
+com! -na=? -complete=dir  UseVimball  call vimball#Vimball(1,<f-args>)
+com! -na=0                VimballList call vimball#Vimball(0)
+com! -na=* -complete=dir  RmVimball   call vimball#SaveSettings()|call vimball#RmVimball(<f-args>)|call vimball#RestoreSettings()
 au BufEnter  *.vba.gz,*.vba.bz2,*.vba.zip call vimball#Decompress(expand("<amatch>"))
-au BufEnter  *.vba setlocal noma bt=nofile fmr=[[[,]]] fdm=marker|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)")
+au BufEnter  *.vba setlocal ff=unix noma bt=nofile fmr=[[[,]]] fdm=marker|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)")
 
 " =====================================================================
 " Restoration And Modelines: {{{1
--- vim-7.1.314.orig/runtime/plugin/zipPlugin.vim
+++ vim-7.1.314/runtime/plugin/zipPlugin.vim
@@ -1,6 +1,6 @@
 " zipPlugin.vim: Handles browsing zipfiles
 "            PLUGIN PORTION
-" Date:			Jul 18, 2006
+" Date:			Oct 05, 2007
 " Maintainer:	Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
 " License:		Vim License  (see vim's :help license)
 " Copyright:    Copyright (C) 2005,2006 Charles E. Campbell, Jr. {{{1
@@ -20,7 +20,7 @@
 if &cp || exists("g:loaded_zipPlugin")
  finish
 endif
-let g:loaded_zipPlugin = 1
+let g:loaded_zipPlugin = "v18"
 let s:keepcpo          = &cpo
 set cpo&vim
 
@@ -40,7 +40,7 @@
   au FileWriteCmd zipfile:*/*	call zip#Write(expand("<amatch>"))
  endif
 
- au BufReadCmd   *.zip		call zip#Browse(expand("<amatch>"))
+ au BufReadCmd   *.zip,*.jar,*.xpi,*.war,*.ear		call zip#Browse(expand("<amatch>"))
 augroup END
 
 " ---------------------------------------------------------------------
--- vim-7.1.314.orig/runtime/scripts.vim
+++ vim-7.1.314/runtime/scripts.vim
@@ -168,7 +168,7 @@
     set ft=zsh
 
   " ELM Mail files
-  elseif s:line1 =~ '^From [a-zA-Z][a-zA-Z_0-9\.=-]*\(@[^ ]*\)\= .*[12][09]\d\d$'
+  elseif s:line1 =~ '^From \([a-zA-Z][a-zA-Z_0-9\.=-]*\(@[^ ]*\)\=\|-\) .*[12][09]\d\d$'
     set ft=mail
 
     " Mason
@@ -271,7 +271,7 @@
     set ft=virata
 
     " Strace
-  elseif s:line1 =~ '^[0-9]* *execve('
+  elseif s:line1 =~ '^\(\[pid \d\+\] \)\=[0-9:.]* *execve(' || s:line1 =~ '^__libc_start_main'
     set ft=strace
 
     " VSE JCL
@@ -309,6 +309,18 @@
   elseif s:line1 =~ 'exec\s\+\S*scheme' || s:line2 =~ 'exec\s\+\S*scheme'
     set ft=scheme
 
+  " rst files
+  elseif s:line1 =~ '^\.\.\s\|^\s*restindex\s*$'
+	\ || s:line2 =~ '^\.\.\s\|^\s*restindex\s*$'
+	\ || s:line3 =~ '^\.\.\s\|^\s*restindex\s*$'
+	\ || s:line4 =~ '^\.\.\s\|^\s*restindex\s*$'
+	\ || s:line5 =~ '^\.\.\s\|^\s*restindex\s*$'
+    set ft=rst
+
+  " Git output
+  elseif s:line1 =~ '^\(commit\|tree\|object\) \x\{40\}$\|^tag \S\+$'
+    set ft=git
+
   " CVS diff
   else
     let lnum = 1
--- vim-7.1.314.orig/runtime/spell/cleanadd.vim
+++ vim-7.1.314/runtime/spell/cleanadd.vim
@@ -1,6 +1,6 @@
 " Vim script to clean the ll.xxxxx.add files of commented out entries
 " Author:	Antonio Colombo, Bram Moolenaar
-" Last Update:	2006 Jan 19
+" Last Update:	2008 Jun 3
 
 " Time in seconds after last time an ll.xxxxx.add file was updated
 " Default is one second.
@@ -14,12 +14,19 @@
 " Delete all comment lines, except the ones starting with ##.
 for s:fname in split(globpath(&rtp, "spell/*.add"), "\n")
   if filewritable(s:fname) && localtime() - getftime(s:fname) > g:spell_clean_limit
-    silent exe "tab split " . escape(s:fname, ' \')
-    echo "Processing" s:fname
+    if exists('*fnameescape')
+      let s:f = fnameescape(s:fname)
+    else
+      let s:f = escape(s:fname, ' \|<')
+    endif
+    silent exe "tab split " . s:f
+    echo "Processing" s:f
     silent! g/^#[^#]/d
     silent update
     close
+    unlet s:f
   endif
 endfor
+unlet s:fname
 
 echo "Done"
--- vim-7.1.314.orig/runtime/syntax/ada.vim
+++ vim-7.1.314/runtime/syntax/ada.vim
@@ -1,17 +1,17 @@
 "----------------------------------------------------------------------------
 "  Description: Vim Ada syntax file
 "     Language: Ada (2005)
-"	   $Id: ada.vim,v 1.2 2007/05/05 18:22:26 vimboss Exp $
+"	   $Id: ada.vim 774 2007-09-17 09:11:59Z krischik $
 "    Copyright: Copyright (C) 2006 Martin Krischik
 "   Maintainer: Martin Krischik
 "		David A. Wheeler <dwheeler@dwheeler.com>
 "		Simon Bradley <simon.bradley@pitechnology.com>
 " Contributors: Preben Randhol.
-"      $Author: vimboss $
-"	 $Date: 2007/05/05 18:22:26 $
-"      Version: 4.2
-"    $Revision: 1.2 $
-"     $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/syntax/ada.vim $
+"      $Author: krischik $
+"	 $Date: 2007-09-17 05:11:59 -0400 (Mon, 17 Sep 2007) $
+"      Version: 4.5
+"    $Revision: 774 $
+"     $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/tags/vim-ada-mode/4.3.9/vim/syntax/ada.vim $
 "		http://www.dwheeler.com/vim
 "      History: 24.05.2006 MK Unified Headers
 "		26.05.2006 MK ' should not be in iskeyword.
@@ -98,7 +98,8 @@
 "
 if exists("g:ada_rainbow_color")
     syntax match	adaSpecial	 "[:;.,]"
-    runtime plugin/Rainbow_Parenthsis.vim
+    call rainbow_parenthsis#LoadSyntax ()
+    call rainbow_parenthsis#Activate ()
 else
     syntax match	adaSpecial	 "[:;().,]"
 endif
@@ -159,7 +160,7 @@
 " Section: end {{{1
 " Unless special ("end loop", "end if", etc.), "end" marks the end of a
 " begin, package, task etc. Assiging it to adaEnd.
-syntax match    adaEnd	"\<end\>"
+syntax match    adaEnd	/\<end\>/
 
 syntax keyword  adaPreproc		 pragma
 
--- vim-7.1.314.orig/runtime/syntax/automake.vim
+++ vim-7.1.314/runtime/syntax/automake.vim
@@ -1,9 +1,15 @@
 " Vim syntax file
-" Language: automake Makefile.am
-" Maintainer: Felipe Contreras <felipe.contreras@gmail.com>
-" Former Maintainer: John Williams <jrw@pobox.com>
-" Last Change: $LastChangedDate: 2006-04-16 22:06:40 -0400 (dom, 16 apr 2006) $
-" URL: http://svn.debian.org/wsvn/pkg-vim/trunk/runtime/syntax/automake.vim?op=file&rev=0&sc=0
+" Language:	automake Makefile.am
+" Maintainer:   Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
+" Former Maintainer:	John Williams <jrw@pobox.com>
+" Last Change:	2007-10-14
+" URL: http://git.debian.org/?p=pkg-vim/vim.git;a=blob_plain;f=runtime/syntax/automake.vim;hb=debian
+"
+" XXX This file is in need of a new maintainer, Debian VIM Maintainers maintain
+"     it only because patches have been submitted for it by Debian users and the
+"     former maintainer was MIA (Missing In Action), taking over its
+"     maintenance was thus the only way to include those patches.
+"     If you care about this file, and have time to maintain it please do so!
 "
 " This script adds support for automake's Makefile.am format. It highlights
 " Makefile variables significant to automake as well as highlighting
@@ -19,18 +25,11 @@
   runtime! syntax/make.vim
 endif
 
-syn match automakePrimary "^[A-Za-z0-9_]\+_\(PROGRAMS\|LIBRARIES\|LISP\|PYTHON\|JAVA\|SCRIPTS\|DATA\|HEADERS\|MANS\|TEXINFOS\|LTLIBRARIES\)\s*="me=e-1
-
-syn match automakeSecondary "^[A-Za-z0-9_]\+_\(SOURCES\|AR\|LIBADD\|LDADD\|LDFLAGS\|DEPENDENCIES\|LINK\|SHORTNAME\)\s*="me=e-1
-syn match automakeSecondary "^[A-Za-z0-9_]\+_\(CCASFLAGS\|CFLAGS\|CPPFLAGS\|CXXFLAGS\|FFLAGS\|GCJFLAGS\|LFLAGS\|OBJCFLAGS\|RFLAGS\|YFLAGS\)\s*="me=e-1
-
-syn match automakeExtra "^EXTRA_DIST\s*="me=e-1
-syn match automakeExtra "^EXTRA_PROGRAMS\s*="me=e-1
-syn match automakeExtra "^EXTRA_[A-Za-z0-9_]\+_SOURCES\s*="me=e-1
-
-" TODO: Check these:
+syn match automakePrimary "^[A-Za-z0-9_]\+\(_PROGRAMS\|LIBRARIES\|_LIST\|_SCRIPTS\|_DATA\|_HEADERS\|_MANS\|_TEXINFOS\|_JAVA\|_LTLIBRARIES\)\s*="me=e-1
 syn match automakePrimary "^TESTS\s*="me=e-1
+syn match automakeSecondary "^[A-Za-z0-9_]\+\(_SOURCES\|_LDADD\|_LIBADD\|_LDFLAGS\|_DEPENDENCIES\|_CPPFLAGS\)\s*="me=e-1
 syn match automakeSecondary "^OMIT_DEPENDENCIES\s*="me=e-1
+syn match automakeExtra "^EXTRA_[A-Za-z0-9_]\+\s*="me=e-1
 syn match automakeOptions "^\(AUTOMAKE_OPTIONS\|ETAGS_ARGS\|TAGS_DEPENDENCIES\)\s*="me=e-1
 syn match automakeClean "^\(MOSTLY\|DIST\|MAINTAINER\)\=CLEANFILES\s*="me=e-1
 syn match automakeSubdirs "^\(DIST_\)\=SUBDIRS\s*="me=e-1
--- vim-7.1.314.orig/runtime/syntax/colortest.vim
+++ vim-7.1.314/runtime/syntax/colortest.vim
@@ -1,7 +1,7 @@
 " Vim script for testing colors
 " Maintainer:	Bram Moolenaar <Bram@vim.org>
 " Contributors:	Rafael Garcia-Suarez, Charles Campbell
-" Last Change:	2006 Feb 20
+" Last Change:	2008 Jun 04
 
 " edit this file, then do ":source %", and check if the colors match
 
@@ -55,11 +55,18 @@
 " Open this file in a window if it isn't edited yet.
 " Use the current window if it's empty.
 if expand('%:p') != expand('<sfile>:p')
+  let s:fname = expand('<sfile>')
+  if exists('*fnameescape')
+    let s:fname = fnameescape(s:fname)
+  else
+    let s:fname = escape(s:fname, ' \|')
+  endif
   if &mod || line('$') != 1 || getline(1) != ''
-    exe "new " . expand('<sfile>')
+    exe "new " . s:fname
   else
-    exe "edit " . expand('<sfile>')
+    exe "edit " . s:fname
   endif
+  unlet s:fname
 endif
 
 syn clear
--- vim-7.1.314.orig/runtime/syntax/debchangelog.vim
+++ vim-7.1.314/runtime/syntax/debchangelog.vim
@@ -1,9 +1,10 @@
 " Vim syntax file
 " Language:    Debian changelog files
 " Maintainer:  Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
-" Former Maintainer: Wichert Akkerman <wakkerma@debian.org>
-" Last Change: $LastChangedDate: 2006-04-16 21:50:31 -0400 (dom, 16 apr 2006) $
-" URL: http://svn.debian.org/wsvn/pkg-vim/trunk/runtime/syntax/debchangelog.vim?op=file&rev=0&sc=0
+" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
+"                     Wichert Akkerman <wakkerma@debian.org>
+" Last Change: 2008-01-16
+" URL: http://git.debian.org/?p=pkg-vim/vim.git;a=blob_plain;f=runtime/syntax/debchangelog.vim;hb=debian
 
 " Standard syntax initialization
 if version < 600
@@ -18,16 +19,17 @@
 " Define some common expressions we can use later on
 syn match debchangelogName	contained "^[[:alpha:]][[:alnum:].+-]\+ "
 syn match debchangelogUrgency	contained "; urgency=\(low\|medium\|high\|critical\|emergency\)\( \S.*\)\="
-syn match debchangelogTarget	contained "\( stable\| frozen\| unstable\| testing-proposed-updates\| experimental\| sarge-backports\| sarge-volatile\| stable-security\| testing-security\)\+"
+syn match debchangelogTarget	contained "\v %(%(old)=stable|frozen|unstable|%(testing-|%(old)=stable-)=proposed-updates|experimental|%(sarge|etch|lenny)-%(backports|volatile)|%(testing|%(old)=stable)-security|%(dapper|feisty|gutsy|hardy|intrepid)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
 syn match debchangelogVersion	contained "(.\{-})"
-syn match debchangelogCloses	contained "closes:\s*\(bug\)\=#\=\s\=\d\+\(,\s*\(bug\)\=#\=\s\=\d\+\)*"
+syn match debchangelogCloses	contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
+syn match debchangelogLP	contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"
 syn match debchangelogEmail	contained "[_=[:alnum:].+-]\+@[[:alnum:]./\-]\+"
 syn match debchangelogEmail	contained "<.\{-}>"
 
 " Define the entries that make up the changelog
 syn region debchangelogHeader start="^[^ ]" end="$" contains=debchangelogName,debchangelogUrgency,debchangelogTarget,debchangelogVersion oneline
 syn region debchangelogFooter start="^ [^ ]" end="$" contains=debchangelogEmail oneline
-syn region debchangelogEntry start="^  " end="$" contains=debchangelogCloses oneline
+syn region debchangelogEntry start="^  " end="$" contains=debchangelogCloses,debchangelogLP oneline
 
 " Associate our matches and regions with pretty colours
 if version >= 508 || !exists("did_debchangelog_syn_inits")
@@ -42,6 +44,7 @@
   HiLink debchangelogFooter		Identifier
   HiLink debchangelogEntry		Normal
   HiLink debchangelogCloses		Statement
+  HiLink debchangelogLP			Statement
   HiLink debchangelogUrgency		Identifier
   HiLink debchangelogName		Comment
   HiLink debchangelogVersion		Identifier
--- vim-7.1.314.orig/runtime/syntax/debcontrol.vim
+++ vim-7.1.314/runtime/syntax/debcontrol.vim
@@ -3,8 +3,8 @@
 " Maintainer:  Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
 " Former Maintainers: Gerfried Fuchs <alfie@ist.org>
 "                     Wichert Akkerman <wakkerma@debian.org>
-" Last Change: $LastChangedDate: 2006-04-16 21:50:31 -0400 (Sun, 16 Apr 2006) $
-" URL: http://svn.debian.org/wsvn/pkg-vim/trunk/runtime/syntax/debcontrol.vim?op=file&rev=0&sc=0
+" Last Change: 2008-02-23
+" URL: http://git.debian.org/?p=pkg-vim/vim.git;a=blob_plain;f=runtime/ftplugin/debcontrol.vim;hb=debian
 
 " Comments are very welcome - but please make sure that you are commenting on
 " the latest version of this file.
@@ -17,6 +17,9 @@
   finish
 endif
 
+" Should match case except for the keys of each field
+syn case match
+
 " Everything that is not explicitly matched by the rules below
 syn match debcontrolElse "^.*$"
 
@@ -25,28 +28,47 @@
 syn match debControlSpace " "
 
 " Define some common expressions we can use later on
-syn match debcontrolArchitecture contained "\(all\|any\|alpha\|amd64\|arm\(eb\)\=\|hppa\|i386\|ia64\|m32r\|m68k\|mipsel\|mips\|powerpc\|ppc64\|s390\|sheb\|sh\|sparc64\|sparc\|hurd-i386\|kfreebsd-\(i386\|gnu\)\|knetbsd-i386\|netbsd-\(alpha\|i386\)\)"
-syn match debcontrolName contained "[a-z][a-z0-9+-]*"
+syn match debcontrolArchitecture contained "\(all\|any\|alpha\|amd64\|arm\(e[bl]\)\=\|hppa\|i386\|ia64\|m32r\|m68k\|mipsel\|mips\|powerpc\|ppc64\|s390x\=\|sh[34]\(eb\)\=\|sh\|sparc64\|sparc\|hurd-i386\|kfreebsd-\(i386\|gnu\)\|knetbsd-i386\|netbsd-\(alpha\|i386\)\)"
+syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+"
 syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)"
-syn match debcontrolSection contained "\(\(contrib\|non-free\|non-US/main\|non-US/contrib\|non-US/non-free\)/\)\=\(admin\|base\|comm\|devel\|doc\|editors\|electronics\|embedded\|games\|gnome\|graphics\|hamradio\|interpreters\|kde\|libs\|libdevel\|mail\|math\|misc\|net\|news\|oldlibs\|otherosfs\|perl\|python\|science\|shells\|sound\|text\|tex\|utils\|web\|x11\|debian-installer\)"
+syn match debcontrolSection contained "\(\(contrib\|non-free\|non-US/main\|non-US/contrib\|non-US/non-free\|restricted\|universe\|multiverse\)/\)\=\(admin\|base\|comm\|devel\|doc\|editors\|electronics\|embedded\|games\|gnome\|graphics\|hamradio\|interpreters\|kde\|libs\|libdevel\|mail\|math\|misc\|net\|news\|oldlibs\|otherosfs\|perl\|python\|science\|shells\|sound\|text\|tex\|utils\|web\|x11\|debian-installer\)"
+syn match debcontrolPackageType contained "u\?deb"
 syn match debcontrolVariable contained "\${.\{-}}"
 
+" A URL (using the domain name definitions from RFC 1034 and 1738), right now
+" only enforce protocol and some sanity on the server/path part;
+syn match debcontrolHTTPUrl contained "\vhttps?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$"
+syn match debcontrolVcsSvn contained "\vsvn%(\+ssh)?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$"
+syn match debcontrolVcsCvs contained "\v%(\-d *)?:pserver:[^@]+\@[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?:/[^[:space:]]*%( [^[:space:]]+)?$"
+syn match debcontrolVcsGit contained "\vgit://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$"
+
 " An email address
 syn match	debcontrolEmail	"[_=[:alnum:]\.+-]\+@[[:alnum:]\./\-]\+"
 syn match	debcontrolEmail	"<.\{-}>"
 
+" #-Comments
+syn match debcontrolComment "^#.*$"
+
+syn case ignore
+
 " List of all legal keys
-syn match debcontrolKey contained "^\(Source\|Package\|Section\|Priority\|Maintainer\|Uploaders\|Build-Depends\|Build-Conflicts\|Build-Depends-Indep\|Build-Conflicts-Indep\|Standards-Version\|Pre-Depends\|Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Essential\|Architecture\|Description\|Bugs\|Origin\|Enhances\): *"
+syn match debcontrolKey contained "^\(Source\|Package\|Section\|Priority\|Maintainer\|Uploaders\|Build-Depends\|Build-Conflicts\|Build-Depends-Indep\|Build-Conflicts-Indep\|Standards-Version\|Pre-Depends\|Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Essential\|Architecture\|Description\|Bugs\|Origin\|Enhances\|Homepage\|\(XS-\)\=Vcs-\(Browser\|Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\)\|XC-Package-Type\): *"
 
 " Fields for which we do strict syntax checking
 syn region debcontrolStrictField start="^Architecture" end="$" contains=debcontrolKey,debcontrolArchitecture,debcontrolSpace oneline
 syn region debcontrolStrictField start="^\(Package\|Source\)" end="$" contains=debcontrolKey,debcontrolName oneline
 syn region debcontrolStrictField start="^Priority" end="$" contains=debcontrolKey,debcontrolPriority oneline
 syn region debcontrolStrictField start="^Section" end="$" contains=debcontrolKey,debcontrolSection oneline
+syn region debcontrolStrictField start="^XC-Package-Type" end="$" contains=debcontrolKey,debcontrolPackageType oneline
+syn region debcontrolStrictField start="^Homepage" end="$" contains=debcontrolKey,debcontrolHTTPUrl oneline keepend
+syn region debcontrolStrictField start="^\%(XS-\)\?Vcs-\%(Browser\|Arch\|Bzr\|Darcs\|Hg\)" end="$" contains=debcontrolKey,debcontrolHTTPUrl oneline keepend
+syn region debcontrolStrictField start="^\%(XS-\)\?Vcs-Svn" end="$" contains=debcontrolKey,debcontrolVcsSvn,debcontrolHTTPUrl oneline keepend
+syn region debcontrolStrictField start="^\%(XS-\)\?Vcs-Cvs" end="$" contains=debcontrolKey,debcontrolVcsCvs oneline keepend
+syn region debcontrolStrictField start="^\%(XS-\)\?Vcs-Git" end="$" contains=debcontrolKey,debcontrolVcsGit oneline keepend
 
 " Catch-all for the other legal fields
-syn region debcontrolField start="^\(Maintainer\|Build-Depends\|Build-Conflicts\|Build-Depends-Indep\|Build-Conflicts-Indep\|Standards-Version\|Pre-Depends\|Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Essential\|Bugs\|Origin\|Enhances\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline
-syn region debcontrolMultiField start="^\(Uploaders\|Description\):" skip="^ " end="^$"me=s-1 end="^[^ ]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable
+syn region debcontrolField start="^\(Maintainer\|Standards-Version\|Essential\|Bugs\|Origin\|X\(S\|B\)-Python-Version\|XSBC-Original-Maintainer\|\(XS-\)\?Vcs-Mtn\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline
+syn region debcontrolMultiField start="^\(Build-\(Conflicts\|Depends\)\(-Indep\)\=\|\(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Uploaders\|Description\):" skip="^ " end="^$"me=s-1 end="^[^ ]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable
 
 " Associate our matches and regions with pretty colours
 if version >= 508 || !exists("did_debcontrol_syn_inits")
@@ -65,8 +87,14 @@
   HiLink debcontrolName		Normal
   HiLink debcontrolPriority	Normal
   HiLink debcontrolSection	Normal
+  HiLink debcontrolPackageType	Normal
   HiLink debcontrolVariable	Identifier
   HiLink debcontrolEmail	Identifier
+  HiLink debcontrolVcsSvn	Identifier
+  HiLink debcontrolVcsCvs	Identifier
+  HiLink debcontrolVcsGit	Identifier
+  HiLink debcontrolHTTPUrl	Identifier
+  HiLink debcontrolComment	Comment
   HiLink debcontrolElse		Special
 
   delcommand HiLink
--- vim-7.1.314.orig/runtime/syntax/debsources.vim
+++ vim-7.1.314/runtime/syntax/debsources.vim
@@ -19,14 +19,14 @@
 syn case match
 
 " A bunch of useful keywords
-syn match debsourcesKeyword        /\(deb-src\|deb\|main\|contrib\|non-free\)/
+syn match debsourcesKeyword        /\(deb-src\|deb\|main\|contrib\|non-free\|restricted\|universe\|multiverse\)/
 
 " Match comments
 syn match debsourcesComment        /#.*/
 
 " Match uri's
-syn match debsourcesUri            +\(http://\|ftp://\|file:///\)[^' 	<>"]\++
-syn match debsourcesDistrKeyword   +\([[:alnum:]_./]*\)\(woody\|sarge\|etch\|old-stable\|stable\|testing\|unstable\|sid\|experimental\|warty\|hoary\|breezy\)\([[:alnum:]_./]*\)+
+syn match debsourcesUri            +\(http://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' 	<>"]\++
+syn match debsourcesDistrKeyword   +\([[:alnum:]_./]*\)\(sarge\|etch\|lenny\|\(old\)\=stable\|testing\|unstable\|sid\|experimental\|dapper\|feisty\|gutsy\|hardy\|intrepid\)\([-[:alnum:]_./]*\)+
 
 " Associate our matches and regions with pretty colours
 hi def link debsourcesLine            Error
--- vim-7.1.314.orig/runtime/syntax/dosini.vim
+++ vim-7.1.314/runtime/syntax/dosini.vim
@@ -19,7 +19,7 @@
 
 syn match  dosiniLabel		"^.\{-}="
 syn region dosiniHeader		start="^\[" end="\]"
-syn match  dosiniComment	"^;.*$"
+syn match  dosiniComment	"^[;#].*$"
 
 " Define the default highlighting.
 " For version 5.7 and earlier: only when not done already
--- vim-7.1.314.orig/runtime/syntax/fstab.vim
+++ vim-7.1.314/runtime/syntax/fstab.vim
@@ -2,13 +2,14 @@
 " Language: fstab file
 " Maintaner: Radu Dineiu <radu.dineiu@gmail.com>
 " URL: http://ld.yi.org/vim/fstab.vim
-" Last Change: 2007 Apr 24
-" Version: 0.91
+" Last Change: 2008 Jan 15
+" Version: 0.92
 "
 " Credits:
 "   David Necas (Yeti) <yeti@physics.muni.cz>
 "   Stefano Zacchiroli <zack@debian.org>
 "   Georgi Georgiev <chutz@gg3.net>
+"   James Vega <jamessan@debian.org>
 "
 " Options:
 "   let fstab_unknown_fs_errors = 1
@@ -23,7 +24,7 @@
 " General
 syn cluster fsGeneralCluster contains=fsComment
 syn match fsComment /\s*#.*/
-syn match fsOperator /[,=:]/
+syn match fsOperator /[,=:#]/
 
 " Device
 syn cluster fsDeviceCluster contains=fsOperator,fsDeviceKeyword,fsDeviceError
@@ -31,9 +32,11 @@
 syn keyword fsDeviceKeyword contained none proc linproc tmpfs devpts sysfs usbfs
 syn keyword fsDeviceKeyword contained LABEL nextgroup=fsDeviceLabel
 syn keyword fsDeviceKeyword contained UUID nextgroup=fsDeviceUUID
+syn keyword fsDeviceKeyword contained sshfs nextgroup=fsDeviceSshfs
 syn match fsDeviceKeyword contained /^[a-zA-Z0-9.\-]\+\ze:/
 syn match fsDeviceLabel contained /=[^ \t]\+/hs=s+1 contains=fsOperator
 syn match fsDeviceUUID contained /=[^ \t]\+/hs=s+1 contains=fsOperator
+syn match fsDeviceSshfs contained /#[_=[:alnum:]\.\/+-]\+@[a-z0-9._-]\+\a\{2}:[^ \t]\+/hs=s+1 contains=fsOperator
 
 " Mount Point
 syn cluster fsMountPointCluster contains=fsMountPointKeyword,fsMountPointError
@@ -43,7 +46,7 @@
 " Type
 syn cluster fsTypeCluster contains=fsTypeKeyword,fsTypeUnknown
 syn match fsTypeUnknown /\s\+\zs\w\+/ contained
-syn keyword fsTypeKeyword contained adfs ados affs atfs audiofs auto autofs befs bfs cd9660 cfs cifs coda cramfs devfs devpts e2compr efs ext2 ext2fs ext3 fdesc ffs filecore hfs hpfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix msdos ncpfs nfs none ntfs null nwfs overlay ovlfs portal proc procfs ptyfs qnx4 reiserfs romfs shm smbfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xfs zisofs
+syn keyword fsTypeKeyword contained adfs ados affs atfs audiofs auto autofs befs bfs cd9660 cfs cifs coda cramfs devfs devpts e2compr efs ext2 ext2fs ext3 fdesc ffs filecore fuse hfs hpfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix msdos ncpfs nfs none ntfs null nwfs overlay ovlfs portal proc procfs ptyfs qnx4 reiserfs romfs shm smbfs sshfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xfs zisofs
 
 " Options
 " -------
@@ -143,6 +146,14 @@
 syn keyword fsOptionsReiserHash contained rupasov tea r5 detect
 syn keyword fsOptionsKeywords contained hashed_relocation noborder nolog notail no_unhashed_relocation replayonly
 
+" Options: sshfs
+syn match fsOptionsKeywords contained /\<\%(BatchMode\|ChallengeResponseAuthentication\|CheckHostIP\|ClearAllForwardings\|Compression\|EnableSSHKeysign\|ForwardAgent\|ForwardX11\|ForwardX11Trusted\|GatewayPorts\|GSSAPIAuthentication\|GSSAPIDelegateCredentials\|HashKnownHosts\|HostbasedAuthentication\|IdentitiesOnly\|NoHostAuthenticationForLocalhost\|PasswordAuthentication\|PubkeyAuthentication\|RhostsRSAAuthentication\|RSAAuthentication\|TCPKeepAlive\|UsePrivilegedPort\|cache\)=/ nextgroup=fsOptionsYesNo
+syn match fsOptionsKeywords contained /\<\%(ControlMaster\|StrictHostKeyChecking\|VerifyHostKeyDNS\)=/ nextgroup=fsOptionsSshYesNoAsk
+syn match fsOptionsKeywords contained /\<\%(AddressFamily\|BindAddress\|Cipher\|Ciphers\|ControlPath\|DynamicForward\|EscapeChar\|GlobalKnownHostsFile\|HostKeyAlgorithms\|HostKeyAlias\|HostName\|IdentityFile\|KbdInteractiveDevices\|LocalForward\|LogLevel\|MACs\|PreferredAuthentications\|Protocol\|ProxyCommand\|RemoteForward\|RhostsAuthentication\|SendEnv\|SmartcardDevice\|User\|UserKnownHostsFile\|XAuthLocation\|comment\|workaround\|idmap\|ssh_command\|sftp_server\|fsname\)=/ nextgroup=fsOptionsString
+syn match fsOptionsKeywords contained /\<\%(CompressionLevel\|ConnectionAttempts\|ConnectTimeout\|NumberOfPasswordPrompts\|Port\|ServerAliveCountMax\|ServerAliveInterval\|cache_timeout\|cache_X_timeout\|ssh_protocol\|directport\|max_read\|umask\|uid\|gid\|entry_timeout\|negative_timeout\|attr_timeout\)=/ nextgroup=fsOptionsNumber
+syn keyword fsOptionsKeywords contained reconnect sshfs_sync no_readahead sshfs_debug transform_symlinks allow_other allow_root nonempty default_permissions large_read hard_remove use_ino readdir_ino direct_io kernel_cache
+syn keyword fsOptionsSshYesNoAsk contained yes no ask
+
 " Options: subfs
 syn match fsOptionsKeywords contained /\<fs=/ nextgroup=fsOptionsString
 syn keyword fsOptionsKeywords contained procuid
@@ -208,11 +219,13 @@
 	HiLink fsDeviceKeyword Identifier
 	HiLink fsDeviceLabel String
 	HiLink fsDeviceUUID String
+	HiLink fsDeviceSshfs String
 	HiLink fsFreqPassNumber Number
 
 	if exists('fstab_unknown_fs_errors') && fstab_unknown_fs_errors == 1
 		HiLink fsTypeUnknown Error
 	endif
+
 	HiLink fsDeviceError Error
 	HiLink fsMountPointError Error
 	HiLink fsMountPointKeyword Keyword
@@ -235,6 +248,7 @@
 	HiLink fsOptionsHpfsCase String
 	HiLink fsOptionsIsoMap String
 	HiLink fsOptionsReiserHash String
+	HiLink fsOptionsSshYesNoAsk String
 	HiLink fsOptionsUfsType String
 	HiLink fsOptionsUfsError String
 
--- vim-7.1.314.orig/runtime/syntax/lhaskell.vim
+++ vim-7.1.314/runtime/syntax/lhaskell.vim
@@ -71,7 +71,7 @@
 "   - \begin{env}       (for env != code)
 "   - \part, \chapter, \section, \subsection, \subsubsection, etc
 if b:lhs_markup == "unknown"
-    if search('%\|\\documentclass\|\\begin{\(code}\)\@!\|\\\(sub\)*section\|\\chapter|\\part','W') != 0
+    if search('^%\|\\documentclass\|\\begin{\(code}\)\@!\|\\\(sub\)*section\|\\chapter|\\part','W') != 0
 	let b:lhs_markup = "tex"
     else
 	let b:lhs_markup = "plain"
--- vim-7.1.314.orig/runtime/syntax/make.vim
+++ vim-7.1.314/runtime/syntax/make.vim
@@ -63,7 +63,7 @@
 
 
 " Statements / Functions (GNU make)
-syn match makeStatement contained "(\(subst\|addprefix\|addsuffix\|basename\|call\|dir\|error\|eval\|filter-out\|filter\|findstring\|firstword\|foreach\|if\|join\|notdir\|origin\|patsubst\|shell\|sort\|strip\|suffix\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1
+syn match makeStatement contained "(\(subst\|abspath\|addprefix\|addsuffix\|and\|basename\|call\|dir\|error\|eval\|filter-out\|filter\|findstring\|firstword\|flavor\|foreach\|if\|info\|join\|lastword\|notdir\|or\|origin\|patsubst\|realpath\|shell\|sort\|strip\|suffix\|value\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1
 
 " Comment
 if exists("make_microsoft")
--- vim-7.1.314.orig/runtime/syntax/messages.vim
+++ vim-7.1.314/runtime/syntax/messages.vim
@@ -10,7 +10,7 @@
 let s:cpo_save = &cpo
 set cpo&vim
 
-syn match   messagesBegin       display '^' nextgroup=messagesDate
+syn match   messagesBegin       display '^' nextgroup=messagesDate,messagesDateRFC3339
 
 syn match   messagesDate        contained display '\a\a\a [ 0-9]\d *'
                                 \ nextgroup=messagesHour
@@ -18,6 +18,15 @@
 syn match   messagesHour        contained display '\d\d:\d\d:\d\d\s*'
                                 \ nextgroup=messagesHost
 
+syn match   messagesDateRFC3339 contained display '\d\{4}-\d\d-\d\d'
+                                \ nextgroup=messagesRFC3339T
+
+syn match   messagesRFC3339T    contained display '\cT'
+                                \ nextgroup=messagesHourRFC3339
+
+syn match   messagesHourRFC3339 contained display '\c\d\d:\d\d:\d\d\(\.\d\+\)\=\([+-]\d\d:\d\d\|Z\)'
+                                \ nextgroup=messagesHost
+
 syn match   messagesHost        contained display '\S*\s*'
                                 \ nextgroup=messagesLabel
 
@@ -43,6 +52,9 @@
 
 hi def link messagesDate        Constant
 hi def link messagesHour        Type
+hi def link messagesDateRFC3339 Constant
+hi def link messagesHourRFC3339 Type
+hi def link messagesRFC3339T    Normal
 hi def link messagesHost        Identifier
 hi def link messagesLabel       Operator
 hi def link messagesPID         Constant
--- vim-7.1.314.orig/runtime/syntax/mysql.vim
+++ vim-7.1.314/runtime/syntax/mysql.vim
@@ -67,7 +67,7 @@
 " Comments (c-style, mysql-style and modified sql-style)
 syn region mysqlComment		 start="/\*"  end="\*/"
 syn match mysqlComment		 "#.*"
-syn match mysqlComment		 "-- .*"
+syn match mysqlComment		 "--\_s.*"
 syn sync ccomment mysqlComment
 
 " Column types
--- vim-7.1.314.orig/runtime/syntax/netrw.vim
+++ vim-7.1.314/runtime/syntax/netrw.vim
@@ -1,7 +1,7 @@
 " Language   : Netrw Remote-Directory Listing Syntax
 " Maintainer : Charles E. Campbell, Jr.
-" Last change: Nov 27, 2006
-" Version    : 9
+" Last change: Feb 06, 2008
+" Version    : 12
 " ---------------------------------------------------------------------
 
 " Syntax Clearing: {{{1
@@ -13,40 +13,59 @@
 
 " ---------------------------------------------------------------------
 " Directory List Syntax Highlighting: {{{1
-syn cluster NetrwGroup contains=netrwHide,netrwSortBy,netrwSortSeq,netrwQuickHelp,netrwVersion
+syn cluster NetrwGroup		contains=netrwHide,netrwSortBy,netrwSortSeq,netrwQuickHelp,netrwVersion,netrwCopyTgt
+syn cluster NetrwTreeGroup	contains=netrwDir,netrwSymLink,netrwExe
 
-syn match  netrwSpecial		"\%(\S\+ \)*\S\+[*|=]\ze\%(\s\{2,}\|$\)" contains=netrwClassify
-syn match  netrwDir		"\.\{1,2}/"			contains=netrwClassify
-syn match  netrwDir		"\%(\S\+ \)*\S\+/"		contains=netrwClassify
-syn match  netrwDir		"^\S*/"				contains=netrwClassify
-syn match  netrwSizeDate	"\<\d\+\s\d\{1,2}/\d\{1,2}/\d\{4}\s"	contains=netrwDateSep skipwhite nextgroup=netrwTime
-syn match  netrwSymLink		"\%(\S\+ \)*\S\+@\ze\%(\s\{2,}\|$\)"  contains=netrwClassify
-syn match  netrwExe		"\%(\S\+ \)*\S\+\*\ze\%(\s\{2,}\|$\)" contains=netrwClassify,netrwTreeIgnore
-syn match  netrwTreeIgnore contained "^\%(| \)*"
+syn match  netrwSpecial		"\%(\S\+ \)*\S\+[*|=]\ze\%(\s\{2,}\|$\)"		contains=netrwClassify
+syn match  netrwDir		"\.\{1,2}/"						contains=netrwClassify
+syn match  netrwDir		"\%(\S\+ \)*\S\+/"					contains=netrwClassify
+syn match  netrwSizeDate	"\<\d\+\s\d\{1,2}/\d\{1,2}/\d\{4}\s"			contains=netrwDateSep skipwhite nextgroup=netrwTime
+syn match  netrwSymLink		"\%(\S\+ \)*\S\+@\ze\%(\s\{2,}\|$\)"  			contains=netrwClassify
+syn match  netrwExe		"\%(\S\+ \)*\S\+\*\ze\%(\s\{2,}\|$\)" 			contains=netrwClassify
+syn match  netrwTreeBar		"^\%(| \)*"						contains=netrwTreeBarSpace	nextgroup=@netrwTreeGroup
+syn match  netrwTreeBarSpace	" "				contained
 
 syn match  netrwClassify	"[*=|@/]\ze\%(\s\{2,}\|$\)"	contained
 syn match  netrwDateSep		"/"				contained
-syn match  netrwTime		"\d\{1,2}:\d\{2}:\d\{2}"	contained contains=netrwTimeSep
+syn match  netrwTime		"\d\{1,2}:\d\{2}:\d\{2}"	contained		contains=netrwTimeSep
 syn match  netrwTimeSep		":"
 
-syn match  netrwComment		'".*\%(\t\|$\)'			contains=@NetrwGroup
+syn match  netrwComment		'".*\%(\t\|$\)'						contains=@NetrwGroup
 syn match  netrwHide		'^"\s*\(Hid\|Show\)ing:'	skipwhite nextgroup=netrwHidePat
 syn match  netrwSlash		"/"				contained
 syn match  netrwHidePat		"[^,]\+"			contained skipwhite nextgroup=netrwHideSep
 syn match  netrwHideSep		","				contained transparent skipwhite nextgroup=netrwHidePat
 syn match  netrwSortBy		"Sorted by"			contained transparent skipwhite nextgroup=netrwList
 syn match  netrwSortSeq		"Sort sequence:"		contained transparent skipwhite nextgroup=netrwList
-syn match  netrwList		".*$"				contained contains=netrwComma
+syn match  netrwCopyTgt		"Copy/Move Tgt:"		contained transparent skipwhite nextgroup=netrwList
+syn match  netrwList		".*$"				contained		contains=netrwComma
 syn match  netrwComma		","				contained
-syn region netrwQuickHelp	matchgroup=Comment start="Quick Help:\s\+" end="$" contains=netrwHelpCmd keepend contained
+syn region netrwQuickHelp	matchgroup=Comment start="Quick Help:\s\+" end="$"	contains=netrwHelpCmd keepend contained
 syn match  netrwHelpCmd		"\S\ze:"			contained skipwhite nextgroup=netrwCmdSep
 syn match  netrwCmdSep		":"				contained nextgroup=netrwCmdNote
 syn match  netrwCmdNote		".\{-}\ze  "			contained
 syn match  netrwVersion		"(netrw.*)"			contained
 
+" -----------------------------
+" Special filetype highlighting {{{1
+" -----------------------------
+if exists("g:netrw_special_syntax") && netrw_special_syntax
+ syn match netrwBak		"\(\S\+ \)*\S\+\.bak\>"				contains=netrwTreeBar
+ syn match netrwCompress	"\(\S\+ \)*\S\+\.\%(gz\|bz2\|Z\|zip\)\>"	contains=netrwTreeBar
+ syn match netrwData		"\(\S\+ \)*\S\+\.dat\>"				contains=netrwTreeBar
+ syn match netrwHdr		"\(\S\+ \)*\S\+\.h\>"				contains=netrwTreeBar
+ syn match netrwLib		"\(\S\+ \)*\S*\.\%(a\|so\|lib\|dll\)\>"		contains=netrwTreeBar
+ syn match netrwMakeFile	"\<[mM]akefile\>\|\(\S\+ \)*\S\+\.mak\>"	contains=netrwTreeBar
+ syn match netrwObj		"\(\S\+ \)*\S*\.\%(o\|obj\)\>"			contains=netrwTreeBar
+ syn match netrwTags    	"\<tags\>"					contains=netrwTreeBar
+ syn match netrwTags		"\<\(ANmenu\|ANtags\)\>"			contains=netrwTreeBar
+ syn match netrwTilde		"\(\S\+ \)*\S\+\~\>"				contains=netrwTreeBar
+ syn match netrwTmp		"\<tmp\(\S\+ \)*\S\+\>\|\(\S\+ \)*\S*tmp\>"	contains=netrwTreeBar
+endif
+
 " ---------------------------------------------------------------------
 " Highlighting Links: {{{1
-if !exists("did_drchip_dbg_syntax")
+if !exists("did_drchip_netrwlist_syntax")
  let did_drchip_netrwlist_syntax= 1
  hi link netrwClassify	Function
  hi link netrwCmdSep	Delimiter
@@ -56,13 +75,26 @@
  hi link netrwHidePat	Statement
  hi link netrwList	Statement
  hi link netrwVersion	Identifier
- hi link netrwSymLink	Special
+ hi link netrwSymLink	Question
  hi link netrwExe	PreProc
  hi link netrwDateSep	Delimiter
 
+ hi link netrwTreeBar	Special
  hi link netrwTimeSep	netrwDateSep
  hi link netrwComma	netrwComment
  hi link netrwHide	netrwComment
+ hi link netrwMarkFile	Identifier
+
+ " special syntax highlighting (see :he g:netrw_special_syntax)
+ hi link netrwBak	NonText
+ hi link netrwCompress	Folded
+ hi link netrwData	DiffChange
+ hi link netrwLib	DiffChange
+ hi link netrwMakefile	DiffChange
+ hi link netrwObj	Folded
+ hi link netrwTilde	Folded
+ hi link netrwTmp	Folded
+ hi link netrwTags	Folded
 endif
 
 " Current Syntax: {{{1
--- vim-7.1.314.orig/runtime/syntax/po.vim
+++ vim-7.1.314/runtime/syntax/po.vim
@@ -11,6 +11,9 @@
   finish
 endif
 
+let s:cpo_save = &cpo
+set cpo-=C  " Allow line continuations
+
 syn sync minlines=10
 
 " Identifiers
@@ -118,6 +121,7 @@
   delcommand HiLink
 endif
 
+let &cpo = s:cpo_save
 let b:current_syntax = "po"
 
 " vim:set ts=8 sts=2 sw=2 noet:
--- vim-7.1.314.orig/runtime/syntax/samba.vim
+++ vim-7.1.314/runtime/syntax/samba.vim
@@ -51,7 +51,7 @@
 syn keyword sambaKeyword contained netbios nis notify nt null offset ok ole
 syn keyword sambaKeyword contained only open oplock oplocks options order os
 syn keyword sambaKeyword contained output packet page panic passwd password
-syn keyword sambaKeyword contained passwords path permissions pipe port
+syn keyword sambaKeyword contained passwords path permissions pipe ports
 syn keyword sambaKeyword contained postexec postscript prediction preexec
 syn keyword sambaKeyword contained prefered preferred preload preserve print
 syn keyword sambaKeyword contained printable printcap printer printers
--- vim-7.1.314.orig/runtime/syntax/sh.vim
+++ vim-7.1.314/runtime/syntax/sh.vim
@@ -2,22 +2,10 @@
 " Language:		shell (sh) Korn shell (ksh) bash (sh)
 " Maintainer:		Dr. Charles E. Campbell, Jr.  <NdrOchipS@PcampbellAfamily.Mbiz>
 " Previous Maintainer:	Lennart Schultz <Lennart.Schultz@ecmwf.int>
-" Last Change:		Dec 12, 2006
-" Version:		89
+" Last Change:		Mar 06, 2008
+" Version:		97
 " URL:		http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
-"
-" Using the following VIM variables: {{{1
-" g:is_bash		if none of the previous three variables are
-"		defined, then if g:is_bash is set enhance with
-"		bash syntax highlighting
-" g:is_kornshell	if neither b:is_kornshell or b:is_bash is
-"		defined, then if g:is_kornshell is set
-"		enhance with kornshell/POSIX syntax highlighting
-" g:is_posix                    this variable is the same as g:is_kornshell
-" g:sh_fold_enabled	if non-zero, syntax folding is enabled
-" g:sh_minlines		sets up syn sync minlines (dflt: 200)
-" g:sh_maxlines		sets up syn sync maxlines (dflt: 2x sh_minlines)
-"
+" For options and settings, please use:      :help ft-sh-syntax
 " This file includes many ideas from Éric Brunet (eric.brunet@ens.fr)
 
 " For version 5.x: Clear all syntax items {{{1
@@ -61,6 +49,15 @@
  let g:sh_fold_enabled= 0
  echomsg "Ignoring g:sh_fold_enabled=".g:sh_fold_enabled."; need to re-compile vim for +fold support"
 endif
+if !exists("s:sh_fold_functions")
+ let s:sh_fold_functions = 1
+endif
+if !exists("s:sh_fold_heredoc")
+ let s:sh_fold_heredoc   = 2
+endif
+if !exists("s:sh_fold_ifdofor")
+ let s:sh_fold_ifdofor   = 4
+endif
 if g:sh_fold_enabled && &fdm == "manual"
  set fdm=syntax
 endif
@@ -70,26 +67,33 @@
 
 " Clusters: contains=@... clusters {{{1
 "==================================
-syn cluster shCaseEsacList	contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq
+syn cluster shErrorList	contains=shDoError,shIfError,shInError,shCaseError,shEsacError,shCurlyError,shParenError,shTestError
+if exists("b:is_kornshell")
+ syn cluster ErrorList add=shDTestError
+endif
+syn cluster shArithParenList	contains=shArithmetic,shDeref,shDerefSimple,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen
+syn cluster shArithList	contains=@shArithParenList,shParenError
+syn cluster shCaseEsacList	contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial
 syn cluster shCaseList	contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq
 syn cluster shColonList	contains=@shCaseList
-syn cluster shCommandSubList	contains=shArithmetic,shDeref,shDerefSimple,shNumber,shOperator,shPosnParm,shExSingleQuote,shSingleQuote,shDoubleQuote,shStatement,shVariable,shSubSh,shAlias,shTest,shCtrlSeq
+syn cluster shCommandSubList	contains=shArithmetic,shDeref,shDerefSimple,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shSingleQuote,shDoubleQuote,shStatement,shVariable,shSubSh,shAlias,shTest,shCtrlSeq,shSpecial
 syn cluster shCurlyList	contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial
 syn cluster shDblQuoteList	contains=shCommandSub,shDeref,shDerefSimple,shPosnParm,shExSingleQuote,shCtrlSeq,shSpecial
 syn cluster shDerefList	contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPPS
 syn cluster shDerefVarList	contains=shDerefOp,shDerefVarArray,shDerefOpError
-syn cluster shEchoList	contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shExpr,shExSingleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq
+syn cluster shEchoList	contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shExpr,shExSingleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote
 syn cluster shExprList1	contains=shCharClass,shNumber,shOperator,shExSingleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq
 syn cluster shExprList2	contains=@shExprList1,@shCaseList,shTest
-syn cluster shFunctionList	contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shFunctionStart,shCtrlSeq
+syn cluster shFunctionList	contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq
 if exists("b:is_kornshell") || exists("b:is_bash")
+ syn cluster shFunctionList	add=shRepeat
  syn cluster shFunctionList	add=shDblBrace,shDblParen
 endif
 syn cluster shHereBeginList	contains=@shCommandSubList
 syn cluster shHereList	contains=shBeginHere,shHerePayload
 syn cluster shHereListDQ	contains=shBeginHere,@shDblQuoteList,shHerePayload
-syn cluster shIdList	contains=shCommandSub,shWrapLineOperator,shIdWhiteSpace,shDeref,shDerefSimple,shRedir,shExSingleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq
-syn cluster shLoopList	contains=@shCaseList,shTestOpr,shExpr,shDblBrace,shConditional,shCaseEsac,shTest
+syn cluster shIdList	contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shRedir,shExSingleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial
+syn cluster shLoopList	contains=@shCaseList,shTestOpr,shExpr,shDblBrace,shConditional,shCaseEsac,shTest,@shErrorList,shSet
 syn cluster shSubShList	contains=@shCaseList,shOperator
 syn cluster shTestList	contains=shCharClass,shComment,shCommandSub,shDeref,shDerefSimple,shDoubleQuote,shExpr,shExpr,shNumber,shOperator,shExSingleQuote,shSingleQuote,shTestOpr,shTest,shCtrlSeq
 
@@ -97,10 +101,11 @@
 " Echo: {{{1
 " ====
 " This one is needed INSIDE a CommandSub, so that `echo bla` be correct
-syn region shEcho matchgroup=shStatement start="\<echo\>"  skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList
-syn region shEcho matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList
+syn region shEcho matchgroup=shStatement start="\<echo\>"  skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList skipwhite nextgroup=shQuickComment
+syn region shEcho matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList skipwhite nextgroup=shQuickComment
+syn match  shEchoQuote contained	'\%(\\\\\)*\\["`']'
 
-" This must be after the strings, so that bla \" be correct
+" This must be after the strings, so that ... \" will be correct
 syn region shEmbeddedEcho contained matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|`)]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=shNumber,shExSingleQuote,shSingleQuote,shDeref,shDerefSimple,shSpecialVar,shOperator,shDoubleQuote,shCharClass,shCtrlSeq
 
 " Alias: {{{1
@@ -125,10 +130,10 @@
 endif
 syn match     shTestError "]"
 
-" Options Interceptor: {{{1
+" Options: {{{1
 " ====================
-syn match   shOption  "\s[\-+][a-zA-Z0-9]\+\>"ms=s+1
-syn match   shOption  "\s--[^ \t$`'"|]\+"ms=s+1
+syn match   shOption	"\s\zs[-+][a-zA-Z0-9]\+\>"
+syn match   shOption	"\s\zs--[^ \t$`'"|]\+"
 
 " File Redirection Highlighted As Operators: {{{1
 "===========================================
@@ -140,8 +145,8 @@
 " Operators: {{{1
 " ==========
 syn match   shOperator	"<<\|>>"		contained
-syn match   shOperator	"[!&;|]"
-syn match   shOperator	"\[[[^:]\|\]]"
+syn match   shOperator	"[!&;|]"		contained
+syn match   shOperator	"\[[[^:]\|\]]"		contained
 syn match   shOperator	"!\=="		skipwhite nextgroup=shPattern
 syn match   shPattern	"\<\S\+\())\)\@="	contained contains=shExSingleQuote,shSingleQuote,shDoubleQuote,shDeref
 
@@ -172,7 +177,7 @@
 
 " Loops: do, if, while, until {{{1
 " ======
-if g:sh_fold_enabled
+if (g:sh_fold_enabled % (s:sh_fold_ifdofor * 2))/s:sh_fold_ifdofor
  syn region shDo	fold transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
  syn region shIf	fold transparent matchgroup=shConditional start="\<if\>" matchgroup=shConditional end="\<;\_s*then\>" end="\<fi\>"   contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey
  syn region shFor	fold matchgroup=shLoop start="\<for\>" end="\<in\>" end="\<do\>"me=e-2	contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
@@ -182,7 +187,8 @@
  syn region shFor	matchgroup=shLoop start="\<for\>" end="\<in\>" end="\<do\>"me=e-2	contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
 endif
 if exists("b:is_kornshell") || exists("b:is_bash")
- syn cluster shCaseList add=shRepeat
+ syn cluster shCaseList	add=shRepeat
+ syn cluster shFunctionList	add=shRepeat
  syn region shRepeat   matchgroup=shLoop   start="\<while\>" end="\<in\>" end="\<do\>"me=e-2	contains=@shLoopList,shDblParen,shDblBrace
  syn region shRepeat   matchgroup=shLoop   start="\<until\>" end="\<in\>" end="\<do\>"me=e-2	contains=@shLoopList,shDblParen,shDblBrace
  syn region shCaseEsac matchgroup=shConditional start="\<select\>" matchgroup=shConditional end="\<in\>" end="\<do\>" contains=@shLoopList
@@ -195,10 +201,10 @@
 
 " Case: case...esac {{{1
 " ====
-syn match   shCaseBar	contained skipwhite "[^|"`'()]\{-}|"hs=e		nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote
+syn match   shCaseBar	contained skipwhite "\(^\|[^\\]\)\(\\\\\)*\zs|"		nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote
 syn match   shCaseStart	contained skipwhite skipnl "("			nextgroup=shCase,shCaseBar
-syn region  shCase	contained skipwhite skipnl matchgroup=shSnglCase start="\([^#$()'" \t]\|\\.\)\{-})"ms=s,hs=e  end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
-if g:sh_fold_enabled
+syn region  shCase	contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)"  end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
+if (g:sh_fold_enabled % (s:sh_fold_ifdofor * 2))/s:sh_fold_ifdofor
  syn region  shCaseEsac	fold matchgroup=shConditional start="\<case\>" end="\<esac\>"	contains=@shCaseEsacList
 else
  syn region  shCaseEsac	matchgroup=shConditional start="\<case\>" end="\<esac\>"	contains=@shCaseEsacList
@@ -217,6 +223,7 @@
 "======
 syn match   shWrapLineOperator "\\$"
 syn region  shCommandSub   start="`" skip="\\\\\|\\." end="`" contains=@shCommandSubList
+syn match   shEscape	contained	'\\.'
 
 " $() and $(()): {{{1
 " $(..) is not supported by sh (Bourne shell).  However, apparently
@@ -226,7 +233,7 @@
 " an Error under /bin/sh.  By consensus of vimdev'ers!
 if exists("b:is_kornshell") || exists("b:is_bash")
  syn region shCommandSub matchgroup=shCmdSubRegion start="\$("  skip='\\\\\|\\.' end=")"  contains=@shCommandSubList
- syn region shArithmetic matchgroup=shArithRegion  start="\$((" skip='\\\\\|\\.' end="))" contains=@shCommandSubList
+ syn region shArithmetic matchgroup=shArithRegion  start="\$((" skip='\\\\\|\\.' end="))" contains=@shArithList
  syn match  shSkipInitWS contained	"^\s\+"
 else
  syn region shCommandSub matchgroup=Error start="\$(" end=")" contains=@shCommandSubList
@@ -275,7 +282,8 @@
 syn cluster    shCommentGroup	contains=shTodo,@Spell
 syn keyword    shTodo	contained	COMBAK FIXME TODO XXX
 syn match      shComment	"^\s*\zs#.*$"	contains=@shCommentGroup
-syn match      shComment	"#.*$"	contains=@shCommentGroup
+syn match      shComment	"\s\zs#.*$"	contains=@shCommentGroup
+syn match      shQuickComment	contained	"#.*$"
 
 " Here Documents: {{{1
 " =========================================
@@ -287,7 +295,7 @@
  syn region shHereDoc matchgroup=shRedir start="<<\s*\**\.\**"	matchgroup=shRedir	end="^\.$"	contains=@shDblQuoteList
  syn region shHereDoc matchgroup=shRedir start="<<-\s*\**\.\**"	matchgroup=shRedir	end="^\s*\.$"	contains=@shDblQuoteList
 
-elseif g:sh_fold_enabled
+elseif (g:sh_fold_enabled % (s:sh_fold_heredoc * 2))/s:sh_fold_heredoc
  syn region shHereDoc matchgroup=shRedir fold start="<<\s*\z(\S*\)"		matchgroup=shRedir end="^\z1\s*$"	contains=@shDblQuoteList
  syn region shHereDoc matchgroup=shRedir fold start="<<\s*\"\z(\S*\)\""		matchgroup=shRedir end="^\z1\s*$"
  syn region shHereDoc matchgroup=shRedir fold start="<<\s*'\z(\S*\)'"		matchgroup=shRedir end="^\z1\s*$"
@@ -326,32 +334,38 @@
 
 " Identifiers: {{{1
 "=============
-syn match  shVariable "\<\([bwglsav]:\)\=[a-zA-Z0-9.!@_%+,]*\ze="	nextgroup=shSetIdentifier
-syn match  shIdWhiteSpace  contained	"\s"
-syn match  shSetIdentifier contained	"="	nextgroup=shPattern,shDeref,shDerefSimple,shDoubleQuote,shSingleQuote,shExSingleQuote
-if exists("b:is_bash")
-  syn region shSetList matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$"	matchgroup=shOperator end="\ze[|);&]"me=e-1 matchgroup=NONE end="#\|="me=e-1 contains=@shIdList
-  syn region shSetList matchgroup=shSet start="\<set\>[^/]"me=e-1 end="$" end="\\ze[|)]"		matchgroup=shOperator end="\ze[|);&]"me=e-1 matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList
-  syn match  shSet "\<\(declare\|typeset\|local\|export\|set\|unset\)\>"
+syn match  shSetOption	"\s\zs[-+][a-zA-Z0-9]\+\>"	contained
+syn match  shVariable	"\<\([bwglsav]:\)\=[a-zA-Z0-9.!@_%+,]*\ze="	nextgroup=shSetIdentifier
+syn match  shSetIdentifier	"="		contained	nextgroup=shPattern,shDeref,shDerefSimple,shDoubleQuote,shSingleQuote,shExSingleQuote
+if exists("b:is_bash")
+ syn region shSetList oneline matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$"	matchgroup=shOperator end="\ze[}|);&]" matchgroup=NONE end="\ze#\|=" contains=@shIdList
+ syn region shSetList oneline matchgroup=shSet start="\<set\>\ze[^/]" end="\ze[;|)]\|$"			matchgroup=shOperator end="\ze[}|);&]" matchgroup=NONE end="\ze[#=]" contains=@shIdList
 elseif exists("b:is_kornshell")
-  syn region shSetList matchgroup=shSet start="\<\(typeset\|export\|unset\)\>\ze[^/]" end="$"		matchgroup=shOperator end="\ze[|);&]"me=e-1 matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList
-  syn region shSetList matchgroup=shSet start="\<set\>\ze[^/]" end="$\|\ze[})]"			matchgroup=shOperator end="\ze[|);&]"me=e-1 matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList
-  syn match  shSet "\<\(typeset\|set\|export\|unset\)\>"
+ syn region shSetList oneline matchgroup=shSet start="\<\(typeset\|export\|unset\)\>\ze[^/]" end="$"		matchgroup=shOperator end="\ze[}|);&]" matchgroup=NONE end="\ze[#=]" contains=@shIdList
+ syn region shSetList oneline matchgroup=shSet start="\<set\>\ze[^/]" end="$"				matchgroup=shOperator end="\ze[}|);&]" matchgroup=NONE end="\ze[#=]" contains=@shIdList
 else
-  syn region shSetList matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[^/]" end="$\|\ze[|)]"	matchgroup=shOperator end="\ze[|);&]" matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList
-  syn match  shStatement "\<\(set\|export\|unset\)\>"
+ syn region shSetList oneline matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[^/]" end="$"		matchgroup=shOperator end="\ze[}|);&]" matchgroup=NONE end="\ze[#=]" contains=@shIdList
 endif
 
 " Functions: {{{1
 syn keyword shFunctionKey function	skipwhite skipnl nextgroup=shFunctionTwo
-" COMBAK -- look at bash09.  function foo() (line#35) is folding 38 lines.  Not being terminated properly
-"syn match   shFunctionStart	"{"	contained
-if g:sh_fold_enabled
- syn region shFunctionOne transparent fold	start="^\s*\h\w*\s*()\_s*\ze{"    matchgroup=shFunctionStart end="}"	contains=@shFunctionList			skipwhite skipnl nextgroup=shFunctionStart
- syn region shFunctionTwo transparent fold	start="\h\w*\s*\%(()\)\=\_s*\ze{" matchgroup=shFunctionStart end="}"	contains=shFunctionKey,@shFunctionList contained	skipwhite skipnl nextgroup=shFunctionStart
+
+if exists("b:is_bash")
+ if (g:sh_fold_enabled % (s:sh_fold_functions * 2))/s:sh_fold_functions
+  syn region shFunctionOne fold	matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}"	contains=@shFunctionList			skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
+  syn region shFunctionTwo fold	matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{"	end="}"	contains=shFunctionKey,@shFunctionList contained	skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
+ else
+  syn region shFunctionOne	matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{"	end="}"	contains=@shFunctionList
+  syn region shFunctionTwo	matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{"	end="}"	contains=shFunctionKey,@shFunctionList contained
+ endif
 else
- syn region shFunctionOne transparent	start="^\s*\h\w*\s*()\_s*\ze{"    matchgroup=shFunctionStart end="}"	contains=@shFunctionList
- syn region shFunctionTwo transparent	start="\h\w*\s*\%(()\)\=\_s*\ze{" matchgroup=shFunctionStart end="}"	contains=shFunctionKey,@shFunctionList contained
+ if (g:sh_fold_enabled % (s:sh_fold_functions * 2))/s:sh_fold_functions
+  syn region shFunctionOne fold	matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}"	contains=@shFunctionList			skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
+  syn region shFunctionTwo fold	matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*{"	end="}"	contains=shFunctionKey,@shFunctionList contained	skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
+ else
+  syn region shFunctionOne	matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{"	end="}"	contains=@shFunctionList
+  syn region shFunctionTwo	matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*{"	end="}"	contains=shFunctionKey,@shFunctionList contained
+ endif
 endif
 
 " Parameter Dereferencing: {{{1
@@ -363,6 +377,7 @@
 syn match  shDerefSimple	"\$\$"
 if exists("b:is_bash") || exists("b:is_kornshell")
  syn region shDeref	matchgroup=PreProc start="\${##\=" end="}"	contains=@shDerefList
+ syn region shDeref	matchgroup=PreProc start="\${\$\$" end="}"	contains=@shDerefList
 endif
 
 " bash: ${!prefix*} and ${#parameter}: {{{1
@@ -399,9 +414,9 @@
  syn region shDerefPattern	contained	start="{" end="}"	contains=shDeref,shDerefSimple,shDerefString,shCommandSub nextgroup=shDerefPattern
  syn match  shDerefEscape	contained	'\%(\\\\\)*\\.'
 endif
-syn region shDerefString	contained	matchgroup=shOperator start=+'+ end=+'+		contains=shStringSpecial
-syn region shDerefString	contained	matchgroup=shOperator start=+"+ skip=+\\"+ end=+"+	contains=@shDblQuoteList,shStringSpecial
-syn match  shDerefString	contained	"\\["']"
+syn region shDerefString	contained	matchgroup=shOperator start=+\%(\\\)\@<!'+ end=+'+		contains=shStringSpecial
+syn region shDerefString	contained	matchgroup=shOperator start=+\%(\\\)\@<!"+ skip=+\\"+ end=+"+	contains=@shDblQuoteList,shStringSpecial
+syn match  shDerefString	contained	"\\["']"	nextgroup=shDerefPattern
 
 if exists("b:is_bash")
  " bash : ${parameter:offset}
@@ -416,6 +431,9 @@
  syn region shDerefPPSright	contained	start='.'	end='\ze}'	contains=@shCommandSubList
 endif
 
+" Arithmetic Parenthesized Expressions: {{{1
+syn region shParen matchgroup=shArithRegion start='(\ze[^(]' end=')' contains=@shArithParenList
+
 " Useful sh Keywords: {{{1
 " ===================
 syn keyword shStatement break cd chdir continue eval exec exit kill newgrp pwd read readonly return shift test trap ulimit umask wait
@@ -478,17 +496,22 @@
 hi def link shDerefVar	shDeref
 hi def link shDoubleQuote	shString
 hi def link shEcho	shString
+hi def link shEchoQuote	shString
 hi def link shEmbeddedEcho	shString
+hi def link shEscape	shCommandSub
 hi def link shExSingleQuote	shSingleQuote
-hi def link shFunctionStart	Delimiter
+hi def link shFunction	Function
 hi def link shHereDoc	shString
 hi def link shHerePayload	shHereDoc
 hi def link shLoop	shStatement
 hi def link shOption	shCommandSub
 hi def link shPattern	shString
+hi def link shParen	shArithmetic
 hi def link shPosnParm	shShellVariables
+hi def link shQuickComment	shComment
 hi def link shRange	shOperator
 hi def link shRedir	shOperator
+hi def link shSetOption	shOption
 hi def link shSingleQuote	shString
 hi def link shSource	shOperator
 hi def link shStringSpecial	shSpecial
--- vim-7.1.314.orig/runtime/syntax/tex.vim
+++ vim-7.1.314/runtime/syntax/tex.vim
@@ -1,8 +1,8 @@
 " Vim syntax file
 " Language:	TeX
 " Maintainer:	Dr. Charles E. Campbell, Jr. <NdrchipO@ScampbellPfamily.AbizM>
-" Last Change:	Feb 27, 2007
-" Version:	37
+" Last Change:	Oct 10, 2007
+" Version:	39
 " URL:		http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
 "
 " Notes: {{{1
@@ -96,13 +96,13 @@
 
 " Clusters: {{{1
 " --------
-syn cluster texCmdGroup		contains=texCmdBody,texComment,texDefParm,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texSectionMarker,texSectionName,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle
+syn cluster texCmdGroup		contains=texCmdBody,texComment,texDefParm,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texSectionMarker,texSectionName,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texURLZone,texAcroZone
 if !exists("g:tex_no_error")
  syn cluster texCmdGroup	add=texMathError
 endif
 syn cluster texEnvGroup		contains=texMatcher,texMathDelim,texSpecialChar,texStatement
-syn cluster texFoldGroup	contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texSectionMarker,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract
-syn cluster texMatchGroup	contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,@Spell
+syn cluster texFoldGroup	contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texSectionMarker,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texURLZone,texAcroZone
+syn cluster texMatchGroup	contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texURLZone,texAcroZone,@Spell
 syn cluster texRefGroup		contains=texMatcher,texComment,texDelimiter
 if !exists("tex_no_math")
  syn cluster texMathZones	contains=texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ
@@ -125,6 +125,8 @@
  syn cluster texSubSubSectionGroup	contains=texParaZone
  syn cluster texParaGroup		contains=texSubParaZone
 endif
+syn cluster texURLGroup			contains=texMatcher,@NoSpell
+syn cluster texAcroGroup		contains=texMatcher,@NoSpell
 
 " Try to flag {} and () mismatches: {{{1
 if !exists("g:tex_no_error")
@@ -261,27 +263,27 @@
 
 " Sections, subsections, etc: {{{1
 if g:tex_fold_enabled && has("folding")
- syn region texDocZone			matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}'	fold contains=@texFoldGroup,@texDocGroup,@Spell
- syn region texPartZone			matchgroup=texSection start='\\part\>'			 end='\n\ze\s*\\part\>'		fold contains=@texFoldGroup,@texPartGroup,@Spell
- syn region texChapterZone		matchgroup=texSection start='\\chapter\>'		 end='\n\ze\s*\\chapter\>'	fold contains=@texFoldGroup,@texChapterGroup,@Spell
- syn region texSectionZone		matchgroup=texSection start='\\section\>'		 end='\n\ze\s*\\section\>'	fold contains=@texFoldGroup,@texSectionGroup,@Spell
- syn region texSubSectionZone		matchgroup=texSection start='\\subsection\>'		 end='\n\ze\s*\\subsection\>'	fold contains=@texFoldGroup,@texSubSectionGroup,@Spell
- syn region texSubSubSectionZone	matchgroup=texSection start='\\subsubsection\>'		end='\n\ze\s*\\subsubsection\>'	fold contains=@texFoldGroup,@texSubSubSectionGroup,@Spell
- syn region texParaZone			matchgroup=texSection start='\\paragraph\>'		 end='\n\ze\s*\\paragraph\>'	fold contains=@texFoldGroup,@texParaGroup,@Spell
- syn region texSubParaZone		matchgroup=texSection start='\\subparagraph\>'		 end='\n\ze\s*\\subparagraph\>'	fold contains=@texFoldGroup,@Spell
- syn region texTitle			matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}'		fold contains=@texFoldGroup,@Spell
- syn region texAbstract			matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}'	fold contains=@texFoldGroup,@Spell
+ syn region texDocZone			matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}'			fold contains=@texFoldGroup,@texDocGroup,@Spell
+ syn region texPartZone			matchgroup=texSection start='\\part\>'			 end='\ze\n\s*\\part\>'				fold contains=@texFoldGroup,@texPartGroup,@Spell
+ syn region texChapterZone		matchgroup=texSection start='\\chapter\>'		 end='\ze\n\s*\\\%(chapter\|part\)\>'		fold contains=@texFoldGroup,@texChapterGroup,@Spell
+ syn region texSectionZone		matchgroup=texSection start='\\section\>'		 end='\ze\n\s*\\\%(section\>\|chapter\>\|part\>\|end{document}\)'					fold contains=@texFoldGroup,@texSectionGroup,@Spell
+ syn region texSubSectionZone		matchgroup=texSection start='\\subsection\>'		 end='\ze\n\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end{document}\)'				fold contains=@texFoldGroup,@texSubSectionGroup,@Spell
+ syn region texSubSubSectionZone	matchgroup=texSection start='\\subsubsection\>'		 end='\ze\n\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end{document}\)'				fold contains=@texFoldGroup,@texSubSubSectionGroup,@Spell
+ syn region texParaZone			matchgroup=texSection start='\\paragraph\>'		 end='\ze\n\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end{document}\)'			fold contains=@texFoldGroup,@texParaGroup,@Spell
+ syn region texSubParaZone		matchgroup=texSection start='\\subparagraph\>'		 end='\ze\n\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end{document}\)'	fold contains=@texFoldGroup,@Spell
+ syn region texTitle			matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}'					fold contains=@texFoldGroup,@Spell
+ syn region texAbstract			matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}'			fold contains=@texFoldGroup,@Spell
 else
- syn region texDocZone			matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}'	contains=@texFoldGroup,@texDocGroup,@Spell
- syn region texPartZone			matchgroup=texSection start='\\part\>'			 end='\n\ze\s*\\part\>'		contains=@texFoldGroup,@texPartGroup,@Spell
- syn region texChapterZone		matchgroup=texSection start='\\chapter\>'		 end='\n\ze\s*\\chapter\>'	contains=@texFoldGroup,@texChapterGroup,@Spell
- syn region texSectionZone		matchgroup=texSection start='\\section\>'		 end='\n\ze\s*\\section\>'	contains=@texFoldGroup,@texSectionGroup,@Spell
- syn region texSubSectionZone		matchgroup=texSection start='\\subsection\>'		 end='\n\ze\s*\\subsection\>'	contains=@texFoldGroup,@texSubSectionGroup,@Spell
- syn region texSubSubSectionZone	matchgroup=texSection start='\\subsubsection\>'		end='\n\ze\s*\\subsubsection\>'	contains=@texFoldGroup,@texSubSubSectionGroup,@Spell
- syn region texParaZone			matchgroup=texSection start='\\paragraph\>'		 end='\n\ze\s*\\paragraph\>'	contains=@texFoldGroup,@texParaGroup,@Spell
- syn region texSubParaZone		matchgroup=texSection start='\\subparagraph\>'		 end='\n\ze\s*\\subparagraph\>'	contains=@texFoldGroup,@Spell
- syn region texTitle			matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}'			contains=@texFoldGroup,@Spell
- syn region texAbstract			matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}'	contains=@texFoldGroup,@Spell
+ syn region texDocZone			matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}'			contains=@texFoldGroup,@texDocGroup,@Spell
+ syn region texPartZone			matchgroup=texSection start='\\part\>'			 end='\ze\n\s*\\part\>'				contains=@texFoldGroup,@texPartGroup,@Spell
+ syn region texChapterZone		matchgroup=texSection start='\\chapter\>'		 end='\ze\n\s*\\\%(chapter\|part\)\>'		contains=@texFoldGroup,@texChapterGroup,@Spell
+ syn region texSectionZone		matchgroup=texSection start='\\section\>'		 end='\ze\n\s*\\\%(section\>\|chapter\>\|part\>\|end{document}\)'					contains=@texFoldGroup,@texSectionGroup,@Spell
+ syn region texSubSectionZone		matchgroup=texSection start='\\subsection\>'		 end='\ze\n\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end{document}\)'				contains=@texFoldGroup,@texSubSectionGroup,@Spell
+ syn region texSubSubSectionZone	matchgroup=texSection start='\\subsubsection\>'		 end='\ze\n\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end{document}\)'				contains=@texFoldGroup,@texSubSubSectionGroup,@Spell
+ syn region texParaZone			matchgroup=texSection start='\\paragraph\>'		 end='\ze\n\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end{document}\)'			contains=@texFoldGroup,@texParaGroup,@Spell
+ syn region texSubParaZone		matchgroup=texSection start='\\subparagraph\>'		 end='\ze\n\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end{document}\)'	contains=@texFoldGroup,@Spell
+ syn region texTitle			matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}'					contains=@texFoldGroup,@Spell
+ syn region texAbstract			matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}'			contains=@texFoldGroup,@Spell
 endif
 
 " Bad Math (mismatched): {{{1
@@ -300,8 +302,13 @@
  fun! TexNewMathZone(sfx,mathzone,starform)
    let grpname  = "texMathZone".a:sfx
    let syncname = "texSyncMathZone".a:sfx
+   if g:tex_fold_enabled
+    let foldcmd= " fold"
+   else
+    let foldcmd= ""
+   endif
    exe "syn cluster texMathZones add=".grpname
-   exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\s*}'."'".' keepend contains=@texMathZoneGroup'
+   exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\s*}'."'".' keepend contains=@texMathZoneGroup'.foldcmd
    exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"'
    exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"'
    exe 'HiLink '.grpname.' texMath'
@@ -309,7 +316,7 @@
     let grpname  = "texMathZone".a:sfx.'S'
     let syncname = "texSyncMathZone".a:sfx.'S'
     exe "syn cluster texMathZones add=".grpname
-    exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\*\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\*\s*}'."'".' keepend contains=@texMathZoneGroup'
+    exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\*\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\*\s*}'."'".' keepend contains=@texMathZoneGroup'.foldcmd
     exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"'
     exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"'
     exe 'HiLink '.grpname.' texMath'
@@ -390,13 +397,17 @@
 " Separate lines used for verb` and verb# so that the end conditions {{{1
 " will appropriately terminate.  Ideally vim would let me save a
 " character from the start pattern and re-use it in the end-pattern.
-syn region texZone		start="\\begin{verbatim}"		end="\\end{verbatim}\|%stopzone\>"	contains=@Spell
+if version < 600
+  syn region texZone		start="\\begin{verbatim}"		end="\\end{verbatim}\|%stopzone\>"
+  " moreverb package:
+  syn region texZone		start="\\begin{verbatimtab}"		end="\\end{verbatimtab}\|%stopzone\>"
+  syn region texZone		start="\\begin{verbatimwrite}"		end="\\end{verbatimwrite}\|%stopzone\>"
+  syn region texZone		start="\\begin{boxedverbatim}"		end="\\end{boxedverbatim}\|%stopzone\>"
+else
+  syn region texZone		start="\\begin{\z(boxedverbatim\|verbatim\%(tab\|write\)\=\)}"		end="\\end{\z1}\|%stopzone\>"
+endif
 " listings package:
 syn region texZone		start="\\begin{lstlisting}"		end="\\end{lstlisting}\|%stopzone\>"	contains=@Spell
-" moreverb package:
-syn region texZone		start="\\begin{verbatimtab}"		end="\\end{verbatimtab}\|%stopzone\>"	contains=@Spell
-syn region texZone		start="\\begin{verbatimwrite}"		end="\\end{verbatimwrite}\|%stopzone\>"	contains=@Spell
-syn region texZone		start="\\begin{boxedverbatim}"		end="\\end{boxedverbatim}\|%stopzone\>"	contains=@Spell
 if version < 600
  syn region texZone		start="\\verb\*\=`"			end="`\|%stopzone\>"
  syn region texZone		start="\\verb\*\=#"			end="#\|%stopzone\>"
@@ -416,8 +427,10 @@
 syn region texRefZone		matchgroup=texStatement start="\\\(page\|eq\)ref{"	end="}\|%stopzone\>"	contains=@texRefGroup
 syn region texRefZone		matchgroup=texStatement start="\\v\=ref{"		end="}\|%stopzone\>"	contains=@texRefGroup
 syn match  texRefZone		'\\cite\%([tp]\*\=\)\=' nextgroup=texRefOption,texCite
+syn match  texRefZone		'\\citetext' nextgroup=texRefOption,texFreeCite
 syn region texRefOption	contained	matchgroup=Delimiter start='\[' end=']'		contains=@texRefGroup	nextgroup=texRefOption,texCite
 syn region texCite	contained	matchgroup=Delimiter start='{' end='}'		contains=@texRefGroup
+syn region texFreeCite	contained	matchgroup=Delimiter start='{'rs=s+1 skip="\\\\\|\\[{}]" end='}'		contains=@texMatchGroup
 
 " Handle newcommand, newenvironment : {{{1
 syn match  texNewCmd				"\\newcommand\>"			nextgroup=texCmdName skipwhite skipnl
@@ -441,6 +454,15 @@
 syn match texDefParms  contained		"#[^{]*"	contains=texDefParm	nextgroup=texCmdBody skipwhite skipnl
 syn match  texDefParm  contained		"#\d\+"
 
+" Tex URL Zones: {{{1
+syn region texURLZone		matchgroup=texURLZone start="\\\%(url\|href\){"	end="}\|%stopzone\>"	contains=@texURLGroup
+syn region texURLZone		matchgroup=texURLZone start="\\burl\%(alt\)\={"	end="}\|%stopzone\>"	contains=@texURLGroup
+syn region texURLZone		matchgroup=texURLZone start="\\\%(link\|email\){"	end="}\|%stopzone\>"	contains=@texURLGroup
+
+" Tex Acronym Zones: {{{1
+syn region texAcroZone		matchgroup=texAcroZone start="\\ac\%(fi\|[fls]\=p\=\)\*\={"		end="}\|%stopzone\>"	contains=@texAcroGroup
+syn region texAcroZone		matchgroup=texAcroZone start="\\ac\%(used\|[ls]u\*\=\){"		end="}\|%stopzone\>"	contains=@texAcroGroup
+
 " TeX Lengths: {{{1
 syn match  texLength		"\<\d\+\([.,]\d\+\)\=\s*\(true\)\=\s*\(bp\|cc\|cm\|dd\|em\|ex\|in\|mm\|pc\|pt\|sp\)\>"
 
@@ -510,6 +532,7 @@
   HiLink texTypeStyle		texType
 
    " Basic TeX highlighting groups
+  HiLink texAcroZone		Special
   HiLink texCmdArgs		Number
   HiLink texCmdName		Statement
   HiLink texComment		Comment
@@ -533,6 +556,7 @@
   HiLink texString		String
   HiLink texTodo		Todo
   HiLink texType		Type
+  HiLink texURLZone		Special
   HiLink texZone		PreCondit
 
   delcommand HiLink
--- vim-7.1.314.orig/runtime/syntax/tpp.vim
+++ vim-7.1.314/runtime/syntax/tpp.vim
@@ -1,9 +1,9 @@
 " Vim syntax file
 " Language:	tpp - Text Presentation Program
-" Maintainer:   Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
+" Maintainer:   Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
 " Former Maintainer:	Gerfried Fuchs <alfie@ist.org>
-" Last Change:	$LastChangedDate: 2006-04-16 22:06:40 -0400 (dom, 16 apr 2006) $
-" URL: http://svn.debian.org/wsvn/pkg-vim/trunk/runtime/syntax/tpp.vim?op=file&rev=0&sc=0
+" Last Change:	2007-10-14
+" URL: http://git.debian.org/?p=pkg-vim/vim.git;a=blob_plain;f=runtime/syntax/tpp.vim;hb=debian
 " Filenames:	*.tpp
 " License:	BSD
 "
--- vim-7.1.314.orig/runtime/syntax/xdefaults.vim
+++ vim-7.1.314/runtime/syntax/xdefaults.vim
@@ -76,7 +76,7 @@
 syn match	xdefaultsIncluded	contained "<[^>]*>"
 syn match	xdefaultsInclude	"^\s*#\s*include\>\s*["<]" contains=xdefaultsIncluded
 syn cluster	xdefaultsPreProcGroup	contains=xdefaultsPreProc,xdefaultsIncluded,xdefaultsInclude,xdefaultsDefine
-syn region	xdefaultsDefine		start="^\s*#\s*\(define\|undef\)\>" skip="\\$" end="$" contains=ALLBUT,@xdefaultsPreProcGroup,xdefaultsCommentH,xdefaultsErrorLine
+syn region	xdefaultsDefine		start="^\s*#\s*\(define\|undef\)\>" skip="\\$" end="$" contains=ALLBUT,@xdefaultsPreProcGroup,xdefaultsCommentH,xdefaultsErrorLine,xdefaultsCppOut2
 syn region	xdefaultsPreProc	start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@xdefaultsPreProcGroup,xdefaultsCommentH,xdefaultsErrorLine
 
 
--- vim-7.1.314.orig/runtime/syntax/xpm.vim
+++ vim-7.1.314/runtime/syntax/xpm.vim
@@ -1,7 +1,7 @@
 " Vim syntax file
 " Language:	X Pixmap
 " Maintainer:	Ronald Schild <rs@scutum.de>
-" Last Change:	2001 May 09
+" Last Change:	2008 May 28
 " Version:	5.4n.1
 
 " For version 5.x: Clear all syntax items
@@ -38,9 +38,15 @@
 	 let colors = substitute(s, '"\s*\d\+\s\+\d\+\s\+\(\d\+\).*"', '\1', '')
 	 " get the 4th value: cpp = number of character per pixel
 	 let cpp = substitute(s, '"\s*\d\+\s\+\d\+\s\+\d\+\s\+\(\d\+\).*"', '\1', '')
+	 if cpp =~ '[^0-9]'
+	    break  " if cpp is not made of digits there must be something wrong
+	 endif
 
-	 " highlight the Values string as normal string (no pixel string)
-	 exe 'syn match xpmValues /'.s.'/'
+	 " Highlight the Values string as normal string (no pixel string).
+	 " Only when there is no slash, it would terminate the pattern.
+	 if s !~ '/'
+	    exe 'syn match xpmValues /' . s . '/'
+	 endif
 	 hi link xpmValues String
 
 	 let n = 1		" n = color index
@@ -103,7 +109,7 @@
 	 if color == ""  ||  substitute(color, '.*', '\L&', '') == 'none'
 	    exe 'hi xpmColor'.n.' guifg=bg'
 	    exe 'hi xpmColor'.n.' guibg=NONE'
-	 else
+	 elseif color !~ "'"
 	    exe 'hi xpmColor'.n." guifg='".color."'"
 	    exe 'hi xpmColor'.n." guibg='".color."'"
 	 endif
--- vim-7.1.314.orig/runtime/syntax/xpm2.vim
+++ vim-7.1.314/runtime/syntax/xpm2.vim
@@ -1,7 +1,7 @@
 " Vim syntax file
 " Language:	X Pixmap v2
 " Maintainer:	Steve Wall (hitched97@velnet.com)
-" Last Change:	2001 Apr 25
+" Last Change:	2008 May 28
 " Version:	5.8
 "
 " Made from xpm.vim by Ronald Schild <rs@scutum.de>
@@ -50,9 +50,15 @@
 	let colors = substitute(s, '\s*\d\+\s\+\d\+\s\+\(\d\+\).*', '\1', '')
 	" get the 4th value: cpp = number of character per pixel
 	let cpp = substitute(s, '\s*\d\+\s\+\d\+\s\+\d\+\s\+\(\d\+\).*', '\1', '')
+	if cpp =~ '[^0-9]'
+	  break  " if cpp is not made of digits there must be something wrong
+	endif
 
-	" highlight the Values string as normal string (no pixel string)
-	exe 'syn match xpm2Values /'.s.'/'
+	" Highlight the Values string as normal string (no pixel string).
+	" Only when there is no slash, it would terminate the pattern.
+	if s !~ '/'
+	  exe 'syn match xpm2Values /' . s . '/'
+	endif
 	HiLink xpm2Values Statement
 
 	let n = 1			" n = color index
@@ -118,7 +124,7 @@
 	" if no color or color = "None" show background
 	if color == ""  ||  substitute(color, '.*', '\L&', '') == 'none'
 	  exe 'Hi xpm2Color'.n.' guifg=bg guibg=NONE'
-	else
+	elseif color !~ "'"
 	  exe 'Hi xpm2Color'.n." guifg='".color."' guibg='".color."'"
 	endif
 	let n = n + 1
--- vim-7.1.314.orig/runtime/syntax/gitcommit.vim
+++ vim-7.1.314/runtime/syntax/gitcommit.vim
@@ -0,0 +1,65 @@
+" Vim syntax file
+" Language:	git commit file
+" Maintainer:	Tim Pope <vimNOSPAM@tpope.info>
+" Filenames:	*.git/COMMIT_EDITMSG
+" Last Change:	2008 Apr 09
+
+if exists("b:current_syntax")
+    finish
+endif
+
+syn case match
+syn sync minlines=50
+
+if has("spell")
+    syn spell toplevel
+endif
+
+syn include @gitcommitDiff syntax/diff.vim
+syn region gitcommitDiff start=/\%(^diff --git \)\@=/ end=/^$\|^#\@=/ contains=@gitcommitDiff
+
+syn match   gitcommitFirstLine	"\%^[^#].*"  nextgroup=gitcommitBlank skipnl
+syn match   gitcommitSummary  	"^.\{0,50\}" contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell
+syn match   gitcommitOverflow	".*" contained contains=@Spell
+syn match   gitcommitBlank	"^[^#].*" contained contains=@Spell
+syn match   gitcommitComment	"^#.*"
+syn region  gitcommitHead	start=/^#   / end=/^#$/ contained transparent
+syn match   gitcommitOnBranch	"\%(^# \)\@<=On branch" contained containedin=gitcommitComment nextgroup=gitcommitBranch skipwhite
+syn match   gitcommitBranch	"\S\+" contained
+syn match   gitcommitHeader	"\%(^# \)\@<=.*:$"	contained containedin=gitcommitComment
+
+syn region  gitcommitUntracked	start=/^# Untracked files:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitUntrackedFile fold
+syn match   gitcommitUntrackedFile  "\t\@<=.*"	contained
+
+syn region  gitcommitDiscarded	start=/^# Changed but not updated:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitDiscardedType fold
+syn region  gitcommitSelected	start=/^# Changes to be committed:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitSelectedType fold
+
+syn match   gitcommitDiscardedType	"\t\@<=[a-z][a-z ]*[a-z]: "he=e-2	contained containedin=gitcommitComment nextgroup=gitcommitDiscardedFile skipwhite
+syn match   gitcommitSelectedType	"\t\@<=[a-z][a-z ]*[a-z]: "he=e-2	contained containedin=gitcommitComment nextgroup=gitcommitSelectedFile skipwhite
+syn match   gitcommitDiscardedFile	".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitDiscardedArrow
+syn match   gitcommitSelectedFile	".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitSelectedArrow
+syn match   gitcommitDiscardedArrow	" -> " contained nextgroup=gitcommitDiscardedFile
+syn match   gitcommitSelectedArrow	" -> " contained nextgroup=gitcommitSelectedFile
+
+hi def link gitcommitSummary		Keyword
+hi def link gitcommitComment		Comment
+hi def link gitcommitUntracked		gitcommitComment
+hi def link gitcommitDiscarded		gitcommitComment
+hi def link gitcommitSelected		gitcommitComment
+hi def link gitcommitOnBranch		Comment
+hi def link gitcommitBranch		Special
+hi def link gitcommitDiscardedType	gitcommitType
+hi def link gitcommitSelectedType	gitcommitType
+hi def link gitcommitType		Type
+hi def link gitcommitHeader		PreProc
+hi def link gitcommitUntrackedFile	gitcommitFile
+hi def link gitcommitDiscardedFile	gitcommitFile
+hi def link gitcommitSelectedFile	gitcommitFile
+hi def link gitcommitFile		Constant
+hi def link gitcommitDiscardedArrow	gitcommitArrow
+hi def link gitcommitSelectedArrow	gitcommitArrow
+hi def link gitcommitArrow		gitcommitComment
+"hi def link gitcommitOverflow		Error
+hi def link gitcommitBlank		Error
+
+let b:current_syntax = "gitcommit"
--- vim-7.1.314.orig/runtime/syntax/gitsendemail.vim
+++ vim-7.1.314/runtime/syntax/gitsendemail.vim
@@ -0,0 +1,19 @@
+" Vim syntax file
+" Language:	git send-email message
+" Maintainer:	Tim Pope
+" Filenames:	*.msg.[0-9]* (first line is "From ... # This line is ignored.")
+" Last Change:	2007 Dec 16
+
+if exists("b:current_syntax")
+    finish
+endif
+
+runtime! syntax/mail.vim
+syn case match
+
+syn match   gitsendemailComment "\%^From.*#.*"
+syn match   gitsendemailComment "^GIT:.*"
+
+hi def link gitsendemailComment Comment
+
+let b:current_syntax = "gitsendemail"
--- vim-7.1.314.orig/runtime/syntax/git.vim
+++ vim-7.1.314/runtime/syntax/git.vim
@@ -0,0 +1,67 @@
+" Vim syntax file
+" Language:	generic git output
+" Maintainer:	Tim Pope <vimNOSPAM@tpope.info>
+" Last Change:	2008 Mar 21
+
+if exists("b:current_syntax")
+    finish
+endif
+
+syn case match
+syn sync minlines=50
+
+syn include @gitDiff syntax/diff.vim
+
+syn region gitHead start=/\%^/ end=/^$/
+syn region gitHead start=/\%(^commit \x\{40\}$\)\@=/ end=/^$/
+
+" For git reflog and git show ...^{tree}, avoid sync issues
+syn match gitHead /^\d\{6\} \%(\w\{4} \)\=\x\{40\}\%( [0-3]\)\=\t.*/
+syn match gitHead /^\x\{40\} \x\{40}\t.*/
+
+syn region gitDiff start=/^\%(diff --git \)\@=/ end=/^\%(diff --git \|$\)\@=/ contains=@gitDiff fold
+syn region gitDiff start=/^\%(@@ -\)\@=/ end=/^\%(diff --git \|$\)\@=/ contains=@gitDiff
+
+syn match  gitKeyword /^\%(object\|type\|tag\|commit\|tree\|parent\|encoding\)\>/ contained containedin=gitHead nextgroup=gitHash,gitType skipwhite
+syn match  gitKeyword /^\%(tag\>\|ref:\)/ contained containedin=gitHead nextgroup=gitReference skipwhite
+syn match  gitKeyword /^Merge:/  contained containedin=gitHead nextgroup=gitHashAbbrev skipwhite
+syn match  gitMode    /^\d\{6\}/ contained containedin=gitHead nextgroup=gitType,gitHash skipwhite
+syn match  gitIdentityKeyword /^\%(author\|committer\|tagger\)\>/ contained containedin=gitHead nextgroup=gitIdentity skipwhite
+syn match  gitIdentityHeader /^\%(Author\|Commit\|Tagger\):/ contained containedin=gitHead nextgroup=gitIdentity skipwhite
+syn match  gitDateHeader /^\%(AuthorDate\|CommitDate\|Date\):/ contained containedin=gitHead nextgroup=gitDate skipwhite
+syn match  gitIdentity /\S.\{-\} <[^>]*>/ contained nextgroup=gitDate skipwhite
+syn region gitEmail matchgroup=gitEmailDelimiter start=/</ end=/>/ keepend oneline contained containedin=gitIdentity
+
+syn match  gitReflogHeader /^Reflog:/ contained containedin=gitHead nextgroup=gitReflogMiddle skipwhite
+syn match  gitReflogHeader /^Reflog message:/ contained containedin=gitHead skipwhite
+syn match  gitReflogMiddle /\S\+@{\d\+} (/he=e-2 nextgroup=gitIdentity
+
+syn match  gitDate      /\<\u\l\l \u\l\l \d\=\d \d\d:\d\d:\d\d \d\d\d\d [+-]\d\d\d\d/ contained
+syn match  gitDate      /-\=\d\+ [+-]\d\d\d\d\>/               contained
+syn match  gitDate      /\<\d\+ \l\+ ago\>/                    contained
+syn match  gitType      /\<\%(tag\|commit\|tree\|blob\)\>/     contained nextgroup=gitHash skipwhite
+syn match  gitStage     /\<\d\t\@=/                            contained
+syn match  gitReference /\S\+\S\@!/                            contained
+syn match  gitHash      /\<\x\{40\}\>/                         contained nextgroup=gitIdentity,gitStage skipwhite
+syn match  gitHash      /^\<\x\{40\}\>/ containedin=gitHead contained nextgroup=gitHash skipwhite
+syn match  gitHashAbbrev /\<\x\{4,39\}\.\.\./he=e-3 contained nextgroup=gitHashAbbrev skipwhite
+syn match  gitHashAbbrev /\<\x\{40\}\>/             contained nextgroup=gitHashAbbrev skipwhite
+
+hi def link gitDateHeader        gitIdentityHeader
+hi def link gitIdentityHeader    gitIdentityKeyword
+hi def link gitIdentityKeyword   Label
+hi def link gitReflogHeader      gitKeyword
+hi def link gitKeyword           Keyword
+hi def link gitIdentity          String
+hi def link gitEmailDelimiter    Delimiter
+hi def link gitEmail             Special
+hi def link gitDate              Number
+hi def link gitMode              Number
+hi def link gitHashAbbrev        gitHash
+hi def link gitHash              Identifier
+hi def link gitReflogMiddle      gitReference
+hi def link gitReference         Function
+hi def link gitStage             gitType
+hi def link gitType              Type
+
+let b:current_syntax = "git"
--- vim-7.1.314.orig/runtime/syntax/gitrebase.vim
+++ vim-7.1.314/runtime/syntax/gitrebase.vim
@@ -0,0 +1,31 @@
+" Vim syntax file
+" Language:	git rebase --interactive
+" Maintainer:	Tim Pope <vimNOSPAM@tpope.info>
+" Filenames:	git-rebase-todo
+" Last Change:	2008 Apr 16
+
+if exists("b:current_syntax")
+    finish
+endif
+
+syn case match
+
+syn match   gitrebaseHash   "\v<\x{7,40}>"                             contained
+syn match   gitrebaseCommit "\v<\x{7,40}>"  nextgroup=gitrebaseSummary skipwhite
+syn match   gitrebasePick   "\v^p%(ick)=>"   nextgroup=gitrebaseCommit skipwhite
+syn match   gitrebaseEdit   "\v^e%(dit)=>"   nextgroup=gitrebaseCommit skipwhite
+syn match   gitrebaseSquash "\v^s%(quash)=>" nextgroup=gitrebaseCommit skipwhite
+syn match   gitrebaseSummary ".*"               contains=gitrebaseHash contained
+syn match   gitrebaseComment "^#.*"             contains=gitrebaseHash
+syn match   gitrebaseSquashError "\v%^s%(quash)=>" nextgroup=gitrebaseCommit skipwhite
+
+hi def link gitrebaseCommit         gitrebaseHash
+hi def link gitrebaseHash           Identifier
+hi def link gitrebasePick           Statement
+hi def link gitrebaseEdit           PreProc
+hi def link gitrebaseSquash         Type
+hi def link gitrebaseSummary        String
+hi def link gitrebaseComment        Comment
+hi def link gitrebaseSquashError     Error
+
+let b:current_syntax = "gitrebase"
--- vim-7.1.314.orig/runtime/syntax/gitconfig.vim
+++ vim-7.1.314/runtime/syntax/gitconfig.vim
@@ -0,0 +1,37 @@
+" Vim syntax file
+" Language:	git config file
+" Maintainer:	Tim Pope <vimNOSPAM@tpope.info>
+" Filenames:	gitconfig, .gitconfig, *.git/config
+" Last Change:	2007 Dec 16
+
+if exists("b:current_syntax")
+    finish
+endif
+
+syn case ignore
+setlocal iskeyword+=-
+setlocal iskeyword-=_
+
+syn match   gitconfigComment	"[#;].*"
+syn match   gitconfigSection	"\%(^\s*\)\@<=\[[a-z0-9.-]\+\]"
+syn match   gitconfigSection	'\%(^\s*\)\@<=\[[a-z0-9.-]\+ \+\"\%([^\\"]\|\\.\)*"\]'
+syn match   gitconfigVariable	 "\%(^\s*\)\@<=\a\k*\%(\s*\%([=#;]\|$\)\)\@=" nextgroup=gitconfigAssignment skipwhite
+syn region  gitconfigAssignment  matchgroup=gitconfigNone start=+=\s*+ skip=+\\+ end=+\s*$+ contained contains=gitconfigBoolean,gitconfigNumber,gitConfigString,gitConfigEscape,gitConfigError,gitconfigComment keepend
+syn keyword gitconfigBoolean true false yes no contained
+syn match   gitconfigNumber  "\d\+" contained
+syn region  gitconfigString  matchgroup=gitconfigDelim start=+"+ skip=+\\+ end=+"+ matchgroup=gitconfigError end=+[^\\"]\%#\@!$+ contained contains=gitconfigEscape,gitconfigEscapeError
+syn match   gitconfigError  +\\.+	 contained
+syn match   gitconfigEscape +\\[\\"ntb]+ contained
+syn match   gitconfigEscape +\\$+	 contained
+
+hi def link gitconfigComment		Comment
+hi def link gitconfigSection		Keyword
+hi def link gitconfigVariable		Identifier
+hi def link gitconfigBoolean		Boolean
+hi def link gitconfigNumber		Number
+hi def link gitconfigString		String
+hi def link gitconfigDelim		Delimiter
+hi def link gitconfigEscape		Delimiter
+hi def link gitconfigError		Error
+
+let b:current_syntax = "gitconfig"
--- vim-7.1.314.orig/runtime/tools/mve.awk
+++ vim-7.1.314/runtime/tools/mve.awk
@@ -1,4 +1,4 @@
-#!/usr/bin/nawk -f
+#!/usr/bin/awk -f
 #
 # Change "nawk" to "awk" or "gawk" if you get errors.
 #
--- vim-7.1.314.orig/runtime/tools/vimspell.sh
+++ vim-7.1.314/runtime/tools/vimspell.sh
@@ -22,7 +22,7 @@
 # create a file in the safest way possible.
 if test "$OUTFILE" = none; then
         OUTFILE=$tmp/vimspell$$
-	[ -e $OUTFILE ] && { echo "Cannot use temporary file $OUTFILE, it already exists!; exit 1 ; } 
+	[ -e $OUTFILE ] && { echo "Cannot use temporary file $OUTFILE, it already exists!"; exit 1 ; } 
         (umask 077; touch $OUTFILE)
 fi
 # Note the copy of vimspell cannot be deleted on exit since it is
--- vim-7.1.314.orig/src/Makefile
+++ vim-7.1.314/src/Makefile
@@ -1763,7 +1763,6 @@
 	  rm -f $(DEST_BIN)/$(VIMNAME).rm; \
 	fi
 	$(INSTALL_PROG) $(VIMTARGET) $(DEST_BIN)
-	$(STRIP) $(DEST_BIN)/$(VIMTARGET)
 	chmod $(BINMOD) $(DEST_BIN)/$(VIMTARGET)
 # may create a link to the new executable from /usr/bin/vi
 	-$(LINKIT)
@@ -1896,7 +1895,6 @@
 	  rm -f $(DEST_BIN)/xxd.rm; \
 	fi
 	$(INSTALL_PROG) xxd/xxd$(EXEEXT) $(DEST_BIN)
-	$(STRIP) $(DEST_BIN)/xxd$(EXEEXT)
 	chmod $(BINMOD) $(DEST_BIN)/xxd$(EXEEXT)
 	-$(SHELL) ./installman.sh xxd $(DEST_MAN) "" $(INSTALLMANARGS)
 
--- vim-7.1.314.orig/src/configure.in
+++ vim-7.1.314/src/configure.in
@@ -313,6 +313,21 @@
    AC_MSG_RESULT(yes)
 fi
 
+dnl vim: set sw=2 tw=78 fo+=l:
+dnl Link with -lselinux for SELinux stuff; if not found
+AC_MSG_CHECKING(--disable-selinux argument)
+AC_ARG_ENABLE(selinux,
+	[  --disable-selinux	  Don't check for SELinux support.],
+	, [enable_selinux="yes"])
+if test "$enable_selinux" = "yes"; then
+  AC_MSG_RESULT(no)
+  AC_CHECK_LIB(selinux, is_selinux_enabled,
+	  [LIBS="$LIBS -lselinux"
+	   AC_DEFINE(HAVE_SELINUX)])
+else
+   AC_MSG_RESULT(yes)
+fi
+
 dnl Check user requested features.
 
 AC_MSG_CHECKING(--with-features argument)
--- vim-7.1.314.orig/src/eval.c
+++ vim-7.1.314/src/eval.c
@@ -456,6 +456,7 @@
 static int get_func_tv __ARGS((char_u *name, int len, typval_T *rettv, char_u **arg, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
 static int call_func __ARGS((char_u *name, int len, typval_T *rettv, int argcount, typval_T *argvars, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
 static void emsg_funcname __ARGS((char *ermsg, char_u *name));
+static int non_zero_arg __ARGS((typval_T *argvars));
 
 static void f_add __ARGS((typval_T *argvars, typval_T *rettv));
 static void f_append __ARGS((typval_T *argvars, typval_T *rettv));
@@ -7235,7 +7236,7 @@
     {"setreg",		2, 3, f_setreg},
     {"settabwinvar",	4, 4, f_settabwinvar},
     {"setwinvar",	3, 3, f_setwinvar},
-    {"shellescape",	1, 1, f_shellescape},
+    {"shellescape",	1, 2, f_shellescape},
     {"simplify",	1, 1, f_simplify},
     {"sort",		1, 2, f_sort},
     {"soundfold",	1, 1, f_soundfold},
@@ -7708,6 +7709,20 @@
 	vim_free(p);
 }
 
+/*
+ * Return TRUE for a non-zero Number and a non-empty String.
+ */
+    static int
+non_zero_arg(argvars)
+    typval_T	*argvars;
+{
+    return ((argvars[0].v_type == VAR_NUMBER
+		&& argvars[0].vval.v_number != 0)
+	    || (argvars[0].v_type == VAR_STRING
+		&& argvars[0].vval.v_string != NULL
+		&& *argvars[0].vval.v_string != NUL));
+}
+
 /*********************************************
  * Implementation of the built-in functions
  */
@@ -15038,7 +15053,8 @@
     typval_T	*argvars;
     typval_T	*rettv;
 {
-    rettv->vval.v_string = vim_strsave_shellescape(get_tv_string(&argvars[0]));
+    rettv->vval.v_string = vim_strsave_shellescape(
+		       get_tv_string(&argvars[0]), non_zero_arg(&argvars[1]));
     rettv->v_type = VAR_STRING;
 }
 
@@ -16548,10 +16564,7 @@
     rettv->vval.v_string = vim_strsave(str);
 
     /* A non-zero number or non-empty string argument: reset mode. */
-    if ((argvars[0].v_type == VAR_NUMBER
-		&& argvars[0].vval.v_number != 0)
-	    || (argvars[0].v_type == VAR_STRING
-		&& *get_tv_string(&argvars[0]) != NUL))
+    if (non_zero_arg(&argvars[0]))
 	curbuf->b_visual_mode_eval = NUL;
 #else
     rettv->vval.v_number = 0; /* return anything, it won't work anyway */
--- vim-7.1.314.orig/src/ex_docmd.c
+++ vim-7.1.314/src/ex_docmd.c
@@ -9325,6 +9325,58 @@
 }
 
 /*
+ * Check "str" for starting with a special cmdline variable.
+ * If found return one of the SPEC_ values and set "*usedlen" to the length of
+ * the variable.  Otherwise return -1 and "*usedlen" is unchanged.
+ */
+    int
+find_cmdline_var(src, usedlen)
+    char_u	*src;
+    int		*usedlen;
+{
+    int		len;
+    int		i;
+    static char *(spec_str[]) = {
+		    "%",
+#define SPEC_PERC   0
+		    "#",
+#define SPEC_HASH   1
+		    "<cword>",		/* cursor word */
+#define SPEC_CWORD  2
+		    "<cWORD>",		/* cursor WORD */
+#define SPEC_CCWORD 3
+		    "<cfile>",		/* cursor path name */
+#define SPEC_CFILE  4
+		    "<sfile>",		/* ":so" file name */
+#define SPEC_SFILE  5
+#ifdef FEAT_AUTOCMD
+		    "<afile>",		/* autocommand file name */
+# define SPEC_AFILE 6
+		    "<abuf>",		/* autocommand buffer number */
+# define SPEC_ABUF  7
+		    "<amatch>",		/* autocommand match name */
+# define SPEC_AMATCH 8
+#endif
+#ifdef FEAT_CLIENTSERVER
+		    "<client>"
+# define SPEC_CLIENT 9
+#endif
+    };
+#define SPEC_COUNT  (sizeof(spec_str) / sizeof(char *))
+
+    for (i = 0; i < SPEC_COUNT; ++i)
+    {
+	len = (int)STRLEN(spec_str[i]);
+	if (STRNCMP(src, spec_str[i], len) == 0)
+	{
+	    *usedlen = len;
+	    return i;
+	}
+    }
+    return -1;
+}
+
+/*
  * Evaluate cmdline variables.
  *
  * change '%'	    to curbuf->b_ffname
@@ -9364,34 +9416,6 @@
 #ifdef FEAT_MODIFY_FNAME
     int		skip_mod = FALSE;
 #endif
-    static char *(spec_str[]) =
-	{
-		    "%",
-#define SPEC_PERC   0
-		    "#",
-#define SPEC_HASH   1
-		    "<cword>",		/* cursor word */
-#define SPEC_CWORD  2
-		    "<cWORD>",		/* cursor WORD */
-#define SPEC_CCWORD 3
-		    "<cfile>",		/* cursor path name */
-#define SPEC_CFILE  4
-		    "<sfile>",		/* ":so" file name */
-#define SPEC_SFILE  5
-#ifdef FEAT_AUTOCMD
-		    "<afile>",		/* autocommand file name */
-# define SPEC_AFILE 6
-		    "<abuf>",		/* autocommand buffer number */
-# define SPEC_ABUF  7
-		    "<amatch>",		/* autocommand match name */
-# define SPEC_AMATCH 8
-#endif
-#ifdef FEAT_CLIENTSERVER
-		    "<client>"
-# define SPEC_CLIENT 9
-#endif
-		};
-#define SPEC_COUNT  (sizeof(spec_str) / sizeof(char *))
 
 #if defined(FEAT_AUTOCMD) || defined(FEAT_CLIENTSERVER)
     char_u	strbuf[30];
@@ -9404,13 +9428,8 @@
     /*
      * Check if there is something to do.
      */
-    for (spec_idx = 0; spec_idx < SPEC_COUNT; ++spec_idx)
-    {
-	*usedlen = (int)STRLEN(spec_str[spec_idx]);
-	if (STRNCMP(src, spec_str[spec_idx], *usedlen) == 0)
-	    break;
-    }
-    if (spec_idx == SPEC_COUNT)	    /* no match */
+    spec_idx = find_cmdline_var(src, usedlen);
+    if (spec_idx < 0)	/* no match */
     {
 	*usedlen = 1;
 	return NULL;
--- vim-7.1.314.orig/src/ex_getln.c
+++ vim-7.1.314/src/ex_getln.c
@@ -3708,20 +3708,38 @@
     char_u *fname;
     int    shell;
 {
+    char_u	*p;
 #ifdef BACKSLASH_IN_FILENAME
     char_u	buf[20];
     int		j = 0;
-    char_u	*p;
 
     /* Don't escape '[' and '{' if they are in 'isfname'. */
     for (p = PATH_ESC_CHARS; *p != NUL; ++p)
 	if ((*p != '[' && *p != '{') || !vim_isfilec(*p))
 	    buf[j++] = *p;
     buf[j] = NUL;
-    return vim_strsave_escaped(fname, buf);
+    p = vim_strsave_escaped(fname, buf);
 #else
-    return vim_strsave_escaped(fname, shell ? SHELL_ESC_CHARS : PATH_ESC_CHARS);
+    p = vim_strsave_escaped(fname, shell ? SHELL_ESC_CHARS : PATH_ESC_CHARS);
+    if (shell && csh_like_shell() && p != NULL)
+    {
+	char_u	    *s;
+
+	/* For csh and similar shells need to put two backslashes before '!'.
+	 * One is taken by Vim, one by the shell. */
+	s = vim_strsave_escaped(p, (char_u *)"!");
+	vim_free(p);
+	p = s;
+    }
+    return p;
 #endif
+
+    /* '>' and '+' are special at the start of some commands, e.g. ":edit" and
+     * ":write".  "cd -" has a special meaning. */
+    if (*p == '>' || *p == '+' || (*p == '-' && p[1] == NUL))
+	escape_fname(&p);
+
+    return p;
 }
 
 /*
--- vim-7.1.314.orig/src/gui_gtk.c
+++ vim-7.1.314/src/gui_gtk.c
@@ -1195,7 +1195,10 @@
  * Implementation of the file selector related stuff
  */
 #if defined(HAVE_GTK2) && GTK_CHECK_VERSION(2,4,0)
-# define USE_FILE_CHOOSER
+/* This has been disabled, because the GTK library rewrites
+ * ~/.recently-used.xbel every time the main loop is quit.  For Vim that means
+ * on just about any event. */
+/* # define USE_FILE_CHOOSER */
 #endif
 
 #ifndef USE_FILE_CHOOSER
--- vim-7.1.314.orig/src/if_python.c
+++ vim-7.1.314/src/if_python.c
@@ -380,6 +380,7 @@
 static void PythonIO_Flush(void);
 static int PythonIO_Init(void);
 static int PythonMod_Init(void);
+static void Python_FixPath(void);
 
 /* Utility functions for the vim/python interface
  * ----------------------------------------------
@@ -517,6 +518,11 @@
 	if (PythonMod_Init())
 	    goto fail;
 
+	/* Remove empty elements from sys.path since that causes the PWD to be
+	 * used for imports, possibly masking system libraries and/or running
+	 * arbitrary code. */
+	Python_FixPath();
+
 	/* the first python thread is vim's, release the lock */
 	Python_SaveThread();
 
@@ -2360,6 +2366,28 @@
     return 0;
 }
 
+    static void
+Python_FixPath(void)
+{
+	PyObject *sys = PyImport_ImportModule("sys");
+	PyObject *sysdict = PyModule_GetDict(sys);
+	PyObject *path = PyDict_GetItemString(sysdict, "path");
+	PyObject *newpath = PyList_New(0);
+	if (newpath != NULL) {
+	    Py_INCREF(newpath);
+	    PyInt n = PyList_Size(path);
+	    PyInt i;
+	    for (i = 0; i < n; i++) {
+		PyObject *item = PyList_GetItem(path, i);
+		if (strlen(PyString_AsString(item)) != 0) {
+		    PyList_Append(newpath, PyList_GetItem(path, i));
+		}
+	    }
+	    PyDict_SetItemString(sysdict, "path", newpath);
+	    Py_DECREF(newpath);
+	}
+}
+
 /*************************************************************************
  * 4. Utility functions for handling the interface between Vim and Python.
  */
--- vim-7.1.314.orig/src/main.c
+++ vim-7.1.314/src/main.c
@@ -89,6 +89,9 @@
 #ifdef FEAT_DIFF
     int		diff_mode;		/* start with 'diff' set */
 #endif
+#ifdef SYS_TINYRC_FILE
+    int		vi_mode;		/* started as "vi" */
+#endif
 } mparm_T;
 
 /* Values for edit_type. */
@@ -1470,6 +1473,10 @@
     }
     else if (STRNICMP(initstr, "vim", 3) == 0)
 	initstr += 3;
+#ifdef SYS_TINYRC_FILE
+    else if (STRNICMP(initstr, "vi", 2) == 0)
+	parmp->vi_mode = TRUE;
+#endif
 
     /* Catch "[r][g]vimdiff" and "[r][g]viewdiff". */
     if (STRICMP(initstr, "diff") == 0)
@@ -2739,7 +2746,12 @@
 	 * Get system wide defaults, if the file name is defined.
 	 */
 #ifdef SYS_VIMRC_FILE
-	(void)do_source((char_u *)SYS_VIMRC_FILE, FALSE, DOSO_NONE);
+# if defined(SYS_TINYRC_FILE) && defined(TINY_VIMRC)
+	if (parmp->vi_mode)
+	    (void)do_source((char_u *)SYS_TINYRC_FILE, FALSE, DOSO_NONE);
+	else
+# endif
+	    (void)do_source((char_u *)SYS_VIMRC_FILE, FALSE, DOSO_NONE);
 #endif
 #ifdef MACOS_X
 	(void)do_source((char_u *)"$VIMRUNTIME/macmap.vim", FALSE, DOSO_NONE);
--- vim-7.1.314.orig/src/mbyte.c
+++ vim-7.1.314/src/mbyte.c
@@ -2530,7 +2530,6 @@
     return (int)(p - q);
 }
 
-#if defined(FEAT_EVAL) || defined(PROTO)
 /*
  * Copy a character from "*fp" to "*tp" and advance the pointers.
  */
@@ -2545,7 +2544,6 @@
     *tp += l;
     *fp += l;
 }
-#endif
 
 /*
  * Return the offset from "p" to the first byte of a character.  When "p" is
--- vim-7.1.314.orig/src/misc2.c
+++ vim-7.1.314/src/misc2.c
@@ -1260,21 +1260,41 @@
     return escaped_string;
 }
 
-#if defined(FEAT_EVAL) || defined(PROTO)
+/*
+ * Return TRUE when 'shell' has "csh" in the tail.
+ */
+    int
+csh_like_shell()
+{
+    return (strstr((char *)gettail(p_sh), "csh") != NULL);
+}
+
 /*
  * Escape "string" for use as a shell argument with system().
  * This uses single quotes, except when we know we need to use double qoutes
  * (MS-DOS and MS-Windows without 'shellslash' set).
+ * Escape a newline, depending on the 'shell' option.
+ * When "do_special" is TRUE also replace "!", "%", "#" and things starting
+ * with "<" like "<cfile>".
  * Returns the result in allocated memory, NULL if we have run out.
  */
     char_u *
-vim_strsave_shellescape(string)
+vim_strsave_shellescape(string, do_special)
     char_u	*string;
+    int		do_special;
 {
     unsigned	length;
     char_u	*p;
     char_u	*d;
     char_u	*escaped_string;
+    int		l;
+    int		csh_like;
+
+    /* Only csh and similar shells expand '!' within single quotes.  For sh and
+     * the like we must not put a backslash before it, it will be taken
+     * literally.  If do_special is set the '!' will be escaped twice.
+     * Csh also needs to have "\n" escaped twice when do_special is set. */
+    csh_like = csh_like_shell();
 
     /* First count the number of extra bytes required. */
     length = (unsigned)STRLEN(string) + 3;  /* two quotes and a trailing NUL */
@@ -1290,6 +1310,17 @@
 # endif
 	if (*p == '\'')
 	    length += 3;		/* ' => '\'' */
+	if (*p == '\n' || (*p == '!' && (csh_like || do_special)))
+	{
+	    ++length;			/* insert backslash */
+	    if (csh_like && do_special)
+		++length;		/* insert backslash */
+	}
+	if (do_special && find_cmdline_var(p, &l) >= 0)
+	{
+	    ++length;			/* insert backslash */
+	    p += l - 1;
+	}
     }
 
     /* Allocate memory for the result and fill it. */
@@ -1330,6 +1361,20 @@
 		++p;
 		continue;
 	    }
+	    if (*p == '\n' || (*p == '!' && (csh_like || do_special)))
+	    {
+		*d++ = '\\';
+		if (csh_like && do_special)
+		    *d++ = '\\';
+		*d++ = *p++;
+		continue;
+	    }
+	    if (do_special && find_cmdline_var(p, &l) >= 0)
+	    {
+		*d++ = '\\';		/* insert backslash */
+		while (--l >= 0)	/* copy the var */
+		    *d++ = *p++;
+	    }
 
 	    MB_COPY_CHAR(p, d);
 	}
@@ -1346,7 +1391,6 @@
 
     return escaped_string;
 }
-#endif
 
 /*
  * Like vim_strsave(), but make all characters uppercase.
--- vim-7.1.314.orig/src/normal.c
+++ vim-7.1.314/src/normal.c
@@ -5434,6 +5434,11 @@
 		STRCPY(buf, "he! ");
 	    else
 	    {
+		/* An external command will probably use an argument starting
+		 * with "-" as an option.  To avoid trouble we skip the "-". */
+		while (*ptr == '-')
+		    ++ptr;
+
 		/* When a count is given, turn it into a range.  Is this
 		 * really what we want? */
 		isman = (STRCMP(kp, "man") == 0);
@@ -5476,37 +5481,60 @@
     /*
      * Now grab the chars in the identifier
      */
-    if (cmdchar == '*')
-	aux_ptr = (char_u *)(p_magic ? "/.*~[^$\\" : "/^$\\");
-    else if (cmdchar == '#')
-	aux_ptr = (char_u *)(p_magic ? "/?.*~[^$\\" : "/?^$\\");
-    else if (cmdchar == 'K' && !kp_help)
-	aux_ptr = (char_u *)" \t\\\"|!";
-    else
-	/* Don't escape spaces and Tabs in a tag with a backslash */
-	aux_ptr = (char_u *)"\\|\"";
-
-    p = buf + STRLEN(buf);
-    while (n-- > 0)
-    {
-	/* put a backslash before \ and some others */
-	if (vim_strchr(aux_ptr, *ptr) != NULL)
-	    *p++ = '\\';
-#ifdef FEAT_MBYTE
-	/* When current byte is a part of multibyte character, copy all bytes
-	 * of that character. */
-	if (has_mbyte)
+    if (cmdchar == 'K' && !kp_help)
+    {
+	/* Use only the chars in the identifier, instead of the whole line */
+	char_u s[n+1];
+	vim_strncpy(s, ptr, n);
+	/* Escape the argument properly for a shell command */
+	p = vim_strsave_shellescape(s, TRUE);
+	if (p == NULL)
 	{
-	    int i;
-	    int len = (*mb_ptr2len)(ptr) - 1;
-
-	    for (i = 0; i < len && n >= 1; ++i, --n)
-		*p++ = *ptr++;
+	    vim_free(buf);
+	    return;
 	}
+	buf = (char_u *)vim_realloc(buf, STRLEN(buf) + STRLEN(p) + 1);
+	if (buf == NULL)
+	{
+	    vim_free(buf);
+	    vim_free(p);
+	    return;
+	}
+	STRCAT(buf, p);
+	vim_free(p);
+    }
+    else
+    {
+	if (cmdchar == '*')
+	    aux_ptr = (char_u *)(p_magic ? "/.*~[^$\\" : "/^$\\");
+	else if (cmdchar == '#')
+	    aux_ptr = (char_u *)(p_magic ? "/?.*~[^$\\" : "/?^$\\");
+	else
+	    /* Don't escape spaces and Tabs in a tag with a backslash */
+	    aux_ptr = (char_u *)"\\|\"\n*?[";
+
+	p = buf + STRLEN(buf);
+	while (n-- > 0)
+	{
+	    /* put a backslash before \ and some others */
+	    if (vim_strchr(aux_ptr, *ptr) != NULL)
+		*p++ = '\\';
+#ifdef FEAT_MBYTE
+	    /* When current byte is a part of multibyte character, copy all
+	     * bytes of that character. */
+	    if (has_mbyte)
+	    {
+		int i;
+		int len = (*mb_ptr2len)(ptr) - 1;
+
+		for (i = 0; i < len && n >= 1; ++i, --n)
+		    *p++ = *ptr++;
+	    }
 #endif
-	*p++ = *ptr++;
+	    *p++ = *ptr++;
+	}
+	*p = NUL;
     }
-    *p = NUL;
 
     /*
      * Execute the command.
--- vim-7.1.314.orig/src/option.c
+++ vim-7.1.314/src/option.c
@@ -10136,7 +10136,7 @@
 {
     char_u  *p;
     char_u  *p2;
-    int	    from, to;
+    int	    from=NUL, to=NUL;
 
     langmap_init();			    /* back to one-to-one map first */
 
@@ -10154,6 +10154,11 @@
 	    p2 = NULL;	    /* aAbBcCdD form, p2 is NULL */
 	while (p[0])
 	{
+	    if (p[0] == ',')
+	    {
+		++p;
+		break;
+	    }
 	    if (p[0] == '\\' && p[1] != NUL)
 		++p;
 #ifdef FEAT_MBYTE
@@ -10164,23 +10169,29 @@
 	    if (p2 == NULL)
 	    {
 		mb_ptr_adv(p);
-		if (p[0] == '\\')
-		    ++p;
+		if (p[0] != ',')
+		{
+		    if (p[0] == '\\')
+			++p;
 #ifdef FEAT_MBYTE
-		to = (*mb_ptr2char)(p);
+		    to = (*mb_ptr2char)(p);
 #else
-		to = p[0];
+		    to = p[0];
 #endif
+		}
 	    }
 	    else
 	    {
-		if (p2[0] == '\\')
-		    ++p2;
+		if (p2[0] != ',')
+		{
+		    if (p2[0] == '\\')
+			++p2;
 #ifdef FEAT_MBYTE
-		to = (*mb_ptr2char)(p2);
+		    to = (*mb_ptr2char)(p2);
 #else
-		to = p2[0];
+		    to = p2[0];
 #endif
+		}
 	    }
 	    if (to == NUL)
 	    {
--- vim-7.1.314.orig/src/os_unix.h
+++ vim-7.1.314/src/os_unix.h
@@ -237,6 +237,9 @@
 /*
  * Unix system-dependent file names
  */
+#ifndef SYS_TINYRC_FILE
+# define SYS_TINYRC_FILE "$VIM/vimrc.tiny"
+#endif
 #ifndef SYS_VIMRC_FILE
 # define SYS_VIMRC_FILE "$VIM/vimrc"
 #endif
--- vim-7.1.314.orig/src/po/de.po
+++ vim-7.1.314/src/po/de.po
@@ -1700,7 +1700,7 @@
 "&Load File"
 msgstr ""
 "&OK\n"
-"&Lese Datei"
+"&Lies Datei"
 
 #, c-format
 msgid "E462: Could not prepare for reloading \"%s\""
--- vim-7.1.314.orig/src/po/zh_TW.UTF-8.po
+++ vim-7.1.314/src/po/zh_TW.UTF-8.po
@@ -7,8 +7,6 @@
 # FIRST RELEASE Thu Jun 14 14:24:17 CST 2001
 # MAINTAINER: Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
 #
-# Last update: $LastChangedDate: 2006-04-16 22:06:40 -0400 (dom, 16 apr 2006) $
-#
 # XXX This file is in need of a new maintainer, Debian VIM Maintainers maintain
 #     it only because patches have been submitted for it by Debian users and the
 #     former maintainer was MIA (Missing In Action), taking over its
@@ -705,7 +703,7 @@
 
 #, c-format
 msgid "E661: Sorry, no '%s' help for %s"
-msgstr "E149: æŠ±æ­‰, æ²’æœ‰é—œæ–¼ %s-%s çš„èªªæ˜Ž"
+msgstr "E661: æŠ±æ­‰, æ²’æœ‰é—œæ–¼ %s-%s çš„èªªæ˜Ž"
 
 #, c-format
 msgid "E149: Sorry, no help for %s"
@@ -1684,7 +1682,7 @@
 msgstr "E231: ä¸æ­£ç¢ºçš„ 'guifontwide'"
 
 msgid "E599: Value of 'imactivatekey' is invalid"
-msgstr "E559: 'imactivatekey' çš„å€¼ä¸æ­£ç¢º"
+msgstr "E599: 'imactivatekey' çš„å€¼ä¸æ­£ç¢º"
 
 #, c-format
 msgid "E254: Cannot allocate color %s"
@@ -4011,7 +4009,7 @@
 
 #, c-format
 msgid "E57: %s+ operand could be empty"
-msgstr "E56: %s+ é‹ç®—å…ƒå¯ä»¥æ˜¯ç©ºçš„"
+msgstr "E57: %s+ é‹ç®—å…ƒå¯ä»¥æ˜¯ç©ºçš„"
 
 #, c-format
 msgid "E59: invalid character after %s@"
@@ -4937,7 +4935,7 @@
 
 #, c-format
 msgid "E235: Unknown font: %s"
-msgstr "ä¸æ­£ç¢ºçš„å­—åž‹åç¨±: %s"
+msgstr "E235: ä¸æ­£ç¢ºçš„å­—åž‹åç¨±: %s"
 
 #, c-format
 msgid "E236: Font \"%s\" is not fixed-width"
--- vim-7.1.314.orig/src/proto/ex_docmd.pro
+++ vim-7.1.314/src/proto/ex_docmd.pro
@@ -46,6 +46,7 @@
 FILE *open_exfile __ARGS((char_u *fname, int forceit, char *mode));
 void update_topline_cursor __ARGS((void));
 void exec_normal_cmd __ARGS((char_u *cmd, int remap, int silent));
+int find_cmdline_var __ARGS((char_u *src, int *usedlen));
 char_u *eval_vars __ARGS((char_u *src, char_u *srcstart, int *usedlen, linenr_T *lnump, char_u **errormsg, int *escaped));
 char_u *expand_sfile __ARGS((char_u *arg));
 int put_eol __ARGS((FILE *fd));
--- vim-7.1.314.orig/src/proto/misc2.pro
+++ vim-7.1.314/src/proto/misc2.pro
@@ -29,7 +29,8 @@
 char_u *vim_strnsave __ARGS((char_u *string, int len));
 char_u *vim_strsave_escaped __ARGS((char_u *string, char_u *esc_chars));
 char_u *vim_strsave_escaped_ext __ARGS((char_u *string, char_u *esc_chars, int cc, int bsl));
-char_u *vim_strsave_shellescape __ARGS((char_u *string));
+int csh_like_shell __ARGS((void));
+char_u *vim_strsave_shellescape __ARGS((char_u *string, int do_special));
 char_u *vim_strsave_up __ARGS((char_u *string));
 char_u *vim_strnsave_up __ARGS((char_u *string, int len));
 void vim_strup __ARGS((char_u *p));
--- vim-7.1.314.orig/src/screen.c
+++ vim-7.1.314/src/screen.c
@@ -5445,8 +5445,7 @@
 
     while (*s != NUL)
     {
-	if (skip_status_match_char(xp, s))
-	    ++s;
+	s += skip_status_match_char(xp, s);
 	len += ptr2cells(s);
 	mb_ptr_adv(s);
     }
@@ -5455,7 +5454,7 @@
 }
 
 /*
- * Return TRUE for characters that are not displayed in a status match.
+ * Return the number of characters that should be skipped in a status match.
  * These are backslashes used for escaping.  Do show backslashes in help tags.
  */
     static int
@@ -5463,13 +5462,21 @@
     expand_T	*xp;
     char_u	*s;
 {
-    return ((rem_backslash(s) && xp->xp_context != EXPAND_HELP)
+    if ((rem_backslash(s) && xp->xp_context != EXPAND_HELP)
 #ifdef FEAT_MENU
 	    || ((xp->xp_context == EXPAND_MENUS
 		    || xp->xp_context == EXPAND_MENUNAMES)
 			  && (s[0] == '\t' || (s[0] == '\\' && s[1] != NUL)))
 #endif
-	   );
+	   )
+    {
+#ifndef BACKSLASH_IN_FILENAME
+	if (xp->xp_shell && csh_like_shell() && s[1] == '\\' && s[2] == '!')
+	    return 2;
+#endif
+	return 1;
+    }
+    return 0;
 }
 
 /*
@@ -5607,8 +5614,7 @@
 #endif
 	    for ( ; *s != NUL; ++s)
 	{
-	    if (skip_status_match_char(xp, s))
-		++s;
+	    s += skip_status_match_char(xp, s);
 	    clen += ptr2cells(s);
 #ifdef FEAT_MBYTE
 	    if (has_mbyte && (l = (*mb_ptr2len)(s)) > 1)
--- vim-7.1.314.orig/src/spell.c
+++ vim-7.1.314/src/spell.c
@@ -2945,7 +2945,7 @@
 
 /*
  * Read a string of length "cnt" from "fd" into allocated memory.
- * Returns NULL when out of memory.
+ * Returns NULL when out of memory or unable to read that many bytes.
  */
     static char_u *
 read_string(fd, cnt)
@@ -2954,16 +2954,30 @@
 {
     char_u	*str;
     int		i;
+    int		c;
 
     /* allocate memory */
     str = alloc((unsigned)cnt + 1);
     if (str != NULL)
     {
-	/* Read the string.  Doesn't check for truncated file. */
+	/* Read the string.  Quit when running into the EOF. */
 	for (i = 0; i < cnt; ++i)
-	    str[i] = getc(fd);
+	{
+	    c = getc(fd);
+	    if (c == EOF)
+	    {
+		vim_free(str);
+		return NULL;
+	    }
+	    str[i] = c;
+	}
 	str[i] = NUL;
     }
+    /* Realloc to how much memory we actually used if we didn't need all the
+     * initial memory alloc asked for. */
+    if (i < cnt) {
+	str = vim_realloc(str, (unsigned)i + 1);
+    }
     return str;
 }
 
@@ -3291,6 +3305,7 @@
 {
     int		done = 0;
     int		i;
+    int		c;
     char_u	word[MAXWLEN];
 
     while (done < len)
@@ -3298,7 +3313,10 @@
 	/* Read one word at a time. */
 	for (i = 0; ; ++i)
 	{
-	    word[i] = getc(fd);
+	    c = getc(fd);
+	    if (c == EOF)
+		return SP_TRUNCERROR;
+	    word[i] = c;
 	    if (word[i] == NUL)
 		break;
 	    if (i == MAXWLEN - 1)
@@ -3545,6 +3563,11 @@
     while (todo-- > 0)
     {
 	c = getc(fd);					/* <compflags> */
+	if (c == EOF)
+	{
+	    vim_free(pat);
+	    return SP_TRUNCERROR;
+	}
 
 	/* Add all flags to "sl_compallflags". */
 	if (vim_strchr((char_u *)"+*[]/", c) == NULL
--- vim-7.1.314.orig/src/testdir/test11.in
+++ vim-7.1.314/src/testdir/test11.in
@@ -32,21 +32,21 @@
 :w>>test.out                    " Append it to the output file
 :au! FileAppendPre
 :" setup autocommands to decompress before reading and re-compress afterwards
-:au BufReadPre      *.gz   !gzip -d <afile>
+:au BufReadPre      *.gz   exe '!gzip -d ' . shellescape(expand("<afile>"))
 :au BufReadPre      *.gz   call rename(expand("<afile>:r"), expand("<afile>"))
 :au BufReadPost     *.gz   call rename(expand("<afile>"), expand("<afile>:r"))
-:au BufReadPost     *.gz   !gzip <afile>:r
+:au BufReadPost     *.gz   exe '!gzip ' . shellescape(expand("<afile>:r"))
 :e! Xtestfile.gz                " Edit compressed file
 :w>>test.out                    " Append it to the output file
 :set shelltemp                  " need temp files here
 :au FilterReadPre   *.out  call rename(expand("<afile>"), expand("<afile>").".t")
-:au FilterReadPre   *.out  !sed s/e/E/ <afile>.t ><afile>
-:au FilterReadPre   *.out  !rm <afile>.t
+:au FilterReadPre   *.out  exe '!sed s/e/E/ ' . shellescape(expand("<afile>")) . ".t >" . shellescape(expand("<afile>"))
+:au FilterReadPre   *.out  exe '!rm ' . shellescape(expand("<afile>")) . '.t'
 :au FilterReadPost  *.out  '[,']s/x/X/g
 :e! test.out                    " Edit the output file
 :23,$!cat
 :23,$s/\r$//                 " remove CR for when sed adds them
-:au! FileReadPre    *.gz   !gzip -d <afile>
+:au! FileReadPre    *.gz   exe '!gzip -d ' . shellescape(expand("<afile>"))
 :au  FileReadPre    *.gz   call rename(expand("<afile>:r"), expand("<afile>"))
 :au! FileReadPost   *.gz   '[,']s/l/L/
 :$r Xtestfile.gz             " Read compressed file
--- vim-7.1.314.orig/debian/vim-runtime.dirs
+++ vim-7.1.314/debian/vim-runtime.dirs
@@ -0,0 +1,3 @@
+/usr/bin/
+/usr/share/vim/addons/
+/usr/share/vim/registry/
--- vim-7.1.314.orig/debian/vim-variant.prerm
+++ vim-7.1.314/debian/vim-variant.prerm
@@ -0,0 +1,69 @@
+#!/bin/bash -e
+
+pkg=@PKG@
+variant=@VARIANT@
+
+# two things to do:
+# 1) remove /usr/bin/vim.variant as alternative for /usr/bin/vim
+# 2) remove /usr/bin/gvim as an alternative for gnome-text-editor for
+#    variants built with gnome support
+
+# check_and_remove_alternative cleans up stale alternatives that were left
+# behind from previous mishandling of alternatives.
+check_and_remove_alternative () {
+  if update-alternatives --list $1 | grep -q bin/vim; then
+    for f in `update-alternatives --list $1 | grep 'bin/vim$'`; do
+      update-alternatives --remove $1 $f
+    done
+  fi
+}
+
+remove_gnome_alternative () {
+  if [ -f /usr/bin/vim.$variant ]; then
+    check_and_remove_alternative gnome-text-editor
+    update-alternatives --remove gnome-text-editor /usr/bin/vim.$variant
+  fi
+}
+
+remove_variant_alternative () {
+  for i in vi view ex editor rvim rview vimdiff vim; do
+    check_and_remove_alternative $i
+    update-alternatives --remove $i /usr/bin/vim.$variant
+  done
+  case "$variant" in
+    gtk|lesstif|gnome) # gui enabled variants
+      remove_gui_variant_alternative
+      ;;
+  esac
+}
+
+remove_gui_variant_alternative () {
+  for i in eview evim gview gvimdiff rgview rgvim gvim; do
+    check_and_remove_alternative $i
+    update-alternatives --remove $i /usr/bin/vim.$variant
+  done
+}
+
+case "$1" in
+  # only remove in remove/deconfigure so we don't disrupt users' preferences
+  remove|deconfigure)
+    case "$pkg" in
+      vim-gnome) # gnome enabled variants
+        remove_gnome_alternative
+        ;;
+    esac
+    remove_variant_alternative
+    ;;
+
+  upgrade|failed-upgrade)
+    ;;
+
+  *)
+    echo "prerm called with unknown argument \`$1'" >&2
+    exit 0
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
--- vim-7.1.314.orig/debian/vim-gui-common.links.in
+++ vim-7.1.314/debian/vim-gui-common.links.in
@@ -0,0 +1,5 @@
+etc/vim/gvimrc				usr/share/vim/gvimrc
+usr/share/man/man1/gvim.1		usr/share/man/man1/gview.1
+usr/share/man/man1/gvim.1		usr/share/man/man1/rgvim.1
+usr/share/man/man1/gvim.1		usr/share/man/man1/rgview.1
+usr/share/man/man1/evim.1		usr/share/man/man1/eview.1
--- vim-7.1.314.orig/debian/presubj
+++ vim-7.1.314/debian/presubj
@@ -0,0 +1,2 @@
+Please use "vim -u NONE -U NONE" to verify that the bug you want to report
+isn't caused by a configuration error.
--- vim-7.1.314.orig/debian/control
+++ vim-7.1.314/debian/control
@@ -0,0 +1,238 @@
+Source: vim
+Section: editors
+Priority: optional
+Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
+Uploaders: Pierre Habouzit <madcoder@debian.org>, Stefano Zacchiroli <zack@debian.org>, James Vega <jamessan@debian.org>
+Standards-Version: 3.7.3.0
+Build-Depends: debhelper, bzip2, libperl-dev, tcl8.4-dev, libacl1-dev,
+ libgpmg1-dev [!hurd-i386] | not+linux-gnu, python-dev, libxpm-dev,
+ libncurses5-dev, ruby, ruby1.8-dev, libgtk2.0-dev, lynx,
+ libgnomeui-dev, lesstif2-dev, make (>= 3.80+3.81.b4),
+ libselinux1-dev [!hurd-i386] | not+linux-gnu
+Build-Depends-Indep: docbook-xml, docbook-utils
+Vcs-Git: git://git.debian.org/git/pkg-vim/vim.git
+Vcs-Browser: http://git.debian.org/?p=pkg-vim/vim.git
+Homepage: http://www.vim.org/
+
+Package: vim-common
+Priority: important
+Architecture: any
+Depends: ${shlibs:Depends}
+Recommends: vim | vim-gnome | vim-gtk | vim-lesstif | vim-nox | vim-tiny
+Description: Vi IMproved - Common files
+ Vim is an almost compatible version of the UNIX editor Vi.
+ .
+ Many new features have been added: multi level undo, syntax
+ highlighting, command line history, on-line help, filename
+ completion, block operations, folding, Unicode support, etc.
+ .
+ This package contains files shared by all non GUI-enabled vim
+ variants (vim and vim-tiny currently) available in Debian.
+ Examples of such shared files are: manpages, common executables
+ like xxd, and configuration files.
+
+Package: vim-gui-common
+Priority: optional
+Architecture: all
+Recommends: vim-gnome | vim-gtk | vim-lesstif
+Description: Vi IMproved - Common GUI files
+ Vim is an almost compatible version of the UNIX editor Vi.
+ .
+ Many new features have been added: multi level undo, syntax
+ highlighting, command line history, on-line help, filename
+ completion, block operations, folding, Unicode support, etc.
+ .
+ This package contains files shared by all GUI-enabled vim
+ variants available in Debian.  Examples of such shared files are:
+ icons, desktop environments settings, and menu entries.
+
+Package: vim-runtime
+Priority: optional
+Architecture: all
+Recommends: vim | vim-gnome | vim-gtk | vim-lesstif | vim-nox | vim-tiny
+Enhances: vim-tiny
+Description: Vi IMproved - Runtime files
+ Vim is an almost compatible version of the UNIX editor Vi.
+ .
+ Many new features have been added: multi level undo, syntax
+ highlighting, command line history, on-line help, filename
+ completion, block operations, folding, Unicode support, etc.
+ .
+ This package contains vimtutor and the architecture independent runtime
+ files, used, if available, by all vim variants available in Debian.
+ Example of such runtime files are: online documentation, rules for
+ language-specific syntax highlighting and indentation, color schemes,
+ and standard plugins.
+
+Package: vim-doc
+Section: doc
+Priority: optional
+Architecture: all
+Description: Vi IMproved - HTML documentation
+ Vim is an almost compatible version of the UNIX editor Vi.
+ .
+ Many new features have been added: multi level undo, syntax
+ highlighting, command line history, on-line help, filename
+ completion, block operations, folding, Unicode support, etc.
+ .
+ This package contains the HTML version of the online
+ documentation.
+
+Package: vim-tiny
+Priority: important
+Architecture: any
+Conflicts: vim-runtime (<< 1:7.1-056+1), vim-common (<< 1:7.1.293-2)
+Replaces: vim-common (<< 1:7.1.293-2)
+Depends: vim-common (= ${binary:Version}), ${shlibs:Depends}
+Provides: editor
+Description: Vi IMproved - enhanced vi editor - compact version
+ Vim is an almost compatible version of the UNIX editor Vi.
+ .
+ Many new features have been added: multi level undo, syntax
+ highlighting, command line history, on-line help, filename
+ completion, block operations, folding, Unicode support, etc.
+ .
+ This package contains a minimal version of vim compiled with no
+ GUI and a small subset of features in order to keep small the
+ package size. This package does not depend on the vim-runtime
+ package, but installing it you will get its additional benefits
+ (online documentation, plugins, ...).
+
+Package: vim
+Priority: optional
+Architecture: any
+Depends: vim-common (= ${binary:Version}), vim-runtime (= ${source:Version}), ${shlibs:Depends}
+Suggests: ctags, vim-doc, vim-scripts
+Conflicts: vim-common (<< 1:7.1-175+1)
+Replaces: vim-common (<< 1:7.1-175+1)
+Provides: editor
+Description: Vi IMproved - enhanced vi editor
+ Vim is an almost compatible version of the UNIX editor Vi.
+ .
+ Many new features have been added: multi level undo, syntax
+ highlighting, command line history, on-line help, filename
+ completion, block operations, folding, Unicode support, etc.
+ .
+ This package contains a version of vim compiled with a rather
+ standard set of features.  This package does not provide a GUI
+ version of Vim.  See the other vim-* packages if you need more
+ (or less).
+
+Package: vim-dbg
+Priority: extra
+Architecture: any
+Depends: vim (= ${binary:Version}) | vim-gtk (= ${binary:Version}) |
+ vim-gnome (= ${binary:Version}) | vim-nox (= ${binary:Version}) |
+ vim-common (= ${binary:Version}) | vim-lesstif (= ${binary:Version}) |
+ vim-tiny (= ${binary:Version})
+Description: Vi IMproved - enhanced vi editor (debugging symbols)
+ Vim is an almost compatible version of the UNIX editor Vi.
+ .
+ Many new features have been added: multi level undo, syntax
+ highlighting, command line history, on-line help, filename
+ completion, block operations, folding, Unicode support, etc.
+ .
+ This package contains gdb debugging symbols for the vim packages.
+
+Package: vim-perl
+Priority: extra
+Architecture: all
+Depends: vim-gtk (>= 1:7.1-135+1)
+Description: Vi IMproved - enhanced vi editor (transitional package)
+ This package is simply a transitional package from individual
+ vim-$language packages to vim-gtk.
+
+Package: vim-python
+Priority: extra
+Architecture: all
+Depends: vim-gtk (>= 1:7.1-135+1)
+Description: Vi IMproved - enhanced vi editor (transitional package)
+ This package is simply a transitional package from individual
+ vim-$language packages to vim-gtk.
+
+Package: vim-ruby
+Priority: extra
+Architecture: all
+Depends: vim-gtk (>= 1:7.1-135+1)
+Description: Vi IMproved - enhanced vi editor (transitional package)
+ This package is simply a transitional package from individual
+ vim-$language packages to vim-gtk.
+
+Package: vim-tcl
+Priority: extra
+Architecture: all
+Depends: vim-gtk (>= 1:7.1-135+1)
+Description: Vi IMproved - enhanced vi editor (transitional package)
+ This package is simply a transitional package from individual
+ vim-$language packages to vim-gtk.
+
+Package: vim-gtk
+Priority: extra
+Architecture: any
+Depends: vim-gui-common (= ${source:Version}), vim-common (= ${binary:Version}), vim-runtime (= ${source:Version}), ${shlibs:Depends}
+Suggests: cscope, vim-doc, ttf-dejavu, gnome-icon-theme
+Provides: vim, gvim, editor, vim-perl, vim-python, vim-ruby, vim-tcl
+Description: Vi IMproved - enhanced vi editor - with GTK2 GUI
+ Vim is an almost compatible version of the UNIX editor Vi.
+ .
+ Many new features have been added: multi level undo, syntax
+ highlighting, command line history, on-line help, filename
+ completion, block operations, folding, Unicode support, etc.
+ .
+ This package contains a version of vim compiled with a GTK2 GUI
+ and support for scripting with Perl, Python, Ruby, and Tcl.
+
+Package: vim-nox
+Priority: extra
+Architecture: any
+Depends: vim-common (= ${binary:Version}), vim-runtime (= ${source:Version}), ${shlibs:Depends}
+Suggests: cscope, vim-doc
+Provides: vim, editor, vim-perl, vim-python, vim-ruby, vim-tcl
+Description: Vi IMproved - enhanced vi editor
+ Vim is an almost compatible version of the UNIX editor Vi.
+ .
+ Many new features have been added: multi level undo, syntax
+ highlighting, command line history, on-line help, filename
+ completion, block operations, folding, Unicode support, etc.
+ .
+ This package contains a version of vim compiled with support for
+ scripting with Perl, Python, Ruby, and Tcl but no GUI.
+
+Package: vim-lesstif
+Priority: extra
+Architecture: any
+Depends: vim-gui-common (= ${source:Version}), vim-common (= ${binary:Version}), vim-runtime (= ${source:Version}), ${shlibs:Depends}
+Suggests: cscope, vim-doc, ttf-dejavu
+Provides: vim, gvim, editor, vim-perl, vim-python, vim-ruby, vim-tcl
+Description: Vi IMproved - enhanced vi editor - with LessTif GUI
+ Vim is an almost compatible version of the UNIX editor Vi.
+ .
+ Many new features have been added: multi level undo, syntax
+ highlighting, command line history, on-line help, filename
+ completion, block operations, folding, Unicode support, etc.
+ .
+ This package contains a version of vim compiled with a LessTif GUI
+ and support for scripting with Perl, Python, Ruby, and Tcl.
+
+Package: vim-gnome
+Priority: extra
+Architecture: any
+Depends: vim-gui-common (= ${source:Version}), vim-common (= ${binary:Version}), vim-runtime (= ${source:Version}), ${shlibs:Depends}
+Suggests: cscope, vim-doc, ttf-dejavu, gnome-icon-theme
+Provides: vim, gvim, editor, vim-perl, vim-python, vim-ruby, vim-tcl
+Description: Vi IMproved - enhanced vi editor - with GNOME2 GUI
+ Vim is an almost compatible version of the UNIX editor Vi.
+ .
+ Many new features have been added: multi level undo, syntax
+ highlighting, command line history, on-line help, filename
+ completion, block operations, folding, Unicode support, etc.
+ .
+ This package contains a version of vim compiled with a GNOME2 GUI
+ and support for scripting with Perl, Python, Ruby, and Tcl.
+
+Package: vim-full
+Priority: extra
+Architecture: all
+Depends: vim-gnome (>= 1:7.1-135+1)
+Description: Vi IMproved - enhanced vi editor (transitional package)
+ This package is simply a transitional package from vim-full to vim-gnome.
--- vim-7.1.314.orig/debian/README.git
+++ vim-7.1.314/debian/README.git
@@ -0,0 +1,15 @@
+In order to update the upstream patches, debian/update-patches should be run
+from the debian branch.  This will update debian/README in the debian
+branch, pull the new upstream patches into the upstream branch (with Bram as
+the author and useful commit messages), and merge the new upstream patches
+into the upstream-runtime, debian, and deb/* branches.
+
+If you're building a package with new upstream patches, a new orig.tar.gz
+should be built.  This can be done by running "git archive --format=tar
+--prefix=vim-7.1.$newest_patch_number/ upstream | gzip
+../vim_7.1.$newest_patch_number.orig.tar.gz".  This should probably be
+handled by debian/update-patches.
+
+Before building a new package which changes runtime/doc,
+master:runtime/doc/tags should be rebuilt.  This is simply done by running
+"vim -c 'helptags ++t runtime/doc' -c 'q'" and then checking the file in.
--- vim-7.1.314.orig/debian/vim-full.preinst
+++ vim-7.1.314/debian/vim-full.preinst
@@ -0,0 +1,47 @@
+#!/bin/bash -e
+
+pkg=vim-full
+variant=full
+
+# check_and_remove_alternative cleans up stale alternatives that were left
+# behind from previous mishandling of alternatives.
+check_and_remove_alternative () {
+  if update-alternatives --list $1 | grep -q 'bin/vim$'; then
+    for f in `update-alternatives --list $1 | grep 'bin/vim$'`; do
+      update-alternatives --remove $1 $f
+    done
+  fi
+}
+
+remove_gnome_alternative () {
+  if [ -f /usr/bin/vim.$variant ]; then
+    check_and_remove_alternative gnome-text-editor
+    update-alternatives --remove gnome-text-editor /usr/bin/vim.$variant
+  fi
+}
+
+remove_variant_alternative () {
+  for i in vi view ex editor rvim rview vimdiff vim; do
+    check_and_remove_alternative $i
+    if update-alternatives --list $i | grep -q bin/vim.$variant; then
+      update-alternatives --remove $i /usr/bin/vim.$variant
+    fi
+  done
+  remove_gui_variant_alternative
+}
+
+remove_gui_variant_alternative () {
+  for i in eview evim gview gvimdiff rgview rgvim gvim; do
+    check_and_remove_alternative $i
+    if update-alternatives --list $i | grep -q bin/vim.$variant; then
+      update-alternatives --remove $i /usr/bin/vim.$variant
+    fi
+  done
+}
+
+remove_gnome_alternative
+remove_variant_alternative
+
+#DEBHELPER#
+
+exit 0
--- vim-7.1.314.orig/debian/vim-runtime.preinst.in
+++ vim-7.1.314/debian/vim-runtime.preinst.in
@@ -0,0 +1,64 @@
+#!/bin/sh
+set -e
+
+basedir=/usr/share/vim/@VIMCUR@/doc
+
+# If we're upgrading from a version that had "vim-runtime Replaces vim-tiny"
+# and diversions haven't been setup, remove help.txt and tags to ensure
+# diversions get setup properly.
+#
+# OTOH, if we already have diversions setup, we may have a situation where
+# vim-tiny isn't installed but help.txt and tags have been diverted.  In that
+# case, remove the diverted files as they don't belong.
+check_diversion() {
+  if dpkg --compare-versions "$1" ge "1:7.1-056+1" \
+     && dpkg --compare-versions "$1" lt "1:7.1.314-1"; then
+    rm -f /usr/share/vim/vim71/doc/tags
+    rm -f /usr/share/vim/vim71/doc/help.txt
+  elif dpkg --compare-versions "$1" ge "1:7.1.314-1"; then
+    inst=$(dpkg-query -W -f='${Status}\n' vim-tiny | awk '{print $1}')
+    if [ "$inst" != "install" ]; then
+      rm -f /usr/share/vim/vim71/doc/tags.vim-tiny
+      rm -f /usr/share/vim/vim71/doc/help.txt.vim-tiny
+    fi
+  fi
+}
+
+add_diversion() {
+  dpkg-divert --package vim-runtime --add --rename \
+    --divert "$1.vim-tiny" "$1"
+}
+
+handhold_diversion_setup() {
+  # dpkg-divert requires the parent directory of the file-to-be-diverted or
+  # the divert-to-file to exist (#476973), which is unlikely to be the case
+  # during preinst.  Because of this, we now have to find whether part of
+  # that directory structure is missing, create it if so, add the diversion,
+  # and then remove it again.
+  availdir=$basedir
+  deaddir=
+  while [ -n "$availdir" ] && [ ! -d "$availdir" ]; do
+    deaddir="${availdir##*/}/$deaddir"
+    availdir=${availdir%/*}
+  done
+  if [ -n "$deaddir" ]; then
+    mkdir -p "$availdir/$deaddir"
+  fi
+  if [ -n "$deaddir" ]; then
+    (cd ${availdir:-/} && rm -r ${deaddir%%/*})
+  fi
+}
+
+# Also run during upgrade to fix the botched handling of diversions in postrm.
+# If it weren't for the bad handling of diversions in 1:7.1.314-{1,2}, then
+# this would only need to be called during an upgrade from versions prior to
+# 1:7.1.314-1
+if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
+  handhold_diversion_setup
+  add_diversion $basedir/help.txt
+  add_diversion $basedir/tags
+fi
+
+#DEBHELPER#
+
+exit 0
--- vim-7.1.314.orig/debian/vim-gtk.menu
+++ vim-7.1.314/debian/vim-gtk.menu
@@ -0,0 +1,8 @@
+?package(vim-gtk):needs="x11"		\
+	section="Applications/Editors" 			\
+	title="GVIM"					\
+	longtitle="GVIM, graphical Vi IMproved (GTK GUI)" \
+	command="/usr/bin/vim.gtk -g -f"		\
+	icon="/usr/share/pixmaps/vim-32.xpm"		\
+	icon32x32="/usr/share/pixmaps/vim-32.xpm"	\
+	icon16x16="/usr/share/pixmaps/vim-16.xpm"
--- vim-7.1.314.orig/debian/vim-common.preinst
+++ vim-7.1.314/debian/vim-common.preinst
@@ -0,0 +1,30 @@
+#!/bin/sh
+set -e
+
+rm_conffile() {
+    PKGNAME="$1"
+    CONFFILE="$2"
+    if [ -e "$CONFFILE" ]; then
+        md5sum="$(md5sum "$CONFFILE" | sed -e 's/ .*//')"
+        old_md5sum="$(dpkg-query -W -f='${Conffiles}\n' $PKGNAME | sed -n -e "\\' $CONFFILE '{s/ obsolete$//;s/.* //p}")"
+        if [ "$md5sum" != "$old_md5sum" ]; then
+            echo "Obsolete conffile $CONFFILE has been modified by you."
+            echo "Saving as $CONFFILE.dpkg-bak ..."
+            mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
+        else
+            echo "Removing obsolete conffile $CONFFILE ..."
+            rm -f "$CONFFILE"
+        fi
+    fi
+}
+
+case "$1" in
+    install|upgrade)
+    if dpkg --compare-versions "$2" le "1:7.1.293-1"; then
+        rm_conffile vim-common /etc/vim/vimrc.tiny
+    fi
+esac
+
+#DEBHELPER#
+
+exit 0
--- vim-7.1.314.orig/debian/vim-variant.links
+++ vim-7.1.314/debian/vim-variant.links
@@ -0,0 +1 @@
+usr/share/doc/@COMMON@		usr/share/doc/@PKG@
--- vim-7.1.314.orig/debian/vim-common.install.in
+++ vim-7.1.314/debian/vim-common.install.in
@@ -0,0 +1,5 @@
+debian/tmp/usr/bin/xxd                           usr/bin/
+debian/helpztags                                 usr/bin/
+debian/runtime/vimrc                             etc/vim/
+debian/runtime/debian.vim                        usr/share/vim/@VIMCUR@/
+debian/tmp/usr/share/man/man1/*                  usr/share/man/man1/
--- vim-7.1.314.orig/debian/update-patches
+++ vim-7.1.314/debian/update-patches
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+OPTIONS_SPEC="\
+$(basename $0)
+
+updates patches from upstream vim
+--
+"
+SUBDIRECTORY_OK=
+. git-sh-setup
+require_work_tree
+
+git rev-parse --verify HEAD > /dev/null && \
+    git update-index --refresh && \
+    git diff-files --quiet && \
+    git diff-index --cached --quiet HEAD -- \
+    || die "Your tree is unclean, can't do that..."
+
+
+host='ftp.vim.org'
+version='7.1'
+dir="pub/vim/patches/$version"
+
+curpatch=$(git show debian:debian/README | tail -n1 | awk '{print $2}' | sed s/^$version\.//)
+curpatch=$(($curpatch + 1))
+newpatch=$(lftp -c "open $host; cd $dir; ls $version.*" | tail -n1 | awk -F. '{print $3}')
+
+if [ $curpatch -ge $newpatch ]; then
+    echo "Nothing to do."
+    exit
+fi
+
+git checkout debian
+
+echo 'updating debian/README to latest upstream ...'
+lftp -c "open $host; cd $dir; get README -o debian/README"
+# Store debian/README while we update the other branches.  The debian branch
+# will get reset to before this commit at the end of the script.
+git commit -m "Update README for patches $curpatch - $newpatch" -- debian/README
+
+git checkout upstream
+
+lftp -c "open $host; cd $dir; get $(seq -f $version.%03g -s' ' $curpatch $newpatch)"
+for p in $(seq -f $version.%03g $curpatch $newpatch); do
+    patch -Np0 < $p
+    git add $(lsdiff $p)
+    author="$(sed -n -e 's/^From: *//;t done;d;: done;p' $p)"
+    subject="s/^ *[0-9]* *$p *//;t done;d;: done;p"
+    msg='/^Patch /,/^Files:/{s/^Files:.*//;t;p}'
+    (git show debian:debian/README -- | sed -n "$subject"; \
+     sed -n "$msg" $p) | git commit --author "$author" -F -
+    rm $p
+done
+
+for b in $(git for-each-ref --format="%(refname)" "refs/heads/deb/*" | sed 's@refs/heads/@@') upstream-runtime; do
+    git checkout $b
+    git merge upstream
+    if [ $? -ne 0 ]; then
+        echo "Merge conflict -- fix the problem and then exit the subshell to continue"
+        $SHELL
+        if [ $? -ne 0 ]; then
+            echo "Non-zero exit status from merge conflict.  Exiting update script."
+            exit
+        fi
+    fi
+done
+
+git checkout debian
+git merge upstream
+
+echo "Patches $curpatch - $newpatch comitted and merged."
--- vim-7.1.314.orig/debian/vim-common.docs
+++ vim-7.1.314/debian/vim-common.docs
@@ -0,0 +1 @@
+debian/README
--- vim-7.1.314.orig/debian/vim-gui-common.install.in
+++ vim-7.1.314/debian/vim-gui-common.install.in
@@ -0,0 +1,5 @@
+debian/gvim.desktop					usr/share/applications/
+debian/icons/*						usr/share/pixmaps/
+debian/runtime/gvimrc					etc/vim/
+debian/tmp/usr/share/man/man1/evim.1			usr/share/man/man1/
+debian/lintian/vim-gui-common				usr/share/lintian/overrides/
--- vim-7.1.314.orig/debian/vim-install
+++ vim-7.1.314/debian/vim-install
@@ -0,0 +1,98 @@
+#!/usr/bin/perl -w
+
+use File::Path;
+
+my $db = "/var/lib/dpkg/info";
+my $vim = "$ENV{HOME}/.vim";
+
+sub install_script {
+	# is there a parameter to take care of?
+	if (!($_[0])) 
+		{ die "Please specify the name of script to install.\n" };
+	
+	# is there ~/.vim?
+	mkdir $vim;
+	if ($! and ! -d $vim) 
+		{ die "Something is wrong with your ~/.vim/ directory:\n$!\n" };
+	
+	# get the list of files and link them
+	open(F,$db . "/vim-" . $_[0] . ".list") 
+		or die "Script $_[0] has not been found.\nPerhaps it has not been installed site-wide from .deb package?\n";
+
+	while (<F>) {
+		chomp;
+		if (m#^/usr/share/vim/addons/#) {
+			($lf = $_)  =~ s#^/usr/share/vim/addons/##; $lf = "$vim/$lf";
+			($ld = $lf) =~ s#/[^/]*?$##; 
+			
+			mkpath $ld;
+			if ($! and ! -d $ld)
+				{ die "Something is wrong with your $ld directory:\n$!\n" };
+			
+			symlink $_, $lf;
+			if ($! and ! -l $lf)
+				{ die "Something is wrong with your $lf symlink:\n$!\n" };
+
+			if (readlink $lf ne $_)
+				{ unlink $lf; symlink $_, $lf };
+
+			print "$_ linked OK.\n";
+		}
+	}
+	close(F);
+	print "Script $_[0] has been installed.\n";
+}
+
+sub remove_script {
+	# is there a parameter to take care of?
+	if (!($_[0])) 
+		{ die "Please specify the name of script to remove.\n" };
+	
+	# get the list of files and link them
+	open(F,$db . "/vim-" . $_[0] . ".list") 
+		or die "Script $_[0] has not been found.\nPerhaps it has not been installed site-wide from .deb package?\n";
+
+	my $count=0;
+	while (<F>) {
+		chomp;
+		if (m#^/usr/share/vim/addons/#) {
+			($lf = $_)  =~ s#^/usr/share/vim/addons/##; $lf = "$vim/$lf";
+			($ld = $lf) =~ s#/[^/]*?$##; 
+			
+			if (-l $lf)	{ 
+				$!=0;
+				unlink $lf;
+				if ($!)	{ die "Something went wrong while removing $lf link:\n$!\n" };
+				$count++;
+				$dirs{$ld}++;
+				print "$lf link removed OK.\n";
+			}
+			else {
+				print "WARNING: $lf is NOT a symlink, please check it!\n";
+			};
+		}
+	}
+	close(F);
+	if ($count) {
+		print "Script $_[0] has been removed. $count links removed.\n";
+		if (%dirs) { 
+			print "Please check following dirs, they may have been emptied:\n", join "\n", sort(keys %dirs), "\n" };
+	}
+	else {
+		print "Script $_[0] has NOT been removed.\nEither $_[0] wasn't installed in ~/.vim or you have messed something up...\n";
+	};
+}
+
+for ($ARGV[0] || "help") {
+        if (/^install$/)	{ install_script($ARGV[1]) }
+        elsif (/^remove$/)	{ remove_script($ARGV[1])  }
+        else				{ print 
+"A script to manage ~/.vim -> /usr/share/vim/addons links.
+usage: 
+$0 command [options] where available commands are:
+\tinstall foo\tcreates links from ~/.vim/ to /usr/share/vim/addons for script foo
+\tremove foo\tremoves links from ~/.vim/ to /usr/share/vim/addons for script foo
+\thelp\t\tget this help message
+"; }
+}
+
--- vim-7.1.314.orig/debian/vim-variant.postinst
+++ vim-7.1.314/debian/vim-variant.postinst
@@ -0,0 +1,78 @@
+#!/bin/bash -e
+
+pkg=@PKG@
+variant=@VARIANT@
+mandir=/usr/share/man
+
+# two things to do:
+# 1) add /usr/bin/vim.variant as alternative for /usr/bin/vim. Priority are
+#    chosen accordingly to the principle: ``more features, higher priority''
+# 2) add /usr/bin/gvim as an alternative for gnome-text-editor for variants
+#    built with gnome support. Same principle for the priority above, with the
+#    additional constraint that priority should not be higher than gedit's
+
+add_gnome_alternative () {
+  if [ -f /usr/bin/gvim ]; then
+    update-alternatives --install /usr/bin/gnome-text-editor \
+      gnome-text-editor /usr/bin/vim.$variant $1 \
+      --slave $mandir/man1/gnome-text-editor.1.gz gnome-text-editor.1.gz \
+              $mandir/man1/vim.1.gz
+  fi
+}
+
+add_variant_alternative () {
+  update-alternatives --install /usr/bin/vim vim /usr/bin/vim.$variant $1
+  update-alternatives --install /usr/bin/vimdiff vimdiff /usr/bin/vim.$variant $1
+  update-alternatives --install /usr/bin/rvim rvim /usr/bin/vim.$variant $1
+  update-alternatives --install /usr/bin/rview rview /usr/bin/vim.$variant $1
+  # Since other packages provide these commands, we'll setup alternatives for
+  # their manpages, too.
+  for i in vi view ex editor ; do
+    update-alternatives \
+      --install /usr/bin/$i $i /usr/bin/vim.$variant $1 \
+      @LANG_ALTS@
+      --slave $mandir/man1/$i.1.gz $i.1.gz \
+              $mandir/man1/vim.1.gz
+  done
+  case "$variant" in
+    gtk|gnome|lesstif) # gui enabled variants
+      add_gui_variant_alternative $1
+      ;;
+  esac
+}
+
+add_gui_variant_alternative () {
+  for i in gvim gview rgview rgvim evim eview gvimdiff ; do
+    update-alternatives --install /usr/bin/$i $i /usr/bin/vim.$variant $1
+  done
+}
+
+replace_dir_w_symlink () {
+  if [ -d $1 -a ! -L $1 ]; then
+    (rmdir $1 && ln -fs $2 $1) || true
+  fi
+}
+
+case "$pkg" in
+  vim-tiny)
+    add_variant_alternative 10
+    ;;
+  vim)
+    add_variant_alternative 30
+    replace_dir_w_symlink /usr/share/doc/vim vim-common
+    ;;
+  vim-nox)
+    add_variant_alternative 40
+    ;;
+  vim-gtk|vim-lesstif)
+    add_variant_alternative 50
+    ;;
+  vim-gnome) # gnome enabled variant
+    add_variant_alternative 60
+    add_gnome_alternative 45
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
--- vim-7.1.314.orig/debian/changelog
+++ vim-7.1.314/debian/changelog
@@ -0,0 +1,5119 @@
+vim (1:7.1.314-3+lenny2~bpo40+2) etch-backports; urgency=low
+
+  * Add workaround for bug in dpkg-divert, which was the reason for the broken
+    dependency on dpkg in the last upload.
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sun, 23 Nov 2008 19:53:03 +0100
+
+vim (1:7.1.314-3+lenny2~bpo40+1) etch-backports; urgency=low
+
+  * Rebuild for etch.
+  * Use gzip instead bzip2 to compress vim-runtime package. 
+  * Use tcl8.4-dev instead tcl-dev in build-deps. 
+
+ -- Norbert Tretkowski <nobse@debian.org>  Fri, 21 Nov 2008 10:28:34 +0100
+
+vim (1:7.1.314-3+lenny2) testing-proposed-updates; urgency=low
+
+  * src/if_python.c: Strip empty directories from Python's sys.path to prevent
+    Vim from using its current working directory as a module import path.
+    (Closes: #493937)
+
+ -- James Vega <jamessan@debian.org>  Fri, 17 Oct 2008 10:58:00 -0400
+
+vim (1:7.1.314-3+lenny1) testing-proposed-updates; urgency=low
+
+  * Cherry-pick patches from upstream to address filename escaping
+    vulnerabilities
+    - 7.2a.013 shellescape() does not escape "%" and "#" characters
+    - 7.2b.005 shellescape() doesn't take care of "!" and "\n"
+    - 7.2b.018 cmdline completion on shell cmd fails on file containing '!'
+    - 7.2b.026 GTK 2 file chooser causes significant slowdown  (Closes:
+      #456897, #384635)
+    - 7.2c.002 fnameescape() doesn't handle a leading '+' or '>'
+    - 7.2.010 "K" in Visual mode does not properly escape all characters
+      (CVE 2008-4101, Closes: #500381)
+      + src/normal.c: Only use the word under the cursor, instead of the
+        entire line after the cursor, when constructing the shell command to
+        run.
+  * Update runtime files affected by filename escape vulnerabilities.
+    (CVE 2008-2712, Closes: #486502)
+  * src/spell.c: Stop reading when EOF is reached to avoid allocing large
+    amounts of memory.
+  * src/main.c: After further discussion with upstream, revert behavior of
+    -N/-C causing (no)compatible to be set after all startup files/plugins are
+    sourced, c.f. #438560.
+  * debian/control: vim-runtime Depends on dpkg >= 1.14.20 for sane
+    dpkg-divert behavior
+  * debian.vim: Do not enable 'autoindent' and filetype plugins by default.
+  * Add NEWS item for change in default configuration.
+  * runtime/autoload/netrw.vim: Fix deletion of incorrect file in wide display
+    listing.  Using Jan MinÃ¡Å™'s patch from the vim-dev list.  (Closes:
+    #492519)
+  * Improve handling of transition from vim-runtime Replacing vim-tiny to
+    using diversions to manage their conflicting files.  (Closes: #492450)
+  * Add vim-runtime.preinst to handle moving /etc/vim/vimrc.tiny from
+    vim-common to vim-tiny.  (Closes: #499451)
+
+ -- James Vega <jamessan@debian.org>  Tue, 14 Oct 2008 21:11:21 -0400
+
+vim (1:7.1.314-3) unstable; urgency=high
+
+  * Update runtime files affected by the filename escape vulnerability.
+    (CVE 2008-2712, Closes: #486502)
+  * debian/vim-runtime.preinst:
+    - Only add the diversions if the preinst is called with the "install" or
+      "upgrade" (to handle the previous mishandling in postrm) arguments.
+  * debian/vim-runtime.postrm:
+    - Only remove the diversions if the postrm is called with the "remove"
+      argument.  (Closes: #486446)
+  * runtime/menu.vim:
+    - Escape the buffer name when using the "Window -> Split File Explorer"
+      menu item.  (Closes: #486417)
+
+ -- James Vega <jamessan@debian.org>  Tue, 17 Jun 2008 11:12:18 -0400
+
+vim (1:7.1.314-2) unstable; urgency=low
+
+  * debian/rules:
+    - Tell configure to only check the GUI toolkit specific to the variant
+      being built.  (Closes: #486319, #486336)
+  * runtime/ftplugin/debchangelog.vim:
+    - Merge Launchpad bug completion from Ubuntu.
+    - Specify the full path when calling apt-listbugs instead of relying on
+      /usr/sbin being in the user's path.
+    - Improve error handling for Launchpad bug completion.
+
+ -- James Vega <jamessan@debian.org>  Sun, 15 Jun 2008 12:42:38 -0400
+
+vim (1:7.1.314-1) unstable; urgency=low
+
+  * New upstream patches (294 - 314), see README.gz for details.
+    - SELinux support merged upstream
+  * Update NetRW to version 125n (pre-release).
+    - Calculate length of multi-byte strings properly.  (Closes: #474609)
+    - Display/navigate symlinks to directories properly.  (Closes: #474980)
+  * Update vim-git runtime files.
+  * debian/update-patches:
+    - Fix determination of patch level from last commit.
+    - Use debian:debian/README to determine current patch level.
+    - Don't exit on error since that prevents correcting merges.
+    - Use a standard commit message for debian/README.
+  * runtime/ftplugin/debchangelog.vim:
+    - NewVersion() should only call foldopen if folding is enabled.
+  * runtime/macros/justify.vim:
+    - Calculate strlen for multi-byte strings properly.  (Closes: #481115)
+  * debian/rules:
+    - Make use of upstream's "shadow" directories so the variants can be built
+      in parallel.
+    - Remove .NOTPARALLEL to allow parallel building.
+    - Remove useless dh_shlibdeps call in the binary-indep target.
+    - Remove autoconf-stamp target since we're no longer patching configure.
+  * debian/vim-runtime.install:
+    - Add new gvimtutor to vim-runtime package.
+  * Very carefully divert vim-tiny's help.txt and helptags so they will still
+    be in place if vim-runtime is removed.
+  * debian/control:
+    - Remove vim-runtime's Replaces of vim-tiny since the conflicting files
+      are now handled by diversions.
+
+ -- James Vega <jamessan@debian.org>  Tue, 10 Jun 2008 22:28:10 -0400
+
+vim (1:7.1.293-3+lenny1) testing-security; urgency=high
+
+  * Fix filename escape vulnerabilties in various vim scripts which allows
+    attacker to execute arbitrary code via a crafted filename.
+    (CVE 2008-2712, Closes: #486502)
+
+ -- James Vega <jamessan@debian.org>  Sun, 22 Jun 2008 23:49:54 -0400
+
+vim (1:7.1.293-3) unstable; urgency=low
+
+  * runtime/syntax/debchangelog.vim,debsources.vim:
+    - Update the list of supported Ubuntu releases.
+  * debian/policy/vim-policy.xml:
+    - Remove svn keywords since it's not being stored in svn anymore.
+  * debian/vim-variant.postinst:
+    - Remove switching on $1 since it's safe to always add the alternatives.
+  * debian/vim-variants.prerm:
+    - Add removal of alternatives during deconfigure.  (Closes: #411697)
+  * debian/README.Debian:
+    - Add information about mimicing Vim's default modeline behavior and the
+      securemodelines plugin.  (Closes: #479060)
+  * debian/rules:
+    - Separate build-arch and build-indep targets so Vim's policy document
+      aren't built on the buildd's (thus avoiding the openjade segfault on
+      arm).
+  * debian/control:
+    - Move docbook-utils and docbook-xml to Build-Depends-Indep
+  * src/if_python.c:
+    - If building against Python 2.5, use ssize_t instead of int according to
+      PEP 353.
+
+ -- James Vega <jamessan@debian.org>  Sun, 04 May 2008 14:11:17 -0400
+
+vim (1:7.1.293-2) unstable; urgency=low
+
+  * debian/rules:
+    - Fix expansion of @VIMCUR@ in vimrc.tiny.  Based off a patch by Daniel
+      Hahler.  (Closes: #477379)
+    - Create a separate install-stamp-vim-tiny target.
+    - Add the proper lines for vimrc.tiny to vim-tiny.{install,links} in the
+      install-stamp-vim-tiny target.
+  * debian/control:
+    - Correct the vim-common and vim-runtime descriptions with regard to
+      vimtutor.
+    - Add Conflicts/Replaces to vim-tiny against vim-common since
+      /etc/vim/vimrc.tiny is moving to the vim-tiny package.
+  * runtime/syntax/messages.vim:
+    - Support highlighting of RFC3339 timestamps.  (Closes: #475568)
+  * runtime/scripts.vim:
+    - Detect Mozilla Thunderbird's mbox file as mail filetype.  Thanks to
+      Kevin B. McCarty for the patch. (Closes: #475300)
+  * runtime/filetype.vim:
+    - Add detection of more passwd/shadow related files.  Based on a patch by
+      Jarek KamiÅ„ski. (Closes: #420304)
+    - Improve filetype detection of strace logs.  Thanks to Philipp Marek for
+      the patch. (Closes: #473967)
+    - Add filetype detection of more Apache config files.  Thanks to Josh
+      Triplett and Xavier Guimard for the patch. (Closes: #421312)
+    - Fix a missing comma in the cron filetype detection.
+
+ -- James Vega <jamessan@debian.org>  Wed, 23 Apr 2008 13:46:26 -0400
+
+vim (1:7.1.293-1) unstable; urgency=low
+
+  * debian/control:
+    - Add Provides for vim-{ruby,python,perl,tcl} to any variant that supports
+      those language bindings since some packages benefit from being able to
+      specify a Depends on a vim package with support for a specific language.
+    - Only Build-Depend on libselinux1-dev for linux systems.
+    - Remove Provides from the transition packages.
+  * runtime/filetype.vim:
+    - Use "setf" instead of "set ft" when setting the filetype to git so that
+      we don't override another filetype which may have been set during
+      filetype detection.
+  * runtime/syntax/debchangelog.vim:
+    - Cleanup the list of recognized releases and add
+      oldstable-proposed-updates/proposed-updates.
+
+ -- James Vega <jamessan@debian.org>  Tue, 15 Apr 2008 22:19:36 -0400
+
+vim (1:7.1.291-1) unstable; urgency=low
+
+  * Lintian cleanups
+    - Change doc-base section to Editors.
+    - Remove Encoding key from desktop entry.
+  * New upstream patches (286 - 291), see README.gz for details.
+  * Add SELinux support  (Closes: #474102)
+    - Vim patch taken from Fedora's Vim packaging
+    - Thanks to Vaclav Ovsik for the patch to the Debian packaging.
+  * Fix indentation of Perl files when folding is enabled.  Thanks to Gregory
+    Hainaut for the patch.  (Closes: #473660)
+  * debian/control:
+    - Add libselinux1-dev and autoconf Build-Depends.
+  * debian/rules:
+    - Rule & dependency added for rebuilding src/auto/configure.
+    - Add update-orig target to prep a new upstream+patches orig.tar.gz for
+      release.
+
+ -- James Vega <jamessan@debian.org>  Tue, 08 Apr 2008 02:24:11 -0400
+
+vim (1:7.1.285-1) unstable; urgency=low
+
+  * Repack upstream tarball so we're no longer using tarball(s)-in-tarball.
+  * New upstream patches (267 - 285), see README.gz for details.
+    - 7.1.277 adds recognition of a few extra groff macros (TP, HP, Pp, Lp,
+      and It) in the default 'paragraphs' option.  (Closes: #468924)
+  * Updated runtime files:
+    - syntax/sh.vim:
+      + No longer mishighlight parenthetical expressions inside arithmetic
+        expansions.  (Closes: #468366)
+    - syntax/debcontrol.vim:
+      + Fix syntax highlighting for Vcs-Svn field to accept svn+ssh and remove
+        the leading "svn+" from http URLs.  (Closes: #472201)
+    - syntax/debsource.vim:
+      + Add lenny as a recognized distribution.
+      + Add debtorrent, ssh, rsh, cdrom, and copy URIs.  (Closes: #471556)
+    - filetype.vim
+      + Add .dpkg-{old,dist} to the list of extensions which are ignored
+        when determining filetype.  (Closes: #421314)
+      + Recognize /etc/cron.d/* as crontab filetype. (Closes: #472375)
+    - Change the debchangelog and debcontrol ftplugins to require enabling of
+      folding instead of folding by default.
+  * Make debian/tiny/vimrc.tiny.diff a proper patch that is always applied and
+    update it to only be enabled when TINY_VIMRC is defined.
+  * debian/rules:
+    - Remove the special-case targets for vim-tiny and add -DTINY_VIMRC to the
+      CFLAGS used when building vim-tiny.
+    - Cleanup dead/useless code from the makefile.
+    - Restrict 'make test' from running unless build and host types are the
+      same.
+    - Allow vim-gnome to build on non-linux-gnu systems.
+    - Only enable gpm on linux-gnu systems.
+    - Automatically specify the Vim version when generating helpztags.1.
+    - Add .NOTPARALLEL target.
+    - Only run 'make distclean' if configure has already been run.
+    - Remove patch, unpatch, extract targets/prerequisites now that the
+      upstream source is directly unpacked in the tarball.
+    - Simplify get-orig-source so there's only one set of commands that
+      are run regardless of whether it's a normal or snapshot release.
+  * debian/control:
+    - Remove the [!hurd-i386] qualifier from libgnomeui-dev Build-Depend.
+    - Remove quilt from Build-Depends.
+    - Change Vcs-* fields to point at the git repo.
+  * Adjust 'modeline' help to indicate that Debian defaults it to off.
+  * Update README.Debian and FAQ to reflect the deviation from
+    upstream's 'modeline' default. (Closes: #472522)
+  * Remove NEWS entries relevant to stable or earlier releases.
+
+ -- James Vega <jamessan@debian.org>  Sun, 30 Mar 2008 12:39:51 -0400
+
+vim (1:7.1-266+1) unstable; urgency=low
+
+  [ James Vega ]
+  * New upstream patches (246 - 266), see README.gz for details.
+    - 7.1.265 fixes an infinite loop when <Space> is included in 'isfname' and
+      the user tries to complete a filename.  (Closes: #465163)
+    - 7.1.266 fixes an issue where Vim would stop parsing a terminal response
+      early, causing the rest of the response to be interpreted as key presses
+      from the user.  (Closes: #466789)
+  * debian/control:
+    - Build-Depend on tcl-dev instead of tcl8.4-dev per Tcl/Tk policy.
+  * Added patches:
+    - make.vim-syntax.diff:
+      + Add recognition of more function names.  (Closes: #465912)
+  * Removed patches:
+    - configure-tcl_detection.diff:
+      + Accepted upstream and merged as 7.1.257
+  * Add debian/watch file.
+  * debian/rules:
+    - Add a get-orig-source target.
+
+  [ martin f. krafft ]
+  * add Tim Pope's vim-git integration (v1.1, commit a53cabb) to vim-runtime.
+
+  [ James Vega ]
+  * Correct a typo in /etc/vim/vimrc's (Closes: #467057) and eval.txt's (via
+    new last-position-jump.diff patch) 'last-position-jump' code snippet which
+    would cause it to fail if the g key were remapped.
+  * runtime/syntax/debcontrol.vim:
+    - Ignore case for control file keys
+    - Match case for control file values
+    - Improve syntax matching for Vcs-Svn, Vcs-Git, and Vcs-Cvs field values.
+    - Match URLs for Vcs-Arch, Vcs-Bzr, Vcs-Darcs, Vcs-Hg.
+    - Recognize more fields as multi-line.
+    - Use the 'keepend' qualifier for the Vcs-* syntax regions to prevent
+      mishighlighting of debcontrolHTTPUrl matches.  (Closes: #466338)
+  * debian/control:
+    - Add "Provides: vim" to all vim variant packages.  (Closes: #447714)
+
+ -- James Vega <jamessan@debian.org>  Wed, 27 Feb 2008 12:12:26 -0500
+
+vim (1:7.1-245+1) unstable; urgency=low
+
+  * New upstream patches (242 - 245), see README.gz for details.
+    - 7.1.244 fixes an issue where a maximized gvim window would size itself
+      larger than the size of the workspace, cutting off part of the
+      command-line.  (Closes: #378311)
+  * debian/control:
+    - Add libacl1-dev to Build-Depends so it actually builds with acl support.
+      Thanks to Lucas Nussbaum's dirty chroot builds for noticing this.
+    - Change TCL to Tcl in the package descriptions.
+  * New patches:
+    - option.c-langmap_comma.diff:
+      + Improves parsing of 'langmap' to follow the behavior specified in the
+        help.  Commas need to be escaped if they're being used literally
+        instead of as a list separator.  (Closes: #233008)
+    - commandline-compatible.diff:
+      + If either -N/-C options are given on the command line, set
+        'nocompatible'/'compatible' after sourcing of the startup files
+        finishes.  (Closes: #438560)
+  * Refreshed patches:
+    - vimrc.tiny.diff
+  * Register the justify and editexisting plugins for use with
+    vim-addons-manager.
+    - justify.vim right and left aligns text by inserting extra spaces into
+      the specified text.  (Closes: #431945)
+    - editexisting.vim will attempt to bring a running gvim to the foreground
+      if 1) only one filename was given when invoking Vim and another Vim
+      instance is editing it or 2) a swapfile for a file exists.  (Closes:
+      #316541)
+  * debian/rules:
+    - Add patch/unpatch targets.
+    - Fix how quilt is invoked so it doesn't use the local user's settings.
+      Thanks to Teemu Likonen for the patch.  (Closes: #463775)
+  * debian/copyright:
+    - Adjust copyright string (capitalize the C) so it's recognized by
+      Lintian.
+
+ -- James Vega <jamessan@debian.org>  Mon, 11 Feb 2008 10:27:17 -0500
+
+vim (1:7.1-241+1) unstable; urgency=low
+
+  * New upstream patches (232 - 241), see README.gz for details.
+  * Remove vim-gui-common.menu and provide one menu file for each gvim
+    package.  (Closes: #461805)
+  * debian/control:
+    - Re-add ruby1.8 Build-Depends since that's required for Vim to detect
+      that it can build with Ruby support.  (Closes: #462284)
+  * Updated patches:
+    - netrwPlugin.vim-bwipe.diff:
+      + Do a full refresh of NetRW since the functionality is spread out among
+        multiple files.
+    - python.vim-ftplugin_include.diff:
+      + Fix an unescaped backslash so the option correctly matches whitespace
+        instead of the letter s.
+  * Removed patches:
+    - patches/ruby.vim-ftplugin_ri.diff:
+      + The ruby.vim in 7.1 already handles what the feature the patch was
+        adding.  (Closes: #462418)
+
+ -- James Vega <jamessan@debian.org>  Thu, 24 Jan 2008 16:54:49 -0500
+
+vim (1:7.1-231+1) unstable; urgency=low
+
+  [ Debian Vim Maintainers ]
+  * New upstream patches (176 - 231), see README.gz for details.
+    - 7.1.227 fixes an issue where syntax highlighting could cause Vim to
+      hang.  (Closes: #400771)
+
+  [ James Vega ]
+  * debian/control:
+    - Bump policy version to 3.7.3.0 - no changes needed.
+    - Drop Build-Conflicts on old version of libperl-dev.
+    - Drop versioning from Build-Depends that are available in Sarge.
+    - Drop unnecessary ruby and perl Build-Depends.
+    - Suggest ttf-dejavu instead of ttf-bitstream-vera for the gvim packages.
+      (Closes: #461295)
+    - Remove dpkg Pre-Depends now that dak is accepting data.tar.bz2.
+  * runtime/syntax/debchangelog.vim:
+    - Adjust the "Closes" syntax highlighting to allow newlines as part of the
+      whitespace.  (Closes: #460074)
+    - Recognize lenny-backports/lenny-volatile.  (Closes: #461059)
+  * runtime/syntax/debcontrol.vim: Add s390x, sh3, sh3eb, sh4, sh4eb to the
+    list of recognized architectures.  (Closes: #455993)
+  * Added patches:
+    - configure-tcl_detection.diff:
+      + Update Vim's configure script to detect Tcl again after the Tcl
+        maintainers' decision to move /usr/lib/tcl8.4/ to
+        /usr/share/tcltk/tcl8.4/.
+    - tex.vim-syntax_additions.diff:
+      + Disable spell checking for verbatim sections.  (Closes: #445295)
+    - netrwPlugin.vim-bwipe.diff:
+      + Call bwipe when opening file:// URLs to remove the extra buffers that
+        get created.  Their creation is inevitable but this will clean up the
+        buffer list.  (Closes: #370082)
+    - filetype.vim-udev.d.diff:
+      + Detect /etc/udev.d/*.rules files as 'udevrules' instead of 'hog'
+        filetype.  (Closes: #437434)
+    - vimspell.sh-typo.diff:
+      + Fix a missing end-quote in tools/vimspell.sh.
+    - mve.awk-interpreter.diff:
+      + Adjust the #! line to use awk instead of nawk.
+  * Updated patches:
+    - fstab.vim-syntax.diff:
+      + Added more sshfs support based on feedback from upstream.
+  * Removed patches:
+    - gui_gtk_x11.c_g_thread_init.diff:
+      + This patch was initially added to silence a GLib warning (#428854)
+        which isn't occurring anymore.
+  * Stop removing vimspell, vim132, and maze from the runtime tools/
+    directory.  The issues leading to their removal should be addressed
+    instead of removing them from the package.
+    - vimspell - The tempfile vulnerability (CAN-2005-0069) has been fixed
+      upstream for some time now.
+    - vim132 - Add lintian overrides for "csh is harmful" and not having a
+      Depends/Recommends/Suggests on tcsh | csh.  This is the only file in the
+      package that would use the shell and its an example script.
+    - maze - maze.c doesn't work properly and its README suggests this may be
+      the case on newer compilers and to use mazeansi.c, which does work.
+
+ -- James Vega <jamessan@debian.org>  Thu, 17 Jan 2008 13:50:30 -0500
+
+vim (1:7.1-175+2) unstable; urgency=low
+
+  * runtime/syntax/debcontrol.vim:
+    - Reworked the URL regex so that it should properly match any non-local
+      domain name as specified in RFC 1738.
+  * debian/rules:
+    - Use bzip2 to compress the vim-runtime package.
+  * Add tex.vim-update.diff, which syncs from upstream to fix some folding
+    issues.  (Closes: #456168)
+  * debian/control:
+    - Add Pre-Depends on dpkg (>= 1.10.24) for vim-runtime to please dak even
+      though Sarge has a newer dpkg.
+
+ -- James Vega <jamessan@debian.org>  Tue, 18 Dec 2007 09:13:59 -0500
+
+vim (1:7.1-175+1) unstable; urgency=low
+
+  [ James Vega ]
+  * debian/rules:
+    - Add LDFLAGS="-Wl,--as-needed" when calling configure.
+  * Fix a typo in debsources.vim-syntax.diff. (Closes: #454672)
+
+  [ Debian Vim Maintainers ]
+  * New upstream patches (168 - 175), see README.gz for details.
+
+  [ James Vega ]
+  * Add spellfile.vim-doc.diff, which explains that a writable spell directory
+    must exist for the plugin to download spell files.  (Closes: #421045)
+  * Lintian cleanup:
+    - Remove /usr/share/vim/addons/plugins/ from vim-common.dirs.
+    - Remove /usr/share/vim/vim71/tools/vim132 to silence a warning and error
+      about csh.
+    - Remove /usr/share/consolefonts/ from vim-runtime.dirs.
+    - Remove /usr/share/doc/vim-common/html/policy/ from vim-doc.dirs.
+    - Override the "desktop-command-not-in-package" warning for
+      vim-gui-common.  We make use of TryExec which should prevent the menu
+      entry from showing up if none of the gvim-providing packages are
+      installed.
+  * Move Vim's policy documentation to /usr/share/doc/vim-common/ instead of
+    being under a separate policy/ directory.
+  * runtime/ftplugin/debcontrol.vim: Correct a function definition to use !.
+    (Closes: #454933)
+  * runtime/syntax/debcontrol.vim: Don't require a three part domain for the
+    Homepage field.  (Closes: #455341)
+  * Install the presubj file under /usr/share/bug/ for every vim variant, not
+    just vim.
+  * Add versioned Conflicts/Replaces on vim-common for the vim package since
+    it contains /usr/share/bug/vim/presubj now.
+
+ -- James Vega <jamessan@debian.org>  Sun, 09 Dec 2007 17:42:17 -0500
+
+vim (1:7.1-167+1) unstable; urgency=low
+
+  [ Debian Vim Maintainers ]
+  * New upstream patches (139 - 167), see README.gz for details.
+    - 7.1.147 fixes a crash when tab completing a user's home directory.
+      (Closes: #453049)
+    - 7.1.167 fixes a crash with large values for the -c option of xxd
+      (Closes: #452789)
+
+  [ James Vega ]
+  * runtime/ftplugin/debchangelog.vim:
+    - Fix NewVersion() to use the distribution from the previous changelog
+      entry.  (Closes: #446728)
+    - Fix NewVersion() to increment the version of the first changelog entry
+      regardless of how 'startofline' is set.
+  * runtime/syntax/debchangelog.vim:
+    - Recognize oldstable* upload targets.
+  * Refreshed patches:
+    - vimrc.tiny.diff
+  * Added patches:
+    - sh.vim_syntax.diff, which fixes the syntax highlighting of escaped
+      single-quotes and comments.  (Closes: #425443, #425797)
+    - gnuada.diff, which updates the ada runtime files so they gracefully
+      handle the user not having certain variables defined.  (Closes: #440221)
+  * syntax/debcontrol.vim:
+    - Add syntax highlighting for Vcs-* control fields.  (Closes: #448543)
+  * Bump debhelper compat to 5.
+  * debian/vim-runtime.install:
+    - Remove usr/share/consolefonts/* since that's not shipped any more.
+  * debian/control:
+    - Add vim-dbg package to supply debugging symbols for the various vim
+      packages.
+    - Fix a typo in the long description for the vim package.
+    - Make use of multi-line (Build-)Depends support.
+  * debian/rules:
+    - Add binary-arch target for the vim-dbg package.
+  * debian/gvim.desktop:
+    - Add TryExec key so the menu entry is only shown if the gvim alternative
+      has been setup.
+  * Merges from Ubuntu:
+    - runtime/syntax/debcontrol.vim:
+      + Recognize restricted, universe, multiverse as part of the Section
+        field.
+      + Recognize XSBC-Original-Maintainer as a legal field.
+    - runtime/syntax/debchangelog.vim:
+      + Recognize Ubuntu releases as upload targets.
+      + Recognize syntax for closing Launchpad bugs.
+    - Add debsources.vim-syntax.diff:
+      + Recognize restricted, universe, multiverse Sections.
+      + Add more recent Ubuntu releases as recognized distributions.
+
+  [ Stefano Zacchiroli ]
+  * debian/README.Debian
+    - fix typo in vim policy URL (Closes: #452555)
+
+  [ James Vega ]
+  * Add lhaskell.vim-syntax.diff, which restricts the matching of % to the
+    beginning of the line when determining if the file is a TeX document.
+    Thanks to Chung-chieh Shan for the patch.  (Closes: #451440)
+  * Add fstab.vim-syntax.diff, which adds support for sshfs syntax.
+    (Closes: #451754)
+  * Add filetype.vim-debfiles.diff, which improves detection of debcontrol and
+    debsources files.  Thanks to LoÃ¯c Minier for the debsources part of the
+    patch.  (Closes: #435552)
+  * debian/control:
+    - Remove Norbert Tretowski from Uploaders with his permission.  Thanks for
+      all your work.
+
+ -- James Vega <jamessan@debian.org>  Mon, 03 Dec 2007 15:53:27 -0500
+
+vim (1:7.1-138+1) unstable; urgency=medium
+
+  [ Debian Vim Maintainers ]
+  * New upstream patches (136 - 138), see README.gz for details.
+
+  [ James Vega ]
+  * Fix the lintian override files to match Lintian's output.
+  * debian/rules
+    - Remove a useless command from the variant clean target
+    - Clean vim-tiny's generated debhelper files
+    - Clean generated vim-policy files
+  * Brown-paper bag bug in vim-full.preinst.  Need to grep for bin/vim.full
+    not vim/vim.full.  (Closes: #446462)
+
+ -- James Vega <jamessan@debian.org>  Sat, 13 Oct 2007 12:45:04 -0400
+
+vim (1:7.1-135+1) unstable; urgency=low
+
+  [ Debian Vim Maintainers ]
+  * New upstream patches (057 - 135), see README.gz for details.
+    - Patch 125 corrects Vim's TermResponse autocmd behavior.
+      (Closes: #436452)
+
+  [ Stefano Zacchiroli ]
+  * debian/control
+    - removing idle contributors from the Uploaders field
+
+  [ James Vega ]
+  * Add a slave link for gnome-text-editor.1.gz when we add the
+    gnome-text-editor alternative.  (Closes: #439549)
+  * Update debcontrol.vim.diff to recognize "Homepage:" (Closes: #443444) and
+    "XS-Vcs-*:" fields.
+  * Update patches/filetype.vim-better_tex_vs_plaintex.diff so it properly
+    escapes the pattern alternator (|) when determining whether the file is
+    latex.  Thanks Martin Krafft.  (Closes: #444346)
+  * Update patches/debchangelog-ftplugin.vim.diff to remove an extra
+    "foldopen" command.  (Closes: #441315)
+  * Add de.po.diff to fix the translation of "Load File".  Thanks Torsten
+    Werner.  (Closes: #443529)
+  * Add samba.vim.diff which fixes the highlighting for "smb ports".  Thanks
+    Alberto Reyes.  (Closes: #386064)
+  * Add tex.vim-syntax_additions.diff, which adds syntax highlighting for
+    acronyms, URLs, and citetest.  (Closes: #444411, #444408, #444301)
+  * Update menu file to use Applications instead of Apps and to require the
+    gvim package to be installed in order to display the entry.
+  * Update desktop file to remove legacy category.
+  * debian/rules:
+    - Remove vim-{python,perl,tcl,ruby,full} variants.
+    - Add vim-nox which has all language bindings but no X requirement.
+    - Include all language bindings when building vim-gtk.
+  * debian/control:
+    - Add Homepage field.
+    - Remove Build-Depends on dpkg and dpkg-dev since the specific versions we
+      need are older than what's in stable.
+    - Make vim-full a transition package Depending on vim-gnome.
+    - Make vim-{python,perl,tcl,ruby} transition packages Depending on
+      vim-gtk.
+
+ -- James Vega <jamessan@debian.org>  Sun, 07 Oct 2007 15:47:26 -0400
+
+vim (1:7.1-056+2) unstable; urgency=low
+
+  * Brown paper bag release -- vimrc.tiny should not be calling :let since
+    vim.tiny doesn't support that command.  Copy the 'runtimepath' setting to
+    vimrc.tiny since that was the only reason we needed the :let and
+    "runtime!  debian.vim" commands.  (Closes: #436925)
+
+ -- James Vega <jamessan@debian.org>  Thu, 09 Aug 2007 10:57:51 -0400
+
+vim (1:7.1-056+1) unstable; urgency=low
+
+  [ Debian Vim Maintainers ]
+  * New upstream patches (023 - 056), see README.gz for details.
+
+  [ Pierre Habouzit ]
+  * Make sure reportbug vim/presubj is named that way, without a `vim.` prefix
+    making reporbug skip it.
+
+  [ Stefano Zacchiroli ]
+  * Add a entry to debian/NEWS describing why /usr/share/vim/addons/ is no
+    longer in the runtimepath and pointing to the appropriate documentation
+
+  [ James Vega ]
+  * Add verilog.vim_ftplugin-cpoptions.diff, which locally enables line
+    continuations for the ftplugin in order to prevent an error when being run
+    in vi-compatible mode.  (Closes: #430372)
+  * Build vim with the huge feature set to pull in +profile (the only
+    difference between the big and huge feature sets).
+  * Remove the !hurd-i386 restriction from the tcl8.4-dev Build-Depends now
+    that the package exists on hurd-i386.  This allows building the vim-tcl
+    package for hurd-i386.  (Closes: #434435)
+  * Remove the hacks we were doing to try and build vim-tiny with extra
+    features.  Simply build vim-tiny using Vim's "small" feature set.  This
+    removes a number of features but allows the package to build with the
+    current upstream patches.  This also lessens the maintenance burden since
+    we no longer have to figure out which features to enable via trial and
+    error.
+  * debian/rules:
+    - Separate out {clean,configure,build}-stamp-vim-tiny targets
+    - Move the handling of the vimrc.tiny patch to the new *-vim-tiny targets.
+    - Remove configure-stamp* files in the clean target.
+    - Move the fake help files for vim-tiny from /usr/share/vim/doc to
+      /usr/share/vim/$VIMCUR so the user can actually see them when invoking
+      :help.
+  * Add ruby.vim_indent.diff, which fixes some improper indenting for Ruby
+    files.  (Closes: #431212)
+  * Refresh vimrc.tiny.diff
+  * Add index.txt.diff, which adds some missing cross-references to the index
+    of Vim commands.  (Closes: #434447)
+  * debian/control:
+    - Remove Conflicts/Replaces on packages that are older than Etch.
+    - Add a Replaces to vim-runtime since it ships files that overwrite files
+      in vim-tiny.
+    - Add a Conflicts to vim-tiny for earlier versions of vim-runtime to make
+      sure we don't attempt to overwrite files in versions of vim-runtime that
+      don't Replace vim-tiny.
+
+ -- James Vega <jamessan@debian.org>  Wed, 08 Aug 2007 00:18:16 -0400
+
+vim (1:7.1-022+1) unstable; urgency=low
+
+  [ Debian Vim Maintainers ]
+  * New upstream patches (001 - 022), see README.gz for details.
+    + Load all matching files in $VIMRUNTIME when using ":syn include"
+      (Closes: #395517)
+
+  [ James Vega ]
+  * Add changelog.vim-date_end_entry.diff, which fixes a variable name which
+    is let in changelog.vim.  (Closes: #424224)
+  * Remove 'viminfo' and 'textwidth' settings from $VIMRUNTIME/debian.vim.  We
+    were uselessly setting 'textwidth' to the default value and 'viminfo' to
+    an almost-default but less useful value.
+  * Add Makefile_no-strip.diff, which removes the calls to strip in upstream's
+    makefile.  We'll handle that in debian/rules.
+  * gvim.desktop should be using %F instead of %U to specify the filename.
+    (Closes: #406586)
+  * Remove debian/vim-{doc,variant,gui-common,common}.preinst,
+    debian/vim-common.postinst as they all handled special procedures for
+    upgrading from Sarge.
+  * debian/control
+    - Clarify the package description for the vim package to indicate it does
+      not provide a GUI version of Vim.
+  * debian/rules
+    - Update the extract and clean targets to not fail if quilt exits with
+      $? == 2.  Also, remove the .pc directory in the clean target.
+    - Remove preinst from the list of per-variant files
+  * Add spell.c_getc-eof.diff, which causes Vim to stop reading a truncated
+    spellfile when it reaches EOF.
+  * debian/runtime/debian.vim.in
+    - set 'nomodeline' by default since modelines have historically been a
+      source of security/resource vulnerabilities.  Users should have to
+      explicitly enable the option to assume the associated risks.
+  * Add gui_gtk_x11.c_g_thread_init.diff, which prevents a glib warning
+    related to glib 2.10's Memory Slices and threads.  (Closes: #428854)
+
+  [ Stefano Zacchiroli ]
+  * Add javac_cmdline-vim.diff, which fixes the invocation of the javac
+    compiler. (Closes: #408338)
+  * Add debchangelog-closes_omni.vim.diff, which add omni completion support
+    for "Closes: #..." retrieving data from the BTS via apt-listbugs
+  * Added the new Debian Vim Policy to the "vim-doc" package, overriding the
+    old unenforced one
+  * debian/runtime/debian.vim.in
+    - removing /usr/share/vim/addons/{,after/} from the vim runtimepath:
+      according to the VIM policy addons should not be enabled per default,
+      but manually using vim-addon-manager
+  * debian/control
+    - added build deps on docbook stuff to build the policy (note that this
+      includes lynx, due to #387035)
+  * Add map.vim-syntax.diff which ships syntax file for UMN map server
+    (Closes: #355900)
+
+ -- James Vega <jamessan@debian.org>  Sat, 07 Jul 2007 15:04:57 -0400
+
+vim (1:7.1-000+1) unstable; urgency=low
+
+  [ Debian Vim Maintainers ]
+  * New upstream release (7.1)
+
+  [ James Vega ]
+  * debian/rules:
+    + Remove extraneous update-snapshot target since snapshots are being
+      handled similar to normal releases, but in a different directory on the
+      ftp server.
+  * upstream/patches:
+    + Remove all the 7.0 patches
+  * Removed patches:
+    + de.po.diff, applied upstream.
+    + zsh.vim-nested_quotes.diff, New upstream rewrite fixes the same problem
+      as our patch.
+    + mp.vim-cmd_check.diff, applied upstream.
+    + html.vim-syntax_spell.diff, applied upstream.
+    + changelog.vim-ftplugin_buffer-split.diff, applied upstream.
+    + netrw.vim-tmpfile_suffix_escape.diff, applied upstream.
+  * Refreshed patches:
+    + php.vim.diff, simple rediff against new upstream.
+    + dosini.vim-hash_comment.diff, simple rediff against new upstream.
+  * Updated patches:
+    + debchangelog-ftplugin.diff
+      - Call foldopen silently so Vim doesn't error if there are no folds.
+        (Closes: #416184)
+      - Allow users to "let g:debchangelog_fold_disabled" to disable automatic
+        folding of debchangelogs.  'foldexpr' and 'foldtext' will still be set
+        but 'foldmethod' will not be set to 'expr'.
+
+ -- James Vega <jamessan@debian.org>  Sat, 12 May 2007 13:24:27 -0400
+
+vim (1:7.0-219+1) unstable; urgency=low
+
+  [ Debian Vim Maintainers ]
+  * New upstream patches (165 - 219), see README.gz for details.
+
+  [ Stefano Zacchiroli ]
+  * vim-addons support:
+    - converted to YAML the registry entry for matchit
+  * debian/control
+    - added XS-Vcs-Browser field
+
+  [ James Vega ]
+  * Fix the file test for deciding whether we need to remove alternatives to
+    properly transition the Russian manpage alternatives.
+  * Fix the handling of the stale diversion when /usr/bin/vim.org is already
+    missing.
+  * Fix the handling of alternatives which pointed at the stale alternative so
+    the alternative isn't changed from auto to manual.
+  * Remove the 'iskeyword' setting in Ruby's ftplugin as suggested by Tim
+    Pope in #389332.
+  * Add patches/netrw.vim-tmpfile_suffix_escape.diff, which escapes the suffix
+    of the tmpfile filename.
+
+ -- James Vega <jamessan@debian.org>  Tue, 20 Mar 2007 18:27:27 -0400
+
+vim (1:7.0-164+3) unstable; urgency=low
+
+  [ James Vega ]
+  * Remove the patch notes for patches after 164 in debian/README.  Forgot
+    about those when removing the patches from svn to prepare the last upload.
+
+ -- James Vega <jamessan@debian.org>  Sun, 14 Jan 2007 10:13:00 -0500
+
+vim (1:7.0-164+2) unstable; urgency=medium
+
+  [ James Vega ]
+  * debian/vim-variant.preinst:
+    + Move diversion removal here from vim-variant.postinst.  Manually remove
+      /usr/bin/vim in order to be able to remove the diversion.  Fixes
+      upgrades from Sarge leaving behind stale binaries.  (closes: #401000)
+    + Remove the alternatives for ru.{UTF-8,KOI8-R} manpages so the
+      alternatives system doesn't attempt to keep the links around after the
+      upgrade.  Fixes upgrades from Etch.  (closes: #399024)
+
+ -- James Vega <jamessan@debian.org>  Thu,  4 Jan 2007 01:50:25 -0500
+
+vim (1:7.0-164+1) unstable; urgency=low
+
+  [ Debian Vim Maintainers ]
+  * New upstream patches (159 - 164), see README.gz for details.
+
+  [ James Vega ]
+  * Shipped tags file was being regenerated (closes: #397837)
+    - Do not pre-generate tags file, vim-runtime's postinst is already
+      handling tag generation
+    - Remove tags file in vim-runtime's postrm
+  * Add Provides: editor to the gvim variants.  (closes: #398572)
+  * Remove the empty vim-variant.postrm.
+  * Move the Russian KOI8-R man pages to /usr/share/man/ru/man1 and remove the
+    utf8 man pages.  man will handle the conversion.  (closes: #368754)
+
+ -- James Vega <jamessan@debian.org>  Wed, 15 Nov 2006 08:48:51 -0500
+
+vim (1:7.0-158+1) unstable; urgency=medium
+
+  [ Debian Vim Maintainers ]
+  * New upstream patches (153 - 158), see README.gz for details.
+    - Do not let the fold level become negative. (closes: #395413)
+  * Urgency medium since #396934 affects other packages.
+
+  [ James Vega ]
+  * Add vim-runtime.postinst which runs helpztags so that we don't break the
+    help for other Vim addons everytime vim-runtime is upgraded.
+    (closes: #396934)
+  * Update the vim-basic install target in debian/rules to not rely on the
+    vimcurrent symlink before it has been setup.
+
+ -- James Vega <jamessan@debian.org>  Mon,  6 Nov 2006 22:41:59 -0500
+
+vim (1:7.0-152+1) unstable; urgency=low
+
+  [ Debian Vim Maintainers ]
+  * New upstream patches (123 - 152), see README.gz for details.
+    - Correct the button order in the GTK+ file chooser dialog so that it
+      matches the GNOME Human Interface Guidelines. (closes: #367639)
+
+  [ James Vega ]
+  * Bump vim-common's priority to important to match the override.
+  * Remove patch gui_gtk.c-abs_path.diff, merged upstream.
+  * Remove patch gui_xmebw.c-lesstif_crash.diff, merged upstream.
+  * Add patch html.vim-syntax_spell.diff, which adds support for highlighting
+    of spelling mistakes. (closes: #393347)
+  * Add patch changelog.vim-ftplugin_split-buffer.diff, which corrects an
+    invalid command used for opening the changelog in a split window.
+    (closes: #392840)
+
+  [ Stefano Zacchiroli ]
+  * Added patch dosini.vim-hash_comment.diff which adds support for # comments
+    in dosini syntax highlighting, thanks to Adeodato SimÃ³. (closes: #378952)
+  * Added patch zh_TW.po-swap_recovery_typo.diff which fixes a typo in a
+    traditional Chinese message when editing a file for which a swap file
+    already exists. (closes: #347420)
+  * debian/control
+    - renamed svn info field to XS-Vcs-Svn, to match the forthcoming official
+      name
+
+ -- Stefano Zacchiroli <zack@debian.org>  Wed, 25 Oct 2006 17:07:37 +0200
+
+vim (1:7.0-122+1) unstable; urgency=medium
+
+  [ Debian Vim Maintainers ]
+  * New upstream patches (095 - 122), see README.gz for details.
+  * Urgency medium for RC bug fixes.
+
+  [ James Vega ]
+  * Since vim-gui-common no longer depends on vim-common (to allow for
+    binNMUing), make /usr/share/doc/vim-gui-common a directory instead of a
+    symlink to /usr/share/doc/vim-common. (closes: #387794)
+  * Add versioned Conflicts/Replaces against vim-doc for vim to allow proper
+    upgrades from Sarge. (closes: #381526)
+  * Update debian/copyright with the license information for the user and
+    reference manuals.
+  * Add patch zsh.vim-nested_quotes.diff, which fixes handling of single
+    quotes nested inside double quotes. (closes: #390911)
+  * Add a gnome-icon-theme Suggests for the packages which use a GTK/Gnome
+    GUI.
+  * Build vim-tiny with multibyte support. (closes: #361378)
+  * Add patch gui_gtk.c-abs_path.diff, which ensures the GTK file selection
+    dialog remembers the previously used directory. (closes: #368668)
+  * Add mp.vim-cmd_check.diff, which fixes an incorrect boolean check.
+    (closes: #384154)
+
+  [ Stefano Zacchiroli ]
+  * Added patches perl.vim-ftplugin_perldoc.diff,
+    perl.vim-ftplugin_pydoc.diff, and ruby.vim-ftplugin_ri.diff, which trigger
+    usage of perldoc/pydoc/ri for keyword lookup on perl/python/ruby files.
+    (closes: #389332)
+
+ -- James Vega <jamessan@debian.org>  Mon,  9 Oct 2006 19:37:58 -0400
+
+vim (1:7.0-094+1) unstable; urgency=medium
+
+  [ Debian Vim Maintainers ]
+  * New upstream patches (036 - 094), see README.gz for details.
+  * Urgency medium because of the fix to vim-lesstif's crash bug.
+
+  [ James Vega ]
+  * Add patches/de.po.diff, which differentiates between "Delete" and
+    "Readonly" swap recovery messages for the German translation.
+    (closes: #379507)
+  * Update patches/scripts.vim.diff to add recognition of rst (including
+    rest2web) files as the filetype 'rst'. (closes: #382541)
+  * Update debian/rules to generate helptags for the plugins that are in
+    /usr/share/vim/addons.
+  * Add patches/gui_xmebw.c-lesstif_crash.diff, which fixes the crash bug when
+    invoking gvim from the vim-lesstif variant. Thanks Ben Hutchings!
+    (closes: #378721)
+
+  [ Stefano Zacchiroli ]
+  * Modified patches/debchangelog.vim.diff so that when opening a changelog
+    the entry the cursor is on gets (recursively) unfolded.
+  * Added patches/filetype.vim-better_tex_vs_plaintex.diff, implementing
+    better recognition of tex vs plaintex filetype (namely it recognizes as
+    latex files containing sectioning commands). (closes: #384479)
+  * Added script upstream/patches/get_patches.py to automate downloading of
+    latest upstream patches.
+  * debian/control
+    - bumped Standards-Version to 3.7.2 (no changes needed)
+    - added X-Vcs-Svn field to source package
+
+ -- Stefano Zacchiroli <zack@debian.org>  Sun, 10 Sep 2006 11:59:14 +0200
+
+vim (1:7.0-035+1) unstable; urgency=low
+
+  [ Debian Vim Maintainers ]
+  * New upstream patches (018 - 035), see README.gz for details.
+
+  [ James Vega ]
+  * debian/control: Make Vim binNMUable.
+  * Rename the augroup in $VIMRUNTIME/debian.vim so it doesn't conflict with
+    Vim's FileType autocmd event.
+  * Update patches/debcontrol.vim.diff to fix the package name regexp.
+    (closes: #375848)
+  * Update patches/debcontrol.vim.diff to include XS-Python-Version and
+    XB-Python-Version.  (closes: #373661)
+  * Add patches/php.vim.diff, which removes the 'delete' keyword from PHP's
+    syntax highlighting.  (closes: #368089)
+
+  [ Stefano Zacchiroli ]
+  * Removed patch edit.c.diff, no longer needed after upstream patch 023
+
+ -- James Vega <jamessan@debian.org>  Mon,  3 Jul 2006 01:43:11 -0400
+
+vim (1:7.0-017+8) unstable; urgency=medium
+
+  * Rebuild with fixed libruby1.8.  Urgency medium since vim-full and vim-ruby
+    can now be properly configured.
+    (closes: #373696, #373762, #373890, #374060)
+
+ -- James Vega <jamessan@debian.org>  Sat, 17 Jun 2006 22:18:20 -0400
+
+vim (1:7.0-017+7) unstable; urgency=low
+
+  * Update $VIMRUNTIME/debian.vim and /etc/vim/vimrc.tiny to properly set
+    'compatible' when vim-tiny is invoked as vi.  (closes: #373680)
+
+ -- James Vega <jamessan@debian.org>  Wed, 14 Jun 2006 23:18:11 -0400
+
+vim (1:7.0-017+6) unstable; urgency=low
+
+  [ Pierre Habouzit ]
+  * Add a Replace: vim-runtime to vim-common because of the vimcurrent mess,
+    that may prevent vim upgrade. (closes: #370012, #373117).
+
+  [ James Vega ]
+  * Add vim-variant.preinst to remove any cruft left behind in
+    /usr/share/doc/vim{,-$variant}, which is now a symlink to
+    /usr/share/vim/vim-common.  (closes: #369740)
+  * Update the build process so only vim-tiny starts in 'compatible' mode when
+    invoked as vi.
+    + Move patches/virc.c.diff to debian/tiny/vimrc.tiny.diff and apply only
+      when building vim-tiny.
+    + Rename /etc/vim/virc to /etc/vim/vimrc.tiny and add
+      vim-common.{post,pre}inst code to handle the conffile renaming.
+  * Update README.Debian to specify which package contains the vim policy and
+    the correct directory that holds vim policy.
+  * Add debchangelog.vim.diff which fixes an inifinite loop bug in the
+    debchangelog filetype plugin.  (closes: #367566)
+  * Add scripts.vim.diff which adds recognition of ltrace output and sets the
+    filetype to 'strace'.  (closes: #372926)
+
+ -- James Vega <jamessan@debian.org>  Tue, 13 Jun 2006 11:06:59 -0400
+
+vim (1:7.0-017+5) unstable; urgency=low
+
+  [ James Vega ]
+  * Added po.vim.diff which locally enables line continuations while sourcing
+    the po.vim syntax file.  (closes: #368589)
+  * Re-add /usr/share/vim/vimcurrent as a convenience symlink.
+    (closes: #369124)
+  * Add python.vim-ftplugin_include.diff which sets the 'include' option to a
+    stricter value to reduce the chance of mis-highlights.  (closes: #367259)
+  * Add mysql.vim-syntax_comment.diff which corrects a syntax pattern for
+    MySQL comments.  (closes: #367777)
+
+ -- James Vega <jamessan@debian.org>  Wed, 31 May 2006 12:39:44 -0400
+
+vim (1:7.0-017+4) unstable; urgency=low
+
+  [ James Vega ]
+  * Added edit.c.diff which fixes a crash when exiting insert mode spell
+    completion.
+  * Revert changes to alternative handling in vim-variant.prerm.  They should
+    only be removed during a remove, not an upgrade.  (closes: #368175)
+  * Move the removal of stale alternatives to vim-variant.prerm where it
+    should've been to begin with.  Also, tighten the matching done when
+    deciding which alternatives are removed.  Only alternatives pointing to
+    /usr/bin/vim should be removed since those are the known stale
+    alternatives.
+  * Remove support for building spellfiles as will be moved to another set of
+    packages.
+    + debian/control: Remove Build-Depends-Indep which was only used for
+      spellfile building.
+    + debian/rules: Remove build-spell* and build-locales* targets.
+    + Remove debian/locale-gen
+    + Remove bg_BG.diff.diff and spell-locales.diff.
+
+ -- James Vega <jamessan@debian.org>  Sat, 20 May 2006 21:57:31 -0400
+
+vim (1:7.0-017+3) unstable; urgency=low
+
+  [ James Vega ]
+  * Add support for building l10n spellfiles.
+    + Added unzip, aap, and locales to Build-Depends-Indep.
+    + Added debian/locale-gen to build the locale info.
+    + Update debian/rules to build spellfiles (temporarly disabled).
+      - Added a check for 'nospell' in DEB_BUILD_OPTIONS to prevent building
+        the spellfiles.
+    + Added spell-locales.diff patch which updates the aap recipes to set the
+      LC_ALL environment variable instead of LANG.
+    + Added bg_BG.diff.diff patch which fixes the line-endings in the
+      bg_BG.diff patch, allowing it to apply cleanly.
+  * Add /usr/share/vim/virc symlink, with this fix invoking vim as "vi" will
+    actually enable vim to behave differently than when invoked as "vim".
+    (closes: #367818)
+
+ -- James Vega <jamessan@debian.org>  Thu, 18 May 2006 08:11:15 -0400
+
+vim (1:7.0-017+2) unstable; urgency=low
+
+  [ Debian Vim Maintainers ]
+  * Upload to unstable
+
+  [ James Vega ]
+  * Update debian/vim-variant.prerm to remove alternative also during
+    upgrades.
+  * Add debian/vim-variant.preinst to cleanup alternatives left behind from
+    previous vim-variant.prerm scripts.
+
+ -- Stefano Zacchiroli <zack@debian.org>  Tue, 16 May 2006 22:10:49 -0500
+
+vim (1:7.0-017+1) experimental; urgency=low
+
+  [ Debian Vim Maintainers ]
+  * New upstream patches (011 - 017), see README.gz for details.
+
+  [ Stefano Zacchiroli ]
+  * Preliminary support for add-on infrastructure
+    + added symlinks from /usr/share/vim/addons/ to $VIMRUNTIME for the
+      matchit plugin, so that they are no longer version dependent
+    + added dir /var/lib/vim/addons/, now in the runtimepath
+    + added vim add-on registry entry for the matchit plugin
+  * Differentiated behaviour of Vim when invoked as "vi"
+    + added patch patches/virc.c.diff which source /etc/vim/virc when invoked
+      as such
+    + added debian/runtime/virc; it creates a vi-like environment setting
+      'compatible' and nothing else
+  * Raised the alternative priority of vim.basic from 20 to 30. Rationale: the
+    relative order we want to achieve is vim.tiny < nvi < vim.basic
+  * vim-tiny is ready to enter the base system
+    + set vim-tiny priority to Important
+
+  [ Norbert Tretkowski ]
+  * Removed outdated runtime files from package.
+  * Added s390x to debcontrolArchitecture in debcontrol.vim. (closes: #361281)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sat, 13 May 2006 13:23:35 -0500
+
+vim (1:7.0-010+1) experimental; urgency=low
+
+  [ Debian Vim Maintainers ]
+  * New upstream release (7.0) and patches (001 - 010), see README.gz for
+    details.  (closes: #366396)
+    + CSS syntax highlighting properly handles non-UTF-8 aware environments.
+      (closes: #358734)
+    + crontab syntax highlighting recognizes % as starting stdin to the
+      cronjob. (closes: #363558)
+    + non-ASCII characters are properly handled when changing case in
+      :substitute commands. (closes: #266256)
+
+  [ James Vega ]
+  * Massage the packaging back into "stable upstream releases" mode.
+    + Remove debian/watch since it isn't useful with Vim's method of releasing
+      stable updates.
+    + Swap out the unzip Build-Depends for bzip2.
+    + Update debian/rules to use the src/lang/extra tarballs instead of one
+      zip file.
+
+  [ Stefano Zacchiroli ]
+  * handle debian/*.in files as autoconf files filling the @VIMCUR@
+    placeholder with the appropriate vim<version> string
+  * got rid of the /usr/share/vim/vimcurrent symlink, no longer needed now we
+    source debian.vim (closes: #366504)
+  * source vimrc.local/gvimrc.local from system-wide vimrc/gvimrc since a lot
+    of users have it, added a comment about that file being deprecated
+  * added a comment to system-wide gvimrc about how to obtain a reversed video
+    vim gui
+
+ -- James Vega <jamessan@debian.org>  Thu, 11 May 2006 08:54:38 -0400
+
+vim (1:6.4+7.0g01-1) experimental; urgency=low
+
+  [ Debian Vim Maintainers ]
+  * New upstream snapshot (7.0g01).
+    + Remove 161_cmake-support.diff, merged upstream.
+    + Recognize zsh-beta as a shell that supports '2>&1| tee' for the
+      'shellpipe' option. (closes: #362999)
+    + Assign filetype=php to any .php<digit> filename. (closes: #365055)
+    + Recognition in debcontrol's syntax file of all architectures listed at
+      http://www.debian.org/ports/ (closes: 364824)
+
+  [ Stefano Zacchiroli ]
+  * Screening of patches no longer needed with vim7 & pushing upstream
+    of as many debian-specific patches as possible. Results:
+    + removed patches: 102_pythoncomplete.vim.diff, 104_debchangelog.vim.diff,
+      106_fstab.vim.diff, 108_automake.vim.diff, 109_xdefaults.vim.diff,
+      111_fstab.vim.diff, 119_php.vim.diff, 130_fstab.vim.diff,
+      133_resolv.vim.diff, 136_muttrc.vim.diff, 140_muttrc.vim.diff,
+      148_debchangelog.vim.diff, 157_slrnrc.vim.diff, 201_fr.po.diff,
+      203_zh_TW.UTF8.po.diff
+    + The following runtime and translation files are now maintained upstream
+      in a best effort fashion (i.e. they are looking for a new maintainer) by
+      Debian VIM Maintainers: syntax/muttrc.vim, syntax/automake.vim,
+      syntax/php.vim, syntax/slrnrc.vim, lang/po/zh_TW.UTF-8.po.
+    + syntax/debchangelog.vim, syntax/debcontrol.vim, and syntax/tpp.vim are
+      now officially co-maintained upstream by Debian Vim Maintainers
+  * Improved comments and added more commented settings in /etc/vim/vimrc
+
+  [ James Vega ]
+  * Add Replaces against manpages-it and manpages-pl since upstream now
+    provides i10n manpages. (closes: #364299)
+  * Moved Debian specific settings out from /etc/vim/{,g}vimrc, so that the
+    file can be (more) freely modified by sysadmins without risking merge
+    problems with maintainer updates.
+
+ -- James Vega <jamessan@debian.org>  Wed,  3 May 2006 12:34:14 -0400
+
+vim (1:6.4+7.0d03-1) experimental; urgency=low
+
+  [ Debian Vim Maintainers ]
+  * New upstream snapshot (7.0d03).
+    + A lot of new features have been added, most notably: spell checking,
+      omni completion, tabs, undo branches, internal grep, location lists,
+      list/dictionary/funcref types for scripting.
+      See ":help version7" for more information.
+    + bugfixes affecting Debian's BTS:
+      - new version of sh.vim syntax highlighting (closes: #355273, #361813)
+      - respect LC_MESSAGES in menus (closes: #147757, #217217)
+      - consistent behaviour of 'gq' when an external formatter is used
+        (closes: #177735)
+      - improved wildcard expansion of filename patterns
+        (closes: #262645, #258150)
+      - german tutorial now shows instruction on how to proceed in the first
+        page (closes: #289115)
+      - fixed encoding of slovak translation (closes: #257342)
+      - proper escaping of characters in URLs (closes: #353076, #361317)
+      - added g:is_posix flag to sh.vim to enable highlighting of POSIX shell
+        scripts (closes: #361177)
+
+  [ Stefano Zacchiroli ]
+  * Screening of patches no longer needed with vim7 & pushing upstream
+    of as many debian-specific patches as possible. Results:
+    + removed patches: 101_make.vim.diff, 103_sh.vim.diff,
+      117_fortram.vim.diff, 122_html_indent.vim.diff, 135_debsources.vim.diff,
+      145_fortran.vim.diff, 155_rst.vim.diff
+    + removed updates: debian/updates/debsources.vim
+
+ -- James Vega <jamessan@debian.org>  Fri, 14 Apr 2006 13:29:49 -0400
+
+vim (1:6.4+7.0c05-1) experimental; urgency=low
+
+  [ Debian Vim Maintainers ]
+  * New upstream snapshot (7.0c05).
+    + Added support for bzr diffs in scripts.vim, thanks to Adeodato SimÃ³.
+      (closes: #355922)
+    + Support python `as' keyword. (closes: #352885)
+
+  [ James Vega ]
+  * Sync with the work that's been done on the 6.4 vim package.
+  * Add a missing quote in /etc/vim/vimrc's last-position-jump example.
+    (closes: #347597)
+  * Move vimtutor.1 to the same package (vim-runtime) as vimtutor.
+    Fixes a lintian warning.
+  * Add debian/watch.
+  * Cleanup handling of manpages and alternatives. (closes: 361845)
+  * debian/control:
+    + Remove references to obsolete packages.
+    + Move vim-doc to Section: doc.
+    + Update vim-common to Recommend all the vim variants.
+    + Add Build-Depends on libxpm-dev and unzip.
+  * debian/rules:
+    + Added support for running upstream's tests during the build process.
+    + Automatically generate the necessary .install/.links/.postinst settings
+      for installing the localized manpages.
+
+  [ Pierre Habouzit ]
+  * Add support for cmake (from cmake.org). (closes: #357705)
+  * debcontrol.vim: add kfreebsd-amd64 to the ports list.
+
+  [ Stefano Zacchiroli ]
+  * Screening of patches no longer needed with vim7 & pushing upstream
+    of as many debian-specific patches as possible. Results:
+    + removed patches: 102_filetype.vim.diff, 107_vim.1.diff, 107_xxd.1.diff,
+      105_recognize-gnumakefile-am.diff, 123_accents.diff,
+      133_filetype.vim.diff, 142_filetype.vim.diff, 153_filetype.vim.diff,
+      154_svn.vim.diff, 156_scripts.vim.diff, 158_python.vim.diff,
+      301_xxd.c.diff, 303_option.c.diff, 305_term.c.diff
+  * Added patch 102_pycomplete.vim: fixes a python omnicompletion bug when the
+    cursor is on an empty line
+
+  [ Matthijs Mohlmann ]
+  * Updated debsources syntax file.
+    + Use debsources instead of sources.
+    + Make a regexpression of deb, deb-src, main, contrib and non-free.
+    + Remove setlocal iskeyword.
+    + Remove compatibility with vim 5.x.
+
+ -- James Vega <jamessan@debian.org>  Fri, 31 Mar 2006 17:50:11 -0500
+
+vim (1:6.4-007+1) unstable; urgency=low
+
+  [ Debian VIM Maintainers ]
+  * New upstream patch (007), see README.gz for details.
+
+  [ Stefano Zacchiroli ]
+  * Handle /usr/bin/gvim with alternatives, so that it can be configured
+    to a vim executable with gui support when /usr/bin/vim is configured
+    to one with no such support. (closes: #345765)
+
+  [ Pierre Habouzit ]
+  * vim's syntax coloring mode should consider .sce extension.
+    (Closes: #338771)
+  * subversion commit log syntax and l10n. (Closes: #341288)
+  * dh_install bug #349070 triggerd our svn.vim problem.
+    (rebuild Closes: #348955).
+  * enhances syntax/rst.vim. (Closes: #323044)
+
+  [ James Vega ]
+  * Move alternatives handling out of vim-common so that we aren't modifying
+    alternatives when the targets don't yet exist.  (closes: #348233)
+  * Add 'armeb' to debcontrol syntax file. (closes: #350513)
+  * debian/rules: Remove all binaries except xxd from vim-common. Handle the
+    rest with alternatives in the variant packages.
+  * debian/control: Changed vim-gui-common to Arch: all
+  * Added patch 156_scripts.vim.diff which adds detection of svk diffs as diff
+    filetype. (closes: #349764)
+  * Added patch 157_slrnrc.vim.diff which adds a few more functions to the
+    slrnrc syntax file. (closes: #347801)
+  * Added commented out example autocmd for last-position-jump to
+    /etc/vim/vimrc. (closes: #347597)
+  * Lintian cleanup:
+    + debian/control: Added a Depends line for vim-common.
+    + debian/rules: Use proper permissions when installing the console font in
+      vim-runtime
+    + debian/rules: Create a symlink to /usr/share/doc/vim-gui-common for each
+      GUI variant package.  This fixes a usr-doc-symlink-without-dependency
+      warning.
+
+ -- James Vega <jamessan@debian.org>  Wed,  8 Feb 2006 15:11:37 -0500
+
+vim (1:6.4-006+2) unstable; urgency=low
+
+  [ Norbert Tretkowski ]
+  * debian/README.Debian: fixed typos (closes: #344608)
+  * patches/148_debchangelog.vim.diff: added sarge-{backports|volatile} to
+    debchangelog hilighting
+  * debian/control: removed build-dependencies added for woody backport
+  * debian/control: build-depend on make (>= 3.80+3.81.b4)
+
+  [ Matthijs Mohlmann and Stefano Zacchiroli ]
+  * debian/rules: moved "export DH_OPTIONS" back to the beginning of the
+    file since old versions of make can't cope with it on
+    target-specific variables. Fixes FTBFS on some archs.
+    (closes: #344658)
+
+  [ Stefano Zacchiroli ]
+  * debian/rules: added 'export' target to generate source package
+  * debian/rules: uses quilt to manage debian-specific patches, changed
+    build-deps accordingly
+  * Added patch 152_javascript.vim which fixes JavaScript syntax
+    highlighting (closes: #343402)
+
+  [ Pierre Habouzit ]
+  * debian/control: fix vim-gui-common description. (closes: #347912)
+  * 304_memline.c.diff causes FTBFS on Hurd, fix it. (closes: #348170)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sun, 15 Jan 2006 19:41:58 +0100
+
+vim (1:6.4-006+1) unstable; urgency=low
+
+  [ Debian VIM Maintainers ]
+  * New upstream patches (005 and 006), see README.gz for details.
+
+  [ Stefano Zacchiroli ]
+  * Epoched all 6.4 versioned relationships in debian/control, they were
+    erroneously non-epoched. (closes: #344368, #344414)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Fri, 23 Dec 2005 00:30:20 +0100
+
+vim (1:6.4-004+2) unstable; urgency=low
+
+  [ Norbert Tretkowski ]
+  * Applied patch from Adeodato SimÃ³ to fix broken syntax hilighting
+    of urgency in debchangelog.vim. (closes: #338557, #343136, #344228)
+  * No longer lists a mailinglist as uploader in changelog, until a consensus
+    about policy items 4.4 and 5.6.4 is found. (closes: #343073)
+
+  [ Stefano Zacchiroli ]
+  * Fixed typo in vim-gui-common description. (closes: #343152)
+  * Remove old /usr/share/doc/vim-common symlink during vim-doc and
+    vim-common preinst phase. (closes: #343289)
+  * debian/rules: finally found the karma of target-specific variables,
+    hopefully the file is clearer now ... Fixes FTBFS on hppa.
+    (closes: #344150)
+  * Fixed dangling manpage symlinks in vim-gui-common.
+    (closes: #344179, #343195, #343171)
+  * Moved vimtutor from vim-common to vim-runtime
+  * Added patch 151_sed.vim which improves sed's syntax highlighting.
+    (closes: #336125)
+  * Added patch 305_term.c which fixes 'pastetoggle' for working
+    properly with F1-F4 keys on Debian xterm's. (closes: #342220)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Wed, 21 Dec 2005 10:09:37 +0100
+
+vim (1:6.4-004+1) unstable; urgency=low
+
+  [ Debian VIM Maintainers ]
+  * New upstream patches (002 to 004), see README.gz for details.
+
+  [ Stefano Zacchiroli ]
+  * Added back vim-tiny package. (closes: #222138)
+  * Reshaped vim packaging as follows:
+    - vim-common -> arch-dependent common files (variants w/o GUI)
+    - vim-gui-common -> arch-dependent common files (variants w GUI)
+      (closes: #338027)
+    - vim-runtime -> vim runtime (arch-independent)
+    - vim -> default variant
+    - vim-* -> other variants
+    - vim-tiny -> tiny variant, no vim-runtime dependency
+    - the above changes additionally got rid of circular dependency
+      vim -> vim-common -> vim (closes: #340037)
+  * Added symlink /usr/share/vim/vimcurrent -> vim64, will be kept
+    proper in future releases. /etc/vim/vimrc no longer version-aware.
+  * Removed duplicate /usr/share/vim/vimfiles entry in vimrc.
+    (closes: #337825)
+  * (Re-)Fixed debian/runtime/vimrc, last version inhibit /usr/bin/ex.
+  * au commands in vimrc executed only if has("autocmd").
+  * No longer try to move configuration files from /etc to /etc/vim
+    (ancient preinst, no longer needed to support upgrades from sarge).
+  * Updated Description-s in debian/control.
+  * Check for and removal of old vim.org diversion in postinst instead
+    of postrm (closes: #341081)
+  * Adds gvim, when compiled with gnome support, as an alternative for
+    gnome-text-editor, with priority lower than gedit (closes: #287202)
+  * Substituted @PKG@ in menu entry for package name (closes: #342074)
+
+  [ James Vega ]
+  * Added patch 148_debchangelog, update syntax/debchangelog.vim to
+    recognize infrequently used but policy compliant syntax.
+    (closes: #338557)
+  * Fixed patch 304_memline.c.diff to avoid inifinte loops resolving
+    symlinks. (closes: #336560)
+  * Remove the 'p' vmap in /etc/vim/vimrc since it has various bad
+    side-effects such as not being able to paste from a register while
+    in visual mode.
+
+  [ Matthijs Mohlmann ]
+  * Updated syntax for sshd_config and ssh_config.
+  * Updated syntax highlighting for asterisk.vim (Closes: #338256)
+
+ -- Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>  Wed,  7 Dec 2005 22:02:34 +0100
+
+vim (1:6.4-001+2) unstable; urgency=low
+
+  [ Stefano Zacchiroli ]
+  * Fixed debian/runtime/vimrc, last version broke some plugins behaviour
+    (e.g. gzip, netrw) on files specified on cmdline.
+
+ -- Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>  Sun, 23 Oct 2005 16:03:43 +0200
+
+vim (1:6.4-001+1) unstable; urgency=low
+
+  [ Debian VIM Maintainers ]
+  * New upstream patch (001), see README.gz for details.
+
+  [ Stefano Zacchiroli ]
+  * Got rid of conflicts among vim-* packages (aka variants) using
+    alternatives for /usr/bin/vim. (closes: #67823, #123959, #280934)
+  * Got rid of removal of /usr/doc/* symlinks.
+  * Added "sources" debian/rules target which downloads upstream tarballs.
+  * Added patch 146_netrw.vim.diff, fixes some issues of netrw.vim with
+    file://* URLs. (closes: #334868)
+  * Added patch 303_option.c.diff, which fixes 'system()' behaviour when
+    $SHELL is empty. (closes: #219386)
+  * Added patch 304_memline.c.diff, which fixes swap file locking wrt
+    symlinks. (closes: #329826)
+  * Changed debian/runtime/vimrc so that /etc/papersize is read without using
+    system(), fixes issues with exotic shells. (closes: #271338)
+
+  [ James Vega ]
+  * Added patch 147_perl.vim.diff, new upstream syntax file which supersedes
+    120_perl.vim.diff.
+
+ -- Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>  Sun, 23 Oct 2005 11:21:35 +0200
+
+vim (1:6.4-000+1) unstable; urgency=low
+
+  [ Debian VIM Maintainers ]
+  * New major upstream release (6.4).
+    + Fixed typo in /usr/share/vim/vim63/doc/usr_04.txt. (closes: #328664)
+
+  [ Norbert Tretkowski ]
+  * Removed patches merged upstream:
+    + 118_ocaml.vim.diff
+
+ -- Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>  Sat, 15 Oct 2005 18:40:22 +0200
+
+vim (1:6.3+6.4b-003+1) experimental; urgency=low
+
+  [ Debian VIM Maintainers ]
+  * New upstream patch (003), see README.gz for details.
+
+ -- Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>  Fri, 14 Oct 2005 18:09:56 +0200
+
+vim (1:6.3+6.4b-002+2) experimental; urgency=low
+
+  [ Stefano Zacchiroli ]
+  * Updated patches for new release:
+    + 118_ocaml.vim.diff
+    + 124_errorformat.vim.diff
+    + 203_zh_TW.UTF8.po.diff
+
+ -- Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>  Thu, 13 Oct 2005 13:09:25 +0200
+
+vim (1:6.3+6.4b-002+1) experimental; urgency=low
+
+  [ Debian VIM Maintainers ]
+  * New upstream patch (002), see README.gz for details.
+
+ -- Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>  Wed, 12 Oct 2005 21:11:22 +0200
+
+vim (1:6.3+6.4b-001+1) experimental; urgency=low
+
+  [ Debian VIM Maintainers ]
+  * New major upstream beta release (6.4b).
+  * New upstream patch (001), see README.gz for details.
+
+  [ Norbert Tretkowski ]
+  * Removed patches merged upstream:
+    + 110_php.vim.diff
+    + 112_prolog.vim.diff
+    + 113_xml.vim.diff
+    + 114_texinfo.vim.diff
+    + 116_sh.vim.diff
+    + 121_perl.vim.diff
+    + 126_filetype.vim.diff
+    + 128_vimdiff.1.diff
+    + 132_bib.vim.diff
+    + 139_perl.vim.diff
+    + 143_eruby.vim.diff
+    + 401_doc_exrc.diff
+    + 403_usr_04.txt.diff
+
+  [ James Vega ]
+  * Updated patches for new release:
+    + 102_filetype.vim.diff
+    + 120_perl.vim.diff
+    + 142_filetype.vim.diff
+
+ -- Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>  Wed, 12 Oct 2005 09:41:28 +0200
+
+vim (1:6.3-090+2) unstable; urgency=low
+
+  * Stefano Zacchiroli <zack@debian.org>:
+    + Fixed %ld typo in debian/patches/203_zh_TW.UTF8.po.diff
+    + Added patch debian/patches/403_usr_04.txt.diff, which fixes a
+      typo in usr_04.txt. (closes: #328664)
+
+ -- Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>  Sat,  8 Oct 2005 16:09:41 +0200
+
+vim (1:6.3-090+1) unstable; urgency=low
+
+  * New upstream patches (087 to 090), see README.gz for details.
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + Updated Standards-Version to 3.6.2 (no changes needed).
+    + Exec vim with -f parameter in .desktop file. (closes: #329292)
+
+  * Stefano Zacchiroli <zack@debian.org>:
+    + Set SHELL=/bin/bash in debian/rules since we use bashisms.
+      (closes: #310974)
+    + Added patch 140_muttrc.vim.diff, which improves muttrc
+      highlighting. (closes: #327074)
+    + Added patch 141_asterisk.vim.diff, which adds support for Asterisk
+      configuration files sytnax highlighting. (closes: #322850)
+    + Added patch 142_filetype.vim.diff, which extends dch highlighting
+      to Debian NEWS files. (closes: #328081)
+    + Added patch 143_eruby.vim.diff, which adds support for eruby
+      highlighting. (closes: #315902)
+    + Added patch 144_scripts.vim.diff, which adds support for
+      highlighting tla diffs. (closes: #305677)
+    + Added patch 145_fortran.vim.diff, which fixes a matchit bug with
+      Fortran's "module procedure". (closes: #308865)
+    + Added patch 203_zh_TW.UTF8.po.diff, which fixes a translation
+      error in locale zh_TW.UTF-8. (closes: #319420)
+
+ -- Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>  Fri, 30 Sep 2005 17:08:36 +0200
+
+vim (1:6.3-086+1) unstable; urgency=low
+
+  * New upstream patch (086), see README.gz for details.
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + Corrected wrong capitalization of menu entry. (closes: #320602)
+
+  * Stefano Zacchiroli <zack@debian.org>:
+    + Added patch 132_bib.vim.diff, which fixes highlighting of bibtex
+      comments. (closes: #316184)
+    + Added patch 133_filetype.vim.diff, which adds filetype recognition
+      for several Zope related file kinds. (closes: #311007)
+
+  * Matthijs Mohlmann <matthijs@cacholong.nl>:
+    + Added patch 133_resolv.vim.diff, which fixes highlighting of resolv.conf
+      search entries. (closes: #321081)
+    + Added patch 134_sshconfig.vim.diff, added HashKnownHosts to syn keyword
+      sshconfigKeyword. (closes: #321119)
+    + Added debsources.vim to debian/updates to add syntax highlighting for
+      /etc/apt/sources.list and added this to filetype.vim. (closes: #308947)
+    + Added patch 136_muttrc.vim.diff, added crypt_autosign, crypt_autoencrypt
+      and xterm_set_titles to syn keyword. (closes: #323278)
+
+  * Pierre Habouzit <madcoder@debian.org>:
+    + Fix patch 105_xmodmap.vim.diff: wrt XF86_ClearGrab. (closes: #322355)
+    + Fix typo in doc/editing.txt. (closes: #322254)
+
+  * James Vega <jamessan@jamessan.com>:
+    + Added patch 137_filetype.vim.diff, recognize mutt-ng rc/temp files as
+      muttrc/mail filetypes. (closes: #307946)
+    + Added patch 138_filetype.txt.diff, fix a typo in the changelog-plugin
+      section of filetype.txt. (closes: #314595)
+    + Added patch 139_perl.vim.diff, fix recognition of regular expression
+      quantifiers.
+
+ -- Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>  Thu,  1 Sep 2005 18:40:41 +0200
+
+vim (1:6.3-085+1) unstable; urgency=high
+
+  * New upstream patches (079 to 085), see README.gz for details.
+    + 6.3.081, 6.3.082: Fix arbitrary shell commands execution by wrapping
+      them in glob() or expand() function calls in modelines. (CAN-2005-2368)
+      (closes: #320017)
+
+  * James Vega <jamessan@jamessan.com>:
+    + Added patch 129_filetype.vim.diff, which sets the filetype to perl for
+      *.plx files. (closes: #314309)
+
+  * Matthijs Mohlmann <matthijs@cacholong.nl>:
+    + Added patch 130_fstab.vim.diff, added bind as option. (closes: #308890)
+    + Added patch 131_xxd.1.diff, fixes typo in xxd manpage. (closes: #311234)
+
+ -- Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>  Thu, 28 Jul 2005 12:16:06 +0200
+
+vim (1:6.3-078+1) unstable; urgency=low
+
+  * New upstream patches (073 to 078), see README.gz for details.
+
+  * James Vega <jamessan@jamessan.com>:
+    + Added patch 128_vimdiff.1.diff, which fixes a typo in the vimdiff
+      manpage. (closes: #310331)
+
+ -- Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>  Tue, 14 Jun 2005 21:25:00 +0200
+
+vim (1:6.3-072+1) unstable; urgency=high
+
+  * New upstream patch (072), see README.gz for details.
+
+  * James Vega <jamessan@jamessan.com>:
+    + Updated patch 125_gzip.vim.diff to match upstream's vim7 patch.
+      Removed compression detection for FileAppendPre since there's no good
+      way to retrieve the necessary information.
+    + Added patch 127_scripts.vim.diff, makes Vim automatically set the proper
+      filetype when editing lua scripts. The patch also enables recognition
+      of "#!/usr/bin/env xxx" hashbang lines. (closes: #309859)
+
+ -- Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>  Fri, 20 May 2005 20:41:35 +0200
+
+vim (1:6.3-071+2) unstable; urgency=low
+
+  * Stefano Zacchiroli <zack@debian.org>:
+    + Modifications on debian/rules:
+      - Do not invoke dh_installdirs before creating .dirs file for current
+        variant (fixes non-installation of gvim.desktop in all variants).
+      - Optional cmdline parameter PATCH_NAME for make_patch target.
+      - Invoke dh_desktop to register gvim.desktop on postinst.
+    + Modifications on debian/vim-variant.desktop:
+      - Internationalized comment (inspired from gedit's one).
+      - Added MimeType entry.
+      - Uses svg icon.
+    + Added svg icon /usr/share/icons/vim.svg, thanks to
+      Paul Ortman <ortm8574@uidaho.edu>. (closes: #258669)
+    + Updated patch 118_ocaml.vim.diff (new upstream).
+    + Added patch 124_errorformat.vim.diff, makes vim follow error directories
+      on "make -C". (closes: #276005)
+    + Added patch 126_filetype.vim.diff, set tex filetype on .cls TeX classes,
+      distinguishing them from smalltalk sources. (closes: #169716)
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + Build-Depend on debhelper (>= 4.2.21), required for dh_desktop call.
+    + Reverted value of backupcopy to default.
+
+  * Matthijs Mohlmann <matthijs@cacholong.nl>:
+    + Added patch for german accents. (closes: #307807)
+
+  * James Vega <jamessan@jamessan.com>:
+    + Added patch 125_gzip.vim.diff, maintain "max speed" and "max compression"
+      compression levels when editing gzip files. (closes: #280388)
+
+ -- Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>  Sun, 15 May 2005 19:12:57 +0200
+
+vim (1:6.3-071+1sarge1) stable; urgency=high
+
+  * New upstream patches (081 and 082), see README.gz for details.
+    + 6.3.081, 6.3.082: Fix arbitrary shell commands execution by wrapping
+      them in glob() or expand() function calls in modelines. (CAN-2005-2368)
+      (closes: #320017)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sat, 30 Jul 2005 12:16:45 +0200
+
+vim (1:6.3-071+1) unstable; urgency=medium
+
+  * New upstream patches (069 to 071), see README.gz for details.
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + Re-add dh_installdirs to vim-variant part in debian/rules, so copying
+      the desktop file no longer fails. (closes: #302830)
+    + Enabled backupcopy in global vimrc. (closes: #158657)
+
+  * Stefano Zacchiroli <zack@debian.org>:
+    + Added vim-full variant with support for gnome and all interpreters.
+      (closes: #149077)
+    + Added /usr/share/common-licenses/ reference to debian/copyright.
+    + Remove debian/helpztags.1 on debian/rules clean (generated file).
+    + Updated patch 118_ocaml.vim.diff (new upstream).
+    + Added patch 122_html_indent.vim.diff, remove <bs> from indentkeys for
+      html. (closes: #280386)
+    + Added patch 401_doc_exrc.diff, fixes starting doc about "_exrc".
+      (closes: #279378)
+    + Suggests vim-scripts in debian/control.
+
+  * Matthijs Mohlmann <matthijs@cacholong.nl>:
+    + Fixes menu entry with icon (wrong syntax used in menu file), thanks to
+      Alexis Sukrieh <sukria@sukria.net>.
+
+  * James Vega <jamessan@jamessan.com>:
+    + Added patch 120_perl.vim.diff, update $VIMRUNTIME/syntax/perl.vim from
+      the author which fixes block indentation in packages. (closes: #220969)
+    + Added patch 121_perl.vim.diff, which adds syntax recognition for
+      CHECK/INIT blocks (similar to BEGIN/END).
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sun, 24 Apr 2005 17:26:49 +0200
+
+vim (1:6.3-068+4) unstable; urgency=medium
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + Removed all kvim related packages, the code is no longer maintained.
+      Sorry. (closes: #234455, #237385, #283765, #293110, #194449, #205586,
+      #266431, #272621, #294848, #245006, #194964)
+    + Removed patch 401_gcc4.diff, it modified kvim code which is no longer
+      available.
+    + Added NEWS file, so people upgrading to this version getting informed
+      about the kvim removal.
+
+  * Matthijs Mohlmann <matthijs@cacholong.nl>:
+    + Fixed up a patch for xml.vim.
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sat,  2 Apr 2005 18:31:19 +0200
+
+vim (1:6.3-068+3) unstable; urgency=medium
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + Add a replaces: vim (<= 1:6.3-068+1) to every (k)vim-* package, required
+      for menu-icon-missing fix from 1:6.3-068+2. (closes: #301866)
+    + Urgency medium because above modification fixes regular upgrade with
+      apt-get.
+    + Fixed broken rgvim manpage. (closes: #301881)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Tue, 29 Mar 2005 01:00:23 +0200
+
+vim (1:6.3-068+2) unstable; urgency=low
+
+  * Pierre Habouzit <pierre.habouzit@m4x.org>:
+    + Enhance the es.po. (closes: #206782)
+
+  * Matthijs Mohlmann <matthijs@cacholong.nl>:
+    + Modified patch 113_xml.vim.diff that fixes #196001 has introduced
+      another syntax error. (closes: #301736)
+    + Fixed menu-icon-missing on vim-* packages.
+
+ -- Norbert Tretkowski <nobse@debian.org>  Mon, 28 Mar 2005 19:26:35 +0200
+
+vim (1:6.3-068+1) unstable; urgency=low
+
+  * New upstream patch (068), see README.gz for details.
+    + 6.3.068: When editing a compressed file xxx.gz which is a symbolic link
+      to the actual file a ":write" no longer renames the link (patch by James
+      Vega). (closes: #281630)
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + Added James Vega <jamessan@jamessan.com> to uploaders.
+    + Fixed wrong executable registration in /usr/lib/mime/packages/kvim,
+      thanks to Robin Verduijn for the patch. (closes: #295471)
+    + Fixed synchronisation of syntax highlighting in fortran 90 programs.
+      (closes: #301452)
+    + Removed vim-doc's dependency on vim, so it's possible to install vim-doc
+      without also installing vim.
+
+  * Pierre Habouzit <pierre.habouzit@m4x.org>:
+    + Fix php indent plugin, thanks to the ITLab at MUSC. (closes: #282135)
+    + Fix prolog syntax file. (closes: #269692)
+    + Fix xml syntax ('\' has no special meaning for xml). (closes: #196001)
+    + Fix texinfo syntax file warning. (closes: #286763)
+
+  * Matthijs Mohlmann <matthijs@cacholong.nl>:
+    + Fix lintian warning packages-installs-file-to-usr-x11r6:
+      - Moving xpm files to /usr/share/pixmaps.
+      - Edited the menu files.
+    + Removed prerm-does-not-call-installdocs from lintian/vim.
+    + Added patch 111_fstab.vim.diff to fix highlighting in fstab.
+      (closes: #300108)
+    + Removed Suggests: vim from vim-doc in debian/control.
+    + Fixed binary-without-manpage for several packages.
+    + Fixed pkg-not-in-package-test in kvim-tcl, kvim-ruby, kvim-python and
+      kvim-perl.
+    + Fixed the errors postinst-does-not-call-updatemenus and
+      postrm-does-not-call-updatemenus.
+
+  * James Vega <jamessan@jamessan.com>:
+    + Fixed wrong highlighting of comments in syntax/sh.vim when comments
+      occur between switches of case. (closes: #269325)
+
+  * Stefano Zacchiroli <zack@debian.org>:
+    + Added patch 302_message.c.diff to fix CTRL-C quit loops in range commands.
+      (closes: #295639)
+    + Added patch 118_ocaml.vim.diff to ship latest version of ocaml runtime
+      support files: {syntax,ftplugin,ident}/ocaml.vim.
+    + Modifications on debian/rules:
+      - Uses debian/compat in place of debian/rules' DH_COMPAT.
+      - Ignores diff error in "make_patch" target since diff usually returns 1.
+      - Added support for command line VARIANT variable to override VARIANTS.
+
+  * Pepijn de Langen <pepijn@ce.et.tudelft.nl>:
+    + Added patch 119_php.vim.diff to php syntax highlighting backticks.
+      (closes: #144754)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sat, 26 Mar 2005 16:32:25 +0100
+
+vim (1:6.3-067+2) unstable; urgency=medium
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + Disabled dh_installchangelogs and dh_installdocs for vim-doc.
+    + Raised urgency to medium because of upstream patch 6.3.066.
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sun, 20 Mar 2005 22:05:36 +0100
+
+vim (1:6.3-067+1) unstable; urgency=low
+
+  * New upstream patches (065 to 067), see README.gz for details.
+    + 6.3.065: Entering Euro char via digraph doesn't always work.
+      (closes: #298162)
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + Added Pierre Habouzit, Torsten Landschoff, Matthijs Mohlmann, Stefano
+      Zacchiroli, Alexis Sukrieh and Pepijn de Langen to uploaders.
+      (closes: #299446)
+    + Added a new patch from Christian Hammers which adds additional keywords
+      to /etc/fstab syntax hilighting. (closes: #299704)
+    + Modified --with-compiledby value to use $DEBFULLNAME and $DEBEMAIL.
+    + Updated tpp syntax file, thanks to Gerfried Fuchs.
+    + Changed priority of vim-common package from extra to optional.
+
+  * Pierre Habouzit <pierre.habouzit@m4x.org>:
+    + Documented the /etc/vim/{g,}vimrc.local files in README.Debian.
+    + Fixed some debcontrol.vim issues:
+      - Don't search emails in fields that have not one. (closes: #114508)
+      - Fix debcontrolName according to Policy. (closes: #148144)
+    + Fixed tutor.vim to use usual locale envvars semantics. (closes: #289113)
+    + Added a 16px icon for menu entries too
+      (taken from http://www.vim.org/images/vim16x16.xpm). (closes: #39250)
+    + Fixed changelog.Debian.gz detection. (closes: #263740)
+    + Manpages various fixes:
+      - Escape some dashes in vim(1). (closes: #279606)
+      - Various fixes for xxd(1). (closes: #281124)
+    + Fixed french translation. (closes: #277502)
+
+  * Matthijs Mohlmann <matthijs@cacholong.nl>:
+    + Add syntax highlighting for xmodmap. (closes: #296759)
+    + Fixed lintian warning unquoted-string-in-menu-item in kvim.menu.
+    + Fixed lintian warning spelling-error-in-readme-debian (adviced should
+      be advised).
+    + Changed current maintainer in copyright file.
+    + Fixed lintian warning package-relation-with-self in kvim.
+    + Fixed lintian warning binary-has-unneeded-section in vim (added
+      dh_strip).
+    + Added depends on vim in vim-doc.
+
+  * Alexis Sukrieh <sukria@sukria.net>:
+    + Added a note about UTF-8 related issues in README.Debian.
+    + Added debian/patches/108_automake.vim.diff (thanks to Alexander Kogan)
+      which enables highlighting of _CPPFLAGS in automake files.
+      (closes: #196212)
+    + Added debian/patches/109_xdefaults.vim.diff (thanks to Peter De Wachter)
+      which fixes bad highlighting when putting a FONT directive in xdefaults.
+      (closes: #264284)
+
+  * Stefano Zacchiroli <zack@debian.org>:
+    + Added #DEBHELPER# tag to debian/vim-{doc,common}.preinst.
+    + Minor cleanup of debian/rules so vim-{doc,common} uses dh_install
+      instead of dh_movefiles ("binary" target could now be invoked twice
+      after a single "install" invocation), let dh_compress compress README.
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sun, 20 Mar 2005 10:56:11 +0100
+
+vim (1:6.3-064+1) unstable; urgency=low
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + New upstream patches (062 to 064), see README.gz for details.
+    + Set maintainer address to project mailinglist on alioth and added myself to
+      uploaders.
+    + Added a new patch which sets automake syntax recognition for files named
+      GNUmakefile.am. (closes: #277596)
+    + Added a new patch which adds testing-proposed-updates to debchangelog
+      syntax hilighting.
+
+ -- Norbert Tretkowski <nobse@debian.org>  Mon, 14 Mar 2005 14:58:49 +0100
+
+vim (1:6.3-061+1) unstable; urgency=high
+
+  * New upstream patches (059 to 061), see README.gz for details.
+  * Kudos to Javier Fernandez-Sanguino Pena, he discovered the usage of
+    insecure $$ constructs in vimspell.sh and tcltags.sh which have been
+    fixed with the last upload.
+  * Removed vimspell.sh and tcltags.sh, these scripts are no longer supported
+    upstream.
+  * Removed patch which was added in 1:6.3-058+1, it's no longer required.
+
+ -- Norbert Tretkowski <nobse@debian.org>  Tue, 01 Feb 2005 22:39:26 +0100
+
+vim (1:6.3-058+1) unstable; urgency=high
+
+  * New upstream patches (055 to 058), see README.gz for details.
+  * Added a new patch (stolen from Ubuntu) which modifies vimspell.sh and
+    tcltags.sh so they use mktemp instead of insecure $$ construction to
+    create temporary files. (CAN-2005-0069) (closes: #289560)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Tue, 18 Jan 2005 20:12:25 +0100
+
+vim (1:6.3-054+1) unstable; urgency=low
+
+  * New upstream patches (047 to 054), see README.gz for details.
+  * Source /etc/vim/gvimrc.local if available. (closes: #272001)
+  * Added a new patch which fixes ftbfs on amd64 with gcc-4.0, thanks to
+    Andreas Jochens. (closes: #288731)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Wed, 05 Jan 2005 20:51:36 +0100
+
+vim (1:6.3-046+0sarge1) testing-proposed-updates; urgency=high
+
+  * Built on testing for testing-proposed-updates because patch 045 fixes
+    several vulnerabilities found by Ciaran McCreesh related to the use of
+    options in modelines. (CAN-2004-1138)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sun, 19 Dec 2004 20:06:53 +0100
+
+vim (1:6.3-046+1) unstable; urgency=low
+
+  * New upstream patches (032 to 046), see README.gz for details.
+  * Added a desktop entry under /usr/share/applications/ for all variants.
+    (closes: #285065)
+  * Added farsi fonts to vim-common package. (closes: #258773)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sun, 12 Dec 2004 02:36:11 +0100
+
+vim (1:6.3-031+3) unstable; urgency=low
+
+  * Really add Brandens patch which adds XXX and FIXME comment hilighting
+    to sh.vim. (closes: #280471)
+  * Updated debcontrol.vim syntax file, which adds debcontrolArchitecture
+    for s390, thanks to Gerfried Fuchs. (closes: #281127)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sun, 14 Nov 2004 01:14:35 +0100
+
+vim (1:6.3-031+2) unstable; urgency=low
+
+  * Fixed broken vim-doc.preinst. (closes: #280824, #280825)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Thu, 11 Nov 2004 23:56:12 +0100
+
+vim (1:6.3-031+1) unstable; urgency=low
+
+  * New upstream patches (026 to 031), see README.gz for details.
+  * Add symlink replacing from vim-common also to vim-doc. (closes: #279058)
+  * Added a new patch which adds XXX and FIXME comment hilighting to sh.vim,
+    thanks to Branden Robinson. (closes: #280471)
+  * Added a new patch which allows multiple spaces as arguments for xxd,
+    thanks to Glyn Kennington. (closes: #279709)
+  * Updated tpp and debcontrol syntax files, thanks to Gerfried Fuchs.
+
+ -- Norbert Tretkowski <nobse@debian.org>  Tue, 09 Nov 2004 18:56:42 +0100
+
+vim (1:6.3-025+1) unstable; urgency=low
+
+  * New upstream patches (020 to 025), see README.gz for details.
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sun, 05 Sep 2004 21:13:04 +0200
+
+vim (1:6.3-019+1) unstable; urgency=medium
+
+  * New upstream patches (016 to 019), see README.gz for details.
+  * Added a new patch which adds some more sections to debcontrol.vim,
+    thanks to Branden Robinson. (closes: #258547)
+  * Removed setting the guifont in gvimrc. (closes: #267399, #268253)
+  * Compress README file. (closes: #267532)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Mon, 30 Aug 2004 21:06:01 +0200
+
+vim (1:6.3-015+1) unstable; urgency=medium
+
+  * New upstream patches (014 and 015), see README.gz for details.
+  * Removed Luca from Uploaders, thanks for your work! (closes: #266476)
+  * Added a workaround for setting papersize when running vim in restricted
+    mode, thanks to Alexey Marinichev. (closes: #260452, #265227)
+  * Added a new patch which fixes broken else syntax hilighting in make.vim,
+    thanks to Steinar H. Gunderson. (closes: #260473, #259819)
+  * Fixed spelling error in vim-common description. (closes: #264279)
+  * Added a patch from 1:6.2-532+1 which got lost with the update to 6.3
+    and fixes svn commit file highlighting.
+  * Added a new patch which adds s390 and amd64 to debcontrol.vim.
+
+ -- Norbert Tretkowski <nobse@debian.org>  Wed, 17 Aug 2004 19:34:13 +0200
+
+vim (1:6.3-013+2) unstable; urgency=low
+
+  * Empty vim-common directory before rmdir it. (closes: #258809)
+  * Add symlink replacing from vim-common also to vim-variant.
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sun, 11 Jul 2004 18:11:45 +0200
+
+vim (1:6.3-013+1) unstable; urgency=low
+
+  * New upstream patches (012 and 013), see README.gz for details.
+  * More modifications on /usr/share/doc/vim-common symlink detection.
+    (closes: #257810)
+  * Source /etc/vim/vimrc.local if available. (closes: #257779)
+  * Added a virtual package gvim.
+
+ -- Norbert Tretkowski <nobse@debian.org>  Fri, 09 Jul 2004 22:56:33 +0200
+
+vim (1:6.3-011+2) unstable; urgency=low
+
+  * Modify detection of /usr/share/doc/vim-common symlink. (closes: #257623)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sun, 04 Jul 2004 19:35:16 +0200
+
+vim (1:6.3-011+1) unstable; urgency=low
+
+  * New upstream patch (011), see README.gz for details
+  * Disabled libgpm-dev build-dependency for kfreebsd-i386 (closes: #257230)
+  * Fixed vim-common's dependency on vim (closes: #257359, #257428, #257547)
+  * No longer compress version6.txt in documentation. (closes: #257338, #257445)
+  * Force replacing empty directories in /usr/share/doc with a symlink.
+    (closes: #257449)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sun, 04 Jul 2004 11:21:36 +0200
+
+vim (1:6.3-010+1) unstable; urgency=low
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + new upstream patches (005 to 010), see README.gz for details
+    + temporary disabled vim-tiny package, will be re-added with the next
+      upload
+
+  * Mickael Marchand <marchand@kde.org>:
+    + updated kvim patch to apply without conflicts to new vim upstream
+      patches
+
+ -- Norbert Tretkowski <nobse@debian.org>  Thu, 30 Jun 2004 18:35:26 +0200
+
+vim (1:6.3-004+1) unstable; urgency=low
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + new major upstream release (6.3)
+    + new upstream patches (001 to 004), see README.gz for details
+    + merged changes from 1:6.2-532+6
+    + fixed broken changelog symlink (closes: #253319)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Fri, 11 Jun 2004 21:31:25 +0200
+
+vim (1:6.2+6.3b-016+1) experimental; urgency=low
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + new upstream patches (008 to 016), see README.gz for details
+    + made vim depend on vim-common in the same upstream version, so upgrading
+      to experimental vim will also install new vim-common (closes: #251736)
+    + merged changes from 1:6.2-532+5
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sun, 30 May 2004 16:45:02 -0300
+
+vim (1:6.2+6.3b-007+1) experimental; urgency=low
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + new upstream patches (002 to 007), see README.gz for details
+    + applied patch from Thomas de Grenier de Latour which fixes problems with
+      non-builtin icons and gtk+ 2.4
+
+ -- Norbert Tretkowski <nobse@debian.org>  Wed, 26 May 2004 19:09:21 -0300
+
+vim (1:6.2+6.3b-001+1) experimental; urgency=low
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + new major upstream beta release (6.3b)
+    + new upstream patch (001), see README.gz for details
+    + modified runtime path in global vimrc
+    + merged changes from 1:6.2-532+3 and 1:6.2-532+4
+
+ -- Norbert Tretkowski <nobse@debian.org>  Wed, 19 May 2004 19:19:26 +0200
+
+vim (1:6.2+6.3a-018+1) experimental; urgency=low
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + new upstream patches (007 to 018), see README.gz for details
+    + merged changes from 1:6.2-532+2
+
+ -- Norbert Tretkowski <nobse@debian.org>  Wed, 12 May 2004 22:05:31 +0200
+
+vim (1:6.2+6.3a-006+1) experimental; urgency=low
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + new major upstream beta release (6.3a)
+      - removed second -X option from vim(1) (closes: #231504)
+      - added evim to executables in vim(1) (closes: #223866)
+      - fixed typo in man.vim plugin (closes: #256951)
+    + new upstream patches (001 to 006), see README.gz for details
+    + removed most debian specific patches, because they got merged upstream
+      now
+    + modified runtime path in global vimrc
+    + modified directories in vim.links and vim.install
+
+  * Mickael Marchand <marchand@kde.org>:
+    + updated kvim patch to apply without conflicts to new vim upstream
+      beta release
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sat, 08 May 2004 23:29:31 +0200
+
+vim (1:6.2-532+6) unstable; urgency=low
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + applied a patch from Eduard Bloch which makes gvim load the UTF-8
+      version of fixed font when the $LANG or $LC_CTYPE environment variables
+      are set for the Unicode environment (closes: #177599)
+    + added a patch which enhances detection of html files (closes: #211263)
+    + removed c part from maze macro, looks like it doesn't work any longer
+      (closes: #121837)
+    + updated perl syntax file (closes: #232660)
+    + suggest 'ssh' instead of 'rsh' in tagsrch.txt (closes: #229634)
+    + capitalized 'unicode' string in description (closes: #172065)
+    + fixed broken removal of vim-gnome diversion (closes: #252248)
+    + fixed small typo in kvim mime files (closes: #250585)
+    + fixed small mistake in global vimrc (closes: #165964)
+    + added /usr/share/bug/vim/presubj file with some informations for
+      submitters of bugs
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sat, 05 Jun 2004 16:42:42 +0200
+
+vim (1:6.2-532+5) unstable; urgency=low
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + re-added a vim-tiny package, looks like it got lost somewhere between
+      potato and woody (closes: #222138)
+    + added a patch which adds 'UsePAM' directive to sshdconfig.vim syntax file
+      (closes: #250064)
+    + added a patch from Doug Winter which add recognition of 'as' keyword in
+      python syntax file (closes: #247326)
+    + added a patch from Dirk Proesdorf which corrects new 'alternates' keyword
+      behaviour in mutt syntax file (closes: #247098)
+    + added a patch which adds syntax highlighting for whitespace files
+      (closes: #226352)
+    + added a patch from Brian M. Carlson which adds highlighting for 'lldiv_t'
+      in c syntax file (closes: #202316)
+    + added a patch which fixes a typo in map.txt (closes: #198667)
+    + modified gvim and kvim menu entry, so they are started with -f now
+      (closes: #153112)
+    + added -f to mailcap view rules (closes: #101377)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sat, 29 May 2004 22:43:11 -0300
+
+vim (1:6.2-532+4) unstable; urgency=low
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + used --with-features=big also for vim-basic variant (closes: #228485)
+    + binaries now including debugging information (closes: #249602)
+    + added support for "nostrip" in $DEB_BUILD_OPTIONS
+    + removed patch from Uli Martens introduced in 1:6.2-214+1 which modifies
+      runtime path in macros/less.sh, it's no longer needed since 1:6.2-532+3
+    + modified link to upstream changelog, it's no longer gzipped since
+      1:6.2-532+1
+    + added version (>= 2.2) to libgtk2.0-dev build-dependency
+    + added priority to kvim package in control file
+
+ -- Norbert Tretkowski <nobse@debian.org>  Wed, 19 May 2004 16:30:25 +0200
+
+vim (1:6.2-532+3) unstable; urgency=low
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + added a patch from Peter Jay Salzman which fixes a typo in
+      hebrewp_utf-8.vim (closes: #197932)
+    + added a syntax file from Luca De Vitis which adds support for debconf
+      templates (closes: #168731)
+    + moved macros and tools back into runtime directory (closes: #190181)
+    + moved runtimepath above inclusion of filetype.vim in /etc/vim/vimrc
+      (closes: #248402)
+    + really added a patch from Jeff Layton with a syntax correction for
+      quoted here-documents (closes: #248562)
+    + less.sh is now executable (closes: #244599)
+    + modified new versioned dependencies from 1:6.2-532+2 so the dependency
+      is only on upstream release (closes: #248949)
+    + corrected version number in kvim conflicts/replaces, the epoche was
+      missing
+    + made /usr/share/doc/vim-common a symlink to /usr/share/doc/vim
+    + modified some overrides to shut up installer at ftp-master
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sat, 15 May 2004 16:22:56 +0200
+
+vim (1:6.2-532+2) unstable; urgency=low
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + changes in debian/control from Michaels patch for hurd-i386 build got
+      lost (really closes: #244769)
+    + reenabled python package build for hurd-i386 build
+    + added versioned dependency on vim to vim-common and vice versa
+      (closes: #248423, #248563)
+    + build-conflict with libperl-dev (= 5.8.4-1) because it's broken
+      (see #247291 for details)
+    + added a patch from Jeff Layton with a syntax correction for quoted
+      here-documents (closes: #248562)
+    + updated netrw plugin (closes: #248623)
+    + updated squid syntax file (closes: #247810)
+    + added menu hints (closes: #82322)
+    + added background for syntax highlighting in vimrc (closes: #99762)
+    + disabled regenerating of tags file (closes: #244852)
+    + case-insensitive field names in debcontrol.vim (closes: #102232)
+    + added some notes about reporting bugs against this package to
+      README.Debian
+    + removed note about modelines from README.Debian
+
+ -- Norbert Tretkowski <nobse@debian.org>  Wed, 12 May 2004 20:42:56 +0200
+
+vim (1:6.2-532+1) unstable; urgency=low
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + new upstream patches (427 to 532), see README.gz for details
+    + no longer compress helpfiles, it breaks :helpg (closes: #244114)
+    + added a patch which fixes svn commit file highlighting
+      (closes: #239320, #242286)
+    + added a patch from Jan Minar which fixes a documentation error in
+      cmdline.txt (closes: #241907)
+    + added a patch from Roland Stigge which adds "Enhances" keyword to
+      debcontrol syntax highlighting (closes: #235524)
+    + added a patch from Domenico Andreoli which adds "reiserfs4" keyword to
+      fstab syntax highlighting (closes: #236571)
+    + applied a patch from Michael Bank which adds some exceptions for
+      hurd-i386 build (closes: #244769)
+    + added alternative for gnome-text-editor to vim-gnome (closes: #243443)
+    + added alternative for gvim.1.gz to vim.1.gz (closes: #231503, #238181)
+    + added vim-policy.txt to vim package (closes: #246174)
+    + cleaned up debian/rules file and files in debian/patches a bit
+
+  * Mickael Marchand <marchand@kde.org>:
+    + updated kvim patch to apply without conflicts to new vim upstream
+      patches
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sat, 08 May 2004 22:42:16 +0200
+
+vim (1:6.2-426+1) unstable; urgency=low
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + new upstream patches (365 to 426), see README.gz for details
+    + updated 01ruby_mkmf.diff to apply without conflicts to new vim upstream
+      patches
+
+  * Mickael Marchand <marchand@kde.org>:
+    + updated kvim patch to apply without conflicts to new vim upstream
+      patches
+
+ -- Norbert Tretkowski <nobse@debian.org>  Thu, 01 Apr 2004 17:14:13 +0200
+
+vim (1:6.2-364+1) unstable; urgency=low
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + new upstream patches (354 to 364), see README.gz for details
+    + reenabled modelines in default vimrc (closes: #205501)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Tue, 16 Mar 2004 19:09:35 +0100
+
+vim (1:6.2-353+1) unstable; urgency=low
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + new upstream patches (317 to 353), see README.gz for details
+      (closes: #188640)
+    + removed second /etc/vim from global runtime patch (closes: #237197)
+    + added vimrc_example.vim to $VIMRUNTIME (closes: #127141)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sat, 13 Mar 2004 16:25:06 +0100
+
+vim (1:6.2-316+1) unstable; urgency=low
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + new upstream patches (295 to 316), see README.gz for details
+
+ -- Norbert Tretkowski <nobse@debian.org>  Thu, 04 Mar 2004 22:27:35 +0100
+
+vim (1:6.2-294+1) unstable; urgency=low
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + new upstream patches (271 to 294), see README.gz for details
+    + moved arch independant data in a separate vim-common package
+      (closes: #233454)
+    + added a patch to recognize new keywords for java 1.5 in java syntax
+      file, thanks to Seneca Cunningham (closes: #231916)
+    + added a provides: kvim to kvim-packages (closes: #234690)
+
+  * Mickael Marchand <marchand@kde.org>:
+      + updated kvim patch to apply without conflicts to new vim upstream
+        patches
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sun, 29 Feb 2004 14:48:45 +0100
+
+vim (1:6.2-270+1) unstable; urgency=low
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + new upstream patches (215 to 270), see README.gz for details
+    + updated 01ruby_mkmf.diff and 11allow-threaded-perl.diff to apply without
+      conflicts to new vim upstream patches
+
+  * Mickael Marchand <marchand@kde.org>:
+    + updated kvim patch to apply without conflicts to new vim upstream
+      patches
+
+ -- Norbert Tretkowski <nobse@debian.org>  Wed, 18 Feb 2004 00:22:01 +0100
+
+vim (1:6.2-214+2) unstable; urgency=low
+
+  * Mickael Marchand <marchand@kde.org>:
+    + add support for kvim-python, kvim-perl, kvim-tcl and kvim-ruby
+      (closes: #228865)
+    + add /etc/vim/gvimrc to kvim* packages
+
+ -- Mickael Marchand <marchand@kde.org>  Fri, 30 Jan 2004 00:52:11 +0100
+
+vim (1:6.2-214+1) unstable; urgency=low
+
+  * Norbert Tretkowski <nobse@debian.org>:
+    + new Co-Maintainer Mickael Marchand <marchand@kde.org>
+    + new upstream patches (182 to 214), see README.gz for details
+    + added a patch which adds sysfs to fstab keywords, thanks to Iain
+      Broadfoot (closes: #228475)
+    + added a patch which modifies runtime path in macros/less.sh, thanks
+      to Uli Martens (closes: #228779)
+
+  * Mickael Marchand <marchand@kde.org>:
+    + updated kvim patch to apply without conflicts to new vim upstream
+      patches
+
+ -- Norbert Tretkowski <nobse@debian.org>  Wed, 28 Jan 2004 20:18:52 +0100
+
+vim (1:6.2-181+1) unstable; urgency=low
+
+  * new upstream patches (174 to 181), see README.gz for details
+  * added gvim to GNOME application menu, thanks to Lee Maguire
+    (closes: #226848)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Fri, 16 Jan 2004 01:48:32 +0100
+
+vim (1:6.2-173+1) unstable; urgency=low
+
+  * new upstream patches (171 to 173), see README.gz for details
+  * added some more replaces to vim and kvim to avoid problems when upgrading
+    from older kvim (closes: #226735)
+  * added a patch which adds usbdevfs to fstab keywords, thanks to Ludovit
+    Hamaj (closes: #226714)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Thu, 08 Jan 2004 19:19:01 +0100
+
+vim (1:6.2-170+1) unstable; urgency=low
+
+  * new upstream patches (155 to 170), see README.gz for details
+  * updated kvim patch to apply without conflicts to new vim upstream patches,
+    thanks to Mickael Marchand
+  * updated 01ruby_mkmf.diff and 11allow-threaded-perl.diff to apply without
+    conflicts to new vim upstream patches
+  * new Maintainer: Norbert Tretkowski <nobse@debian.org>
+  * new Co-Maintainer: Luca Filipozzi <lfilipoz@debian.org>
+  * added FAQ.gz to vim package (closes: #221909)
+  * added additional php keywords to syntax file, thanks to Tobias Olsson and
+    Jill Vogel (closes: #148757, #176448)
+  * added german umlauts to keymap file, thanks to Marco Herrn
+    (closes: #217633)
+  * added filetypes for php4
+
+ -- Norbert Tretkowski <nobse@debian.org>  Tue, 30 Dec 2003 14:48:31 +0100
+
+vim (1:6.2-154+1) unstable; urgency=low
+
+  * new upstream patches (150 to 154), see README.gz for details
+  * added new variant for a lesstif package, thanks to Bernd Westphal
+  * added a patch to recognize reply-hook keyword in the muttrc syntax file,
+    thanks to Marco Herrn (closes: #221350)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Wed, 10 Dec 2003 00:18:35 +0100
+
+vim (1:6.2-149+1) unstable; urgency=low
+
+  * new upstream patches (146 to 149), see README.gz for details
+  * added a patch to fix wrong highlighting in makefiles, thanks to Cyrille
+    Dunant (closes: #133323)
+  * added another patch to add '.' to debcontrolName highlighting, thanks to
+    David Weinehall (closes: #117038)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sun,  9 Nov 2003 21:21:39 +0100
+
+vim (1:6.2-145+1) unstable; urgency=low
+
+  * new upstream patches (140 to 145), see README.gz for details
+  * added arabic support, thanks to Mohammed Elzubeir and Anmar Oueja
+    (closes: #216012)
+  * updated kvim patch to apply without conflicts to new vim upstream patches,
+    thanks to Mickael Marchand
+  * updated 01ruby_mkmf.diff and 11allow-threaded-perl.diff to apply without
+    conflicts to new vim upstream patches
+  * renamed ruby1.8 build-dependency to ruby
+
+ -- Norbert Tretkowski <nobse@debian.org>  Wed,  5 Nov 2003 22:51:15 +0100
+
+vim (1:6.2-139+1) unstable; urgency=low
+
+  * new upstream patches (128 to 139), see README.gz for details
+  * merge with kvim source package, thanks to Mickael Marchand
+    (closes: #214076)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sun,  2 Nov 2003 19:51:14 +0100
+
+vim (1:6.2-127+1) unstable; urgency=low
+
+  * new upstream patches (107 to 127), see README.gz for details
+  * used suggests instead of depends on vim for vim-doc
+
+ -- Norbert Tretkowski <nobse@debian.org>  Fri, 17 Oct 2003 12:45:15 +0200
+
+vim (1:6.2-106+4) unstable; urgency=low
+
+  * vim-gnome now conflict with vim-gtk, and vice versa (closes: #214580)
+  * using pre-depends to fix #211710 and to handle overwriting of moved gvimrc
+    was a really bad idea, used replaces instead (closes: #214759)
+  * added a ttf-bitstream-vera suggests to gui packages because it seems to be
+    the only font which works fine with gtk2 gui
+  * added a note about gui support to perl, python, ruby and tcl package
+    description
+  * corrected short description in vim-gnome package
+
+ -- Norbert Tretkowski <nobse@debian.org>  Wed,  8 Oct 2003 23:52:27 +0200
+
+vim (1:6.2-106+3) unstable; urgency=low
+
+  * moved vim-usermanual and vim-referencemanual to vim-doc package
+    (closes: #214462, #214556)
+  * removed perl, python, ruby, tcl support from vim-gtk and vim-gnome
+    (closes: #214422)
+  * gzipped /usr/share/vim/vim62/doc/help.txt (closes: #214115)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Tue,  7 Oct 2003 14:43:23 +0200
+
+vim (1:6.2-106+2) unstable; urgency=low
+
+  * really removed html documentation from vim package (closes: #211710)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Mon, 29 Sep 2003 19:09:11 +0200
+
+vim (1:6.2-106+1) unstable; urgency=low
+
+  * new upstream patches (99 to 106), see README.gz for details
+  * added a note to README.Debian about new modeline behaviour
+    (closes: #212696)
+  * helpztags update, fixes production of tag files in improper format which
+    vim can't understand (closes: #213032)
+  * temporary disabled copying debian/vim-install into vim package, waiting
+    for an update (see #213034 for details)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sat, 27 Sep 2003 23:26:43 +0200
+
+vim (1:6.2-098+5) unstable; urgency=low
+
+  * added a several requested vim-gnome package (closes: #211820)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Fri, 26 Sep 2003 20:19:51 +0200
+
+vim (1:6.2-098+4) unstable; urgency=low
+
+  * the "Happy Birthday Norbert" release
+  * corrected buggy Depends line in debian/control for packages depending on
+    vim, which should fix build problems (closes: #212686)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Thu, 25 Sep 2003 12:36:47 +0200
+
+vim (1:6.2-098+3) unstable; urgency=low
+
+  * yet another helpztags update
+
+ -- Norbert Tretkowski <nobse@debian.org>  Wed, 24 Sep 2003 15:30:41 +0200
+
+vim (1:6.2-098+2) unstable; urgency=low
+
+  * added a pre-depends on vim to vim-doc (closes: #211710)
+  * updated helpztags and modified debian/rules to create a manpage,
+    thanks again to Artur R. Czechowski (closes: #211763)
+  * compiled in runtime path extension and removed entry from vimrc
+  * changed build-depends from tcl8.3 to tcl8.4
+
+ -- Norbert Tretkowski <nobse@debian.org>  Wed, 24 Sep 2003 12:19:26 +0200
+
+vim (1:6.2-098+1) unstable; urgency=low
+
+  * new major upstream release (6.2) (closes: #196411, #205204)
+  * new upstream patches (1 to 98), see README.gz for details
+  * new Co-Maintainer: Norbert Tretkowski <nobse@debian.org>
+  * started putting upstream changes in a separate file
+  * added a patch that adds s390 support for control file syntax
+    highlighting (closes: #114750)
+  * moved to ruby1.8 (closes: #211539)
+  * enabled cscope functionality in vim package (closes: #159728)
+  * reenabled perl support in vim-perl package (closes: #200410)
+  * modified runtimepath in vimrc, added a README.Debian, helpztags and
+    vim-install to vim package, thanks Artur R. Czechowski
+  * added a Pre-Depends to packages depending on vim for a smooth upgrade
+    from older releases
+  * updated slrnrc syntax highlighting file, thanks to Sebastian Krause
+  * modified Build-Depends for an easier build on woody
+  * bumped up Standards-Version (no changes)
+  * moved config file and symlinks for gui version from vim package to each
+    of the additional packages (closes: #114944, #153068, #155711)
+  * fixed debchangelog syntax match, thanks to Gerfried Fuchs and Uli
+    Martens (closes: #153426)
+  * moved html documentation to new vim-doc package (closes: #121075)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Sun, 14 Sep 2003 22:48:51 +0200
+
+vim (1:6.1-474+2) unstable; urgency=low
+
+  * debian/patches/07scripts.vim: fix typo that causes all files to be syntax
+    highlighed as though they were cvs diff files (closes: #194583)
+
+ -- Luca Filipozzi <lfilipoz@debian.org>  Mon, 26 May 2003 08:01:06 -0700
+
+vim (1:6.1-474+1) unstable; urgency=low
+
+  * debian/vim.postinst + debian/vim-variant.postinst: delete symlinks located
+    in /usr/doc (closes: #189858, #190022)
+  * debian/rules + debain/runtime/vimrc: applied a patch that causes build
+    system to not compress the top level vim documenation file, help.txt; this
+    is needed so that plugin documentation can be merged into the online help
+    (closes: #186673) [thanks to: Recai Oktas]
+  * debian/patches/02debcontrol.vim: applied a patch that prevents vim syntax
+    erroneous highlighting of email addresses in Debian control files
+    (closes: #186673) [thanks to: Dmitry Borodaenko]
+  * debian/patches/03debcontrol.vim: applied a patch that makes the syntax
+    highlighter recongize the new Debian sections: embedded, gnome, kde,
+    libdevel, perl, python
+    (closes: #193235) [thanks to: Branden Robinson]
+  * debian/patches/04vim.1: applied a patch that documents -X flag
+    (closes: #141804) [thanks to: Guido Guenther]
+  * debian/patches/05muttrc.vim: applied a patch that adds several keywords
+    starting with 'crypt-', reflecting recent changes in muttrc syntax
+    (closes: #190864) [thanks to: Marco Herrn]
+  * debian/patches/06tasm.vim: applied a patch that fixes minor typo
+    (closes: #165819) [thanks to: David Weinehall]
+  * debian/patches/07scripts.vim.diff: applied a patch that helps vim correctly
+    highlight cvs diff output
+    (closes: #152721) [thanks to: Guido Guenther]
+  * debian/patches/08sh.vim.diff: applied a patch that increases the strictness
+    of Bourne shell syntax highlighting with respect to "if [ ]" constructs
+    (closes: #140203) [thanks to: Malcolm Parsons]
+  * debian/patches/09c.vim.diff: applied a patch that adds additional signal
+    names to the list of recognized signals for syntax highlighting
+    (closes: #173797) [thanks to: Wolfram Quester]
+  * debian/patches/10apache.vim.diff: applied a patch that adds SSLEnable
+    to the list of recognized keyworkds (closes: #135243)
+  * debian/runtime/vimrc: applied a patch that makes vim set printoptions
+    paper to /etc/papersize as per Debian standards
+    (closes: #127830) [thanks to: Ken Shan]
+  * new upstream patches:
+    + 6.1.321: When 'mouse' includes 'n' but not 'v', don't allow starting
+      Visual mode with the mouse.
+    + 6.1.322: Win32: The host name is always "PC " plus the real host
+      name.
+    + 6.1.323: ":registers" doesn't stop listing for a "q" at the more
+      prompt.
+    + 6.1.324: Crash when dragging a vertical separator when <LeftMouse>
+      is remapped to jump to another window.
+    + 6.1.325: Shift-Tab is not automatically recognized in an xterm.
+    + 6.1.326: Using a search pattern may read from uninitialized data
+      (Yasuhiro Matsumoto)
+    + 6.1.327: When opening the "mbyte.txt" help file the utf-8 characters
+      are unreadable, because the fileencoding is forced to be latin1.
+    + 6.1.328: Prototype for enc_canon_search() is missing.
+    + 6.1.329: When editing a file "a b c" replacing "%" in ":Cmd %" or
+      ":next %" does not work properly.
+    + 6.1.330: GTK, Motif and Athena: Keypad keys produce the same code
+      as non-keypad keys, making it impossible to map them separately.
+    + 6.1.331: When translating the help files, "LOCAL ADDITIONS" no
+      longer marks the spot where help files from plugins are to be listed.
+    + 6.1.332: Win32: Loading Perl dynamically doesn't work with Perl
+      5.8. Perl 5.8 also does not work with Cygwin and Ming.
+    + 6.1.333: Win32: Can't handle Unicode text on the clipboard. Can't
+      pass NUL byte, it becomes a line break.
+    + 6.1.334: Problem with drawing Hebrew characters.
+    + 6.1.335: Failure of obtaining the cursor position and window size
+      is ignored.
+    + 6.1.336: Warning for use of function prototypes of smsg().
+    + 6.1.337: When using "finish" in debug mode in function B() for
+      ":call A(B())" does not stop after B() is finished.
+    + 6.1.338: When using a menu that checks out the current file from
+      Insert mode, there is no warning for the changed file until exiting
+      Insert mode.
+    + 6.1.339: Completion doesn't allow "g:" in ":let g:did_<Tab>". (Benji
+      Fisher)
+    + 6.1.340: Win32: Can't compile the Perl interface with nmake.
+    + 6.1.341: In Insert mode with 'rightleft' set the cursor is drawn
+      halfway a double-wide character. For CTRL-R and CTRL-K in Insert
+      mode the " or ? is not displayed.
+    + 6.1.342: With 'rightleft' set typing "c" on a double-wide character
+      causes the cursor to be displayed one cell to the left.
+    + 6.1.343: Cannot compile with the +multi_byte feature but without
+      +rightleft. Cannot compile without the GUI.
+    + 6.1.344: When using ":silent filetype" the output is still put in
+      the message history.
+    + 6.1.345: Win32: 'imdisable' doesn't work.
+    + 6.1.346: The scroll wheel can only scroll the current window.
+    + 6.1.347: When using cscope to list matching tags, the listed number
+      is sometimes not equal to what cscope uses.
+    + 6.1.348: Wildmode with wildmenu: ":set wildmode=list,full",
+      ":colorscheme <tab>" results in "zellner" instead of the first
+      entry. (Anand Hariharan)
+    + 6.1.349: "vim --serverlist" when no server was ever started gives
+      an error message without "\n". "vim --serverlist" doesn't exit when
+      the X server can't be contacted, it starts Vim unexpectedly.
+    + 6.1.350: When entering a buffer with ":bnext" for the first time,
+      using an autocommand to restore the last used cursor position
+      doesn't work.
+    + 6.1.351: Crash when starting Vim the first time in an X server. (John
+      McGowan)
+    + 6.1.352: Win32: Crash when setting "imdisable" in _vimrc.
+    + 6.1.353: Problem with drawing Arabic characters.
+    + 6.1.354: MS-Windows 98: Notepad can't paste text copied from Vim when
+      'encoding' is "utf-8".
+    + 6.1.355: In a regexp '\n' will never match anything in a string.
+    + 6.1.356: Compiler warnings for using convert_setup() and a few
+      other things.
+    + 6.1.357: CR in the quickfix window jumps to the error under the
+      cursor, but this doesn't work in Insert mode.
+    + 6.1.358: The tutor doesn't select another locale version properly.
+    + 6.1.359: Mac Carbon: Vim doesn't get focus when started from the
+      command line. Crash when using horizontal scroll bar.
+    + 6.1.360: In Insert mode CTRL-K ESC messes up a multi-byte character.
+    + 6.1.361: Cannot jump to a file mark with ":'M".
+    + 6.1.362: tgetent() may return zero for success. tgetflag() may
+      return -1 for an error.
+    + 6.1.363: byte2line() can return one more than the number of lines.
+    + 6.1.364: That the FileChangedShell autocommand event never nests
+      makes it difficult to reload a file in a normal way.
+    + 6.1.365: Setting a breakpoint in a sourced file with a relative
+      path name doesn't work.
+    + 6.1.366: Can't use Vim with Netbeans.
+    + 6.1.367: Setting a breakpoint in a function doesn't work. For
+      a sourced file it doesn't work when symbolic links are
+      involved. (Servatius Brandt)
+    + 6.1.368: Completion for ":map" does not include <silent> and
+      <script>. ":mkexrc" do not save the <silent> attribute of mappings.
+    + 6.1.369: VMS: Vim hangs when attempting to edit a read-only file
+      in the terminal. Problem with VMS filenames for quickfix.
+    + 6.1.370: #ifdef nesting is unclear.
+    + 6.1.371: "%V" in 'statusline' doesn't show "0-1" in an empty line.
+    + 6.1.372: With 16 bit ints there are compiler warnings.
+    + 6.1.373: The default page header for printing is not translated.
+    + 6.1.374: MS-Windows: Cannot build GvimExt with MingW or Cygwin.
+    + 6.1.375: MS-Windows: ':!dir "%"' does not work for a file name
+      with spaces.
+    + 6.1.376: "vim --version" and "vim --help" have a non-zero exit
+      code. That is unusual.
+    + 6.1.377: Can't add words to 'lispwords' option.
+    + 6.1.378: When two buffer-local user commands are ambiguous, a full
+      match with a global user command isn't found.
+    + 6.1.379: Linux with kernel 2.2 can't use the alternate stack in
+      combination with threading, causes an infinite loop.
+    + 6.1.380: When 'winminheight' is zero and the quickfix window is
+      zero lines, entering the window doesn't make it highter. (Christian
+      J. Robinson)
+    + 6.1.381: When a BufWriteCmd is used and it leaves the buffer
+      modified, the window may still be closed.
+    + 6.1.382: Win32 GUI: When using two monitors, the code that
+      checks/fixes the window size and position (e.g. when a font changes)
+      doesn't work properly.
+    + 6.1.383: The filling of the status line doesn't work properly for
+      multi-byte characters. There is no check for going past the end of
+      the buffer.
+    + 6.1.384: It is not possible to find if a certain patch has been
+      included.
+    + 6.1.385: Can't compile without the multi-byte feature.
+    + 6.1.386: Get duplicate tags when running ":helptags".
+    + 6.1.387: Compiler warning for pointer cast.
+    + 6.1.388: Compiler warning for pointer cast.
+    + 6.1.389: Balloon evaluation doesn't work for GTK. has("balloon_eval")
+      doesn't work.
+    + 6.1.390: It's not possible to tell Vim to save and exit through the
+      Netbeans interface. Would still try to send balloon eval text after
+      the connection is closed. Can't use Unicode characters for sign text.
+    + 6.1.391: ml_get
+    + 6.1.392: Highlighting in the 'statusline' is in the wrong position
+      when an item is tructated.
+    + 6.1.393: When compiled with Python and threads, detaching the
+      terminal may cause Vim to loop forever.
+    + 6.1.394: The netbeans interface doesn't recognize multibyte glyph
+      names.
+    + 6.1.395: VMS: OLD_VMS is never defined. Missing function prototype.
+    + 6.1.396: Compiler warnings for using enum.
+    + 6.1.397: The install program may use a wrong path for the diff
+      command if there is a space in the install directory path.
+    + 6.1.398: Saving the typeahead for debug mode causes trouble for a
+      test script.
+    + 6.1.399: Warning for unused variable.
+    + 6.1.400: When a BufWriteCmd wipes out the buffer it may still
+      be accessed.
+    + 6.1.401: Building the Win16 version with Borland 5.01 doesn't
+      work. "make test" doesn't work with Make_dos.mak.
+    + 6.1.402: When evaluating a function name with curly braces, an
+      error is not handled consistently.
+    + 6.1.403: MS-Windows 16 bit: compiler warnings.
+    + 6.1.404: Various small problems.
+    + 6.1.405: A few files are missing from the toplevel Makefile.
+    + 6.1.406: When a statusline item doesn't fit arbitrary text appears.
+    + 6.1.407: ":set scrollbind | help" scrollbinds the help
+      window. (Andrew Pimlott)
+    + 6.1.408: When 'rightleft' is set unprintable character 0x0c is
+      displayed as ">c0<".
+    + 6.1.409: Generating tags for the help doesn't work for some locales.
+    + 6.1.410: Linking error when compiling with Netbeans but without
+      sign icons.
+    + 6.1.411: When 'virtualedit' is set, highlighting a Visual block
+      beyond the end of a line may be wrong.
+    + 6.1.412: When swapping terminal screens and using ":gui" to start
+      the GUI, the shell prompt may be after a hit-enter prompt.
+    + 6.1.413: When 'clipboard' contains "unnamed", "p" in Visual mode
+      doesn't work correctly.
+    + 6.1.414: VMS: Vim busy waits when waiting for input.
+    + 6.1.415: When there is a vertical split and a quickfix window,
+      reducing the size of the Vim window may result in a wrong window
+      layout and a crash.
+    + 6.1.416: When using the Netbeans interface, a line with a sign
+      cannot be changed.
+    + 6.1.417: Unprintable multi-byte characters are not handled
+      correctly. Multi-byte characters above 0xffff are displayed as
+      another character.
+    + 6.1.418: The result of strftime() is in the current locals. Need
+      to convert it to 'encoding'.
+    + 6.1.419: Vim doesn't compile on AIX 5.1.
+    + 6.1.420: convert_input() has an unnecessary STRLEN(). Conversion
+      from UCS-2 to a codepage uses word count instead of byte count.
+    + 6.1.421: MS-Windows 9x: When putting text on the clipboard it can
+      be in the wrong encoding.
+    + 6.1.422: Error in .vimrc doesn't cause hit-enter prompt when
+      swapping screens.
+    + 6.1.423: Can't find arbitrary text in help files.
+    + 6.1.424: Win32: Gvim compiled with VC++ 7.0 run on Windows 95 does
+      not show menu items.
+    + 6.1.425: ":helptags $VIMRUNTIME/doc" does not add the "help-tags"
+      tag.
+    + 6.1.426: "--remote-wait +cmd file" waits forever.
+    + 6.1.427: Several error messages for regexp patterns are not
+      translated.
+    + 6.1.428: FreeBSD: wait() may hang when compiled with Python support
+      and doing a system() call in a startup script.
+    + 6.1.429: Crash when using showmarks.vim plugin.
+    + 6.1.430: In Lisp code backslashed parens should be ignored for "%".
+    + 6.1.431: Debug commands end up in redirected text.
+    + 6.1.432: MS-Windows: ":make %:p" inserts extra backslashes.
+    + 6.1.433: ":popup" only works for Win32.
+    + 6.1.434: Win32: When there are more than 32767 lines, the scrollbar
+      has a roundoff error.
+    + 6.1.435: ":winsize x" resizes the Vim window to the minimal
+      size. (Andrew Pimlott)
+    + 6.1.436: When a long UTF-8 file contains an illegal byte it's hard
+      to find out where it is.
+    + 6.1.437: Using multi-byte functions when they are not available.
+    + 6.1.438: When Perl has thread support Vim cannot use the Perl
+      interface.
+    + 6.1.439: Netbeans: A "create" function doesn't actually create a
+      buffer, following functions may fail.
+    + 6.1.440: The "@*" command doesn't obtain the actual contents of
+      the clipboard.
+    + 6.1.441: "zj" and "zk" cannot be used as a motion command after
+      an operator.
+    + 6.1.442: Unicode 3.2 defines more space and punctuation characters.
+    + 6.1.443: Win32: The gvimext.dll build with Borland 5.5 requires
+      another DLL.
+    + 6.1.444: Win32: Enabling a build with gettext support is not
+      consistant.
+    + 6.1.445: DJGPP: get warning for argument of putenv()
+    + 6.1.446: Win32: The MingW makefile uses a different style of
+      arguments than other makefiles. Dynamic IME is not supported
+      for Cygwin.
+    + 6.1.447: "make install" uses "make" directly for generating help
+      tags.
+    + 6.1.448: 'titlestring' has a default maximum width of 50 chars
+      per item.
+    + 6.1.449: When "1" and "a" are in 'formatoptions', auto-formatting
+      always moves a newly added character to the next line.
+    + 6.1.450: Termcap entry "kB" for back-tab is not recognized.
+    + 6.1.451: GUI: When text in the find dialog contains a slash,
+      a backslash is inserted the next time it is opened.
+    + 6.1.452: Win32: IME support doesn't work for MSVC.
+    + 6.1.453: When compiled without sign icons but with sign support,
+      adding a sign may cause a crash.
+    + 6.1.454: Win32: pasting Russian text in Vim with 'enc' set to cp1251
+      results in utf-8 bytes. Conversion from DBCS to UCS2 does not work
+      when 'encoding' is not the active codepage.
+    + 6.1.455: Some Unicode characters can be one or two character
+      cells wide.
+    + 6.1.456: Win32: IME doesn't work.
+    + 6.1.457: An empty register in viminfo causes conversion to fail.
+    + 6.1.458: Compiler warning for pointer.
+    + 6.1.459: Win32: libcall() may return an invalid pointer and cause
+      Vim to crash.
+    + 6.1.460: GTK: after scrolling the text one line with a key, clicking
+      the arrow of the scrollbar does not always work.
+    + 6.1.461: When a keymap is active, typing a character in Select mode
+      does not use it.
+    + 6.1.462: When autocommands wipe out a buffer, a crash may
+      happen. (Hari Krishna Dara)
+    + 6.1.463: When writing a compressed file, the file name that gzip
+      stores in the file is the weird temporary file name.
+    + 6.1.464: Crash when using C++ syntax highlighting.
+    + 6.1.465: Compile error when using cygwin.
+    + 6.1.466: The "-f" argument is a bit obscure.
+    + 6.1.467: Setting the window title doesn't work for Chinese.
+    + 6.1.468: ":mksession" also stores folds for buffers which will not
+      be restored.
+    + 6.1.469: 'listchars' cannot contain multi-byte characters.
+    + 6.1.470: Polish messages don't show up correctly on MS-Windows.
+    + 6.1.471: ":jumps" output continues after pressing "q" at the
+      more-prompt.
+    + 6.1.472: When there is an authentication error when connecting to
+      the X server Vim exits.
+    + 6.1.473: Referring to $curwin or $curbuf in Perl 5.6 causes a crash.
+    + 6.1.474: When opening the command-line window in Ex mode it's
+      impossible to go back.
+
+ -- Luca Filipozzi <lfilipoz@debian.org>  Sun,  6 Apr 2003 20:35:12 -0700
+
+vim (1:6.1-320+1) unstable; urgency=low
+
+  * new upstream patches:
+    + 6.1.291: Win32: CTRL-@ doesn't work. Don't even get a message for it.
+    + 6.1.292: Win32: Can't compile with new MingW compiler. Borland 5
+      makefile doesn't generate pathdef.c.
+    + 6.1.293: byte2line() returns a wrong result for some values.
+    + 6.1.294: Can't include a multi-byte character in a string by its
+      hex value.
+    + 6.1.295: Processing the cs.po file generates an error.
+    + 6.1.296: Win32: When cancelling the font dialog 'guifont' remains
+      set to "*".
+    + 6.1.297: "make test" fails in test6 in an UTF-8 environment.
+    + 6.1.298: When using signs and the first line of a closed fold has
+      a sign it can be redrawn as if the fold was open.
+    + 6.1.299: ":edit +set\ ro file" doesn't work.
+    + 6.1.300: Handling of ETO_IGNORELANGUAGE is confusing.
+    + 6.1.301: French translation of file-save dialog doesn't show
+      file name.
+    + 6.1.302: Counting lines of the Visual area is incorrect for closed
+      folds.
+    + 6.1.303: The Top/Bottom/All text does not always fit in the ruler
+      when translated to Japanese. Problem with a character being wider
+      when in a bold font.
+    + 6.1.304: Win32: Postscript is always enabled in the
+      MingW Makefile. Pathdef.c isn't generated properly with
+      Make_bc5.mak. (Yasuhiro Matsumoto)
+    + 6.1.305: When 'verbose' is 14 or higher, a function call may cause
+      reading uninitialized data.
+    + 6.1.306: The AIX VisualAge cc compiler doesn't define __STDC__.
+    + 6.1.307: When a double-byte character has an illegal tail byte the
+      display is messed up.
+    + 6.1.308: Can't reset the Visual mode returned by visualmode().
+    + 6.1.309: The tutor doesn't select German if the locale name is
+      "German_Germany.1252".
+    + 6.1.310: All double-byte characters are displayed as "XX".
+    + 6.1.311: VMS: path in window title doesn't include necessary
+      separator. file version doesn't always work properly with
+      Unix. Crashes because of memory overwrite in GUI. Didn't always
+      handle files with lowercase and correct path.
+    + 6.1.312: When using ":silent" debugging is also done silently.
+    + 6.1.313: When a ":drop fname" command is used and "fname" is open
+      in another window, it is also opened in the current window.
+    + 6.1.314: Missing backslash in "Generic Config file" syntax menu.
+    + 6.1.315: A very long hostname may lead to an unterminated
+      string. Failing to obtain a hostname may result in garbage.
+    + 6.1.316: When exiting with "wq" and there is a hidden buffer, after
+      the "file changed" dialog there is a warning for a changed buffer.
+    + 6.1.317: Closing a window may cause some of the remaining windows
+      to be positioned wrong if there is a mix of horizontal and vertial
+      splits.
+    + 6.1.318: auto/pathdef.c can include wrong quotes when a compiler
+      flag includes quotes.
+    + 6.1.319: Using "--remote +cmd file" does not execute "cmd".
+    + 6.1.320: When a ":drop one\ file" command is used the file "one\
+      file" is opened, the backslash is not removed.
+  * debian/patches/01ruby_mkmf: fixes an FTBFS that impacts ia64 but should
+    probably have affected all archs (closes: Bug#174375)
+
+ -- Luca Filipozzi <lfilipoz@debian.org>  Sat,  8 Feb 2003 12:28:24 -0800
+
+vim (1:6.1-290+1) unstable; urgency=low
+
+  * new upstream patches:
+    + 6.1.267: Using "p" to paste into a Visual selected area may cause
+      a crash.
+    + 6.1.268: When triggering an abbreviation with a multi-byte character,
+      this character is not correctly inserted after expanding the
+      abbreviation.
+    + 6.1.269: After using input() text written with ":redir" gets
+      extra indent.
+    + 6.1.270: GCC 3.2.1 still seems to have an optimizer problem.
+    + 6.1.271: When compiling without the +syntax feature there are errors.
+    + 6.1.272: After using ":set define<" a crash may happen.
+    + 6.1.273: When the cursor doesn't blink, redrawing an exposed area
+      may hide the cursor.
+    + 6.1.274: Resetting the iconv() state after each error is wrong for
+      an incomplete sequence.
+    + 6.1.275: When using "v" in a startup script, get warning message
+      that terminal cannot highlight.
+    + 6.1.276: "gvim --remote file" doesn't prompt for an encryption key.
+    + 6.1.277: Compilation error when building without GUI.
+    + 6.1.278: When using signs the line number of a closed fold doesn't
+      line up with the other line numbers.
+    + 6.1.279: The prototype for smsg() and smsg_attr() do not match the
+      function definition. This may cause trouble for some compilers.
+    + 6.1.280: It's possible to use an argument "firstline" or "lastline"
+      for a function but using "a:firstline" or "a:lastline" in the
+      function won't work.
+    + 6.1.281: In Insert mode CTRL-X CTRL-G leaves the cursor after
+      the ruler.
+    + 6.1.282: Elvis uses "se" in a modeline, Vim doesn't recognize this.
+    + 6.1.283: For ":sign" the icon file name cannot contain a space.
+    + 6.1.284: On Solaris there is a warning for "struct utimbuf".
+    + 6.1.285: Can't wipe out a buffer with 'bufhidden' option.
+    + 6.1.286: 'showbreak' cannot contain multi-byte characters.
+    + 6.1.287: Effect of "delete" and "wipe" in 'bufhide' were mixed up.
+    + 6.1.288: ":silent function F" hangs.
+    + 6.1.289: Compiler warning for pointer.
+    + 6.1.290: Truncating long text for message box may break multi-byte
+      character.
+
+ -- Luca Filipozzi <lfilipoz@debian.org>  Thu, 16 Jan 2003 21:37:13 -0800
+
+vim (1:6.1-266+1) unstable; urgency=low
+
+  * new epoch: change package version numbering so that new upstream patches
+    don't generate new source packages
+  * new upstream patches:
+    + 6.1.264: exists() does not work for built-in functions
+    + 6.1.265: libcall() can be used in 'foldexpr' to call any system
+      function. rename(), delete() and remote_send() can also be used in
+      'foldexpr'. These are security problems.
+    + 6.1.266: Win32: compile error in eval.c.
+
+ -- Luca Filipozzi <lfilipoz@debian.org>  Tue, 24 Dec 2002 14:06:30 -0800
+
+vim (6.1.263-2) unstable; urgency=low
+
+  * debian/control: fix Build-Depends to include bzip2 (closes: Bug#171078)
+  * debian/patches: 00os_unix.h - set default runtime path to include /etc/vim
+
+ -- Luca Filipozzi <lfilipoz@debian.org>  Thu, 28 Nov 2002 09:15:32 -0800
+
+vim (6.1.263-1) unstable; urgency=low
+
+  * New maintainer
+  * New debian build scripts
+  * debian/runtime/vimrc: added 'set nomodeline' to address potential
+    security issue wherein malicious persons author files with hazardous
+    modelines, users unwittingly open said files and vim evaluates the
+    dangerous modelines
+  * Apply upstream patches:
+    + 6.1.207: Indenting a Java file hangs below a line with a comment
+      after a command.
+    + 6.1.208: Can't use the buffer number from the Python interface.
+    + 6.1.209: Printing doesn't work on Mac OS classic.
+    + 6.1.210: When there is an iconv() conversion error when reading a
+      file there can be an error the next time iconv() is used.
+    + 6.1.211: The message "use ! to override" is confusing.
+    + 6.1.212: When Vim was started with "-R" ":new" creates a buffer
+      'noreadonly' while ":enew" has 'readonly' set.
+    + 6.1.213: Using CTRL-W H may cause a big gap to appear below the
+      last window.
+    + 6.1.214: When installing Vim and the runtime files were checked
+      out from CVS the CVS directories will also be installed.
+    + 6.1.215: Win32: ":pwd" uses backslashes even when 'shellslash'
+      is set.
+    + 6.1.216: When dynamically loading the iconv library, the error
+      codes may be confused.
+    + 6.1.217: When sourcing the same Vim script using a different name
+      (symbolic link or MS-Windows 8.3 name) it is listed twice with
+      ":scriptnames". (Tony Mechelynck)
+    + 6.1.218: No error message for using the function argument
+      "5+". (Servatius Brandt)
+    + 6.1.219: When using ":amenu :b 1<CR>" with a Visual selection and
+      'insertmode' is set, Vim does not return to Insert mode. (Mickael
+      Marchand)
+    + 6.1.220: When using a BufReadPost autocommand that changes the line
+      count, e.g., "$-1join", reloading a file that was changed outside
+      Vim does not work properly.
+    + 6.1.221: Changing case may not work properly, depending on the
+      current locale.
+    + 6.1.222: Patch 6.1.219 was incomplete.
+    + 6.1.223: Win32: When IME is activated 'iminsert' is set, but it
+      might never be reset when IME is disabled. All systems: 'iminsert' is
+      set to 2 when leaving Insert mode, even when langmap is being used.
+    + 6.1.224: "expand('$VAR')" returns an empty string when the expanded
+      $VAR is not an existing file.
+    + 6.1.225: Using <C-O><C-^> in Insert mode has a delay when starting
+      "vim -u NONE" and ":set nocp hidden". (Emmanuel) do_ecmd() uses
+      fileinfo(), the redraw is done after a delay to give the user time
+      to read the message.
+    + 6.1.226: Using ":debug" with a ":normal" command may cause a
+      hang. (Colin Keith)
+    + 6.1.227: It is possible to use a variable name "asdf:asdf" and
+      ":let j:asdf = 5" does not give an error message.
+    + 6.1.228: Win32: The special output function for Hangul is used
+      too often, causing special handling for other situations
+      to be skipped. bInComposition is always FALSE, causing
+      ImeGetTempComposition() always to return NULL.
+    + 6.1.229: Win32: Conversion to/from often used codepages requires
+      the iconv library, which is not always available.
+    + 6.1.230: Win16: building doesn't work.
+    + 6.1.231: Double clicking with the mouse to select a word does not
+      work for multi-byte characters.
+    + 6.1.232: Using ex_normal_busy while it might not be available. (Axel
+      Kielhorn)
+    + 6.1.233: ":help expr-||" does not work.
+    + 6.1.234: Get a warning for using a negative value for st_dev.
+    + 6.1.235: 'iminsert' is changed from 1 to 2 when leaving Insert
+      mode. (Peter Valach)
+    + 6.1.236: Memory leaks when appending lines for ":diffget" or
+      ":diffput" and when reloading a changec buffer.
+    + 6.1.237: Putting in Visual block mode does not work correctly when
+      "$" was used or when the first line is short.
+    + 6.1.238: Win32: The "icon=" argument for the ":menu" command does
+      not search for the bitmap file.
+    + 6.1.239: Giving an error for missing :endif or :endwhile when
+      being interrupted.
+    + 6.1.240: Win32 with BCC 5: CPU may be defined in the environment,
+      which causes a wrong argument for the compiler.
+    + 6.1.241: Something goes wrong when drawing or undrawing the cursor.
+    + 6.1.242: When pasting a large number of lines on the command line
+      it is not possible to interrupt.
+    + 6.1.243: Win32: When the OLE version is started and wasn't
+      registered, a message pops up to suggest registering, even when
+      this isn't possible (when the registry is not writable).
+    + 6.1.244: Patch 6.1.237 was missing the diff for vim.h.
+    + 6.1.245: Comparing with ignored case does not work properly for
+      Unicode with a locale where case folding an ASCII character results
+      in a multi-byte character.
+    + 6.1.246: ":blast" goes to the first buffer if the last one is
+      unlisted.
+    + 6.1.247: ACL support doesn't always work properly.
+    + 6.1.248: Typing 'q' at the more-prompt for ":let" does not quit
+      the listing.
+    + 6.1.249: Can't expand a path on the command line if it includes a
+      "|" as a trail byte of a multi-byte character.
+    + 6.1.250: When changing the value of 'lines' inside the expression
+      set with 'diffexpr' Vim might crash.
+    + 6.1.251: Can't use completion for ":lcd" and ":lchdir" like ":cd".
+    + 6.1.252: "vi}" does not include a line break when the "}" is at
+      the start of a following line.
+    + 6.1.253: Win32 with Cygwin: Changes the path of arguments in a
+      wrong way.
+    + 6.1.254: exists("foo{bar}") does not work. ':unlet v{"a"}r' does
+      not work. ":let v{a}r1 v{a}r2" does not work. ":func F{(1)}" does
+      not work. ":delfunc F{" does not give an error message. ':delfunc
+      F{"F"}' does not work.
+    + 6.1.255: Crash when loading menu.vim a second time. ":unlet garbage
+      foo" tries unletting "foo" after an error message. Very long function
+      arguments cause very long messages when 'verbose' is 14 or higher.
+    + 6.1.256: Defining a function after ":if 0" could still cause an
+      error message for an existing function. Leaking memory when there
+      are trailing characters for ":delfunc".
+    + 6.1.257: ":cwindow" always sets the previous window to the last
+      but one window.
+    + 6.1.258: Buffers menu doesn't work properly for multibyte buffer
+      names.
+    + 6.1.259: Mac: with 'patchmode' is used filenames are truncated.
+    + 6.1.260: GCC 3.2 still seems to have an optimizer problem.
+    + 6.1.261: When deleting a line in a buffer which is not the current
+      buffer, using the Perl interface Delete(), the cursor in the current
+      window may move.
+    + 6.1.262: When jumping over folds with "z[", "zj" and "zk" the
+      previous position is not remembered.
+    + 6.1.263: When typing a multi-byte character that triggers an
+      abbreviation it is not inserted properly.
+
+ -- Luca Filipozzi <lfilipoz@debian.org>  Tue, 26 Nov 2002 09:46:26 -0800
+
+vim (6.1.206-1) unstable; urgency=low
+
+  * Change priority of vim package back to optional
+  * Switch to tcl8.4-dev
+  * Apply upstream patches:
+    + 6.1.166: When 'autoindent' is set and mswin.vim has been sourced,
+      pasting with CTRL-V just after auto-indenting removes the
+      indent.
+    + 6.1.167: When giving a negative argument to ":retab" strange things
+      start happening.
+    + 6.1.168: Pressing CTRL-C at the hit-enter prompt doesn't end
+      the prompt.
+    + 6.1.169: bufexists() finds a buffer by using the name of a symbolic
+      link to it, but bufnr
+    + 6.1.170: Using ":mksession" uses the default session file name,
+      but "vim -S" doesn't.
+    + 6.1.171: When opening a line just above a closed fold with "O"
+      and the comment leader is automatically inserted, the cursor is
+      displayed in the first column.
+    + 6.1.172: Command line completion of ":tag /pat" does not show the
+      same results as the tags the command actually finds.
+    + 6.1.173: When using remote control to edit a position in a file
+      and this file is the current buffer and it's modified, the window
+      is split and the ":drop" command fails.
+    + 6.1.174: It is difficult to know in a script whether an option not
+      only exists but really works.
+    + 6.1.175: When reading commands from a pipe and a CTRL-C is pressed,
+      Vim will hang.
+    + 6.1.176: When the stack limit is very big a false out-of-stack
+      error may be detected.
+    + 6.1.177: ":wincmd" does not allow a following command.
+    + 6.1.178: When 'expandtab' is set "r<C-V><Tab>" still expands the Tab.
+    + 6.1.179: When using X11R5 XIMPreserveState is undefined.
+    + 6.1.180: Use of the GUI code for forking is inconsistent.
+    + 6.1.181: If the terminal doesn't wrap from the last char in a line
+      to the next line, the last column is blanked out.
+    + 6.1.182: It is not possible to auto-format comments only.
+    + 6.1.183: When 'fencs' is empty and 'enc' is utf-8, reading a file
+      with illegal bytes gives "CONVERSION ERROR" even though no conversion
+      is done. 'readonly' is set, even though writing the file results
+      in an unmodified file.
+    + 6.1.184: The extra mouse buttons found on some mice don't work.
+    + 6.1.185: Can't compile without +comments feature.
+    + 6.1.186: ":wincmd" does not allow a following comment.
+    + 6.1.187: Using ":doarg" with 'hidden' set and the current file is
+      the only argument and was modified gives an error message.
+    + 6.1.188: Unused variable in the small version.
+    + 6.1.189: inputdialog() doesn't work when 'c' is in 'guioptions'.
+    + 6.1.190: VMS: doesn't build with GTK GUI. Various other problems.
+    + 6.1.191: When using "vim -s script" and redirecting the output,
+      the delay for the "Output is not to a terminal" warning slows Vim
+      down too much.
+    + 6.1.192: ":diffsplit" doesn't add "hor" to 'scrollopt'.
+    + 6.1.193: Crash in in_id_list() for an item with a "containedin" list.
+    + 6.1.194: When "t_ti" is set but it doesn't cause swapping terminal
+      pages, "ZZ" may cause the shell prompt to appear on top of the
+      file-write message.
+    + 6.1.195: The quickfix and preview windows always keep their height,
+      while other windows can't fix their height.
+    + 6.1.196: On Mac OS X 10.2 generating osdef.h fails.
+    + 6.1.197: ":help <C-V><C-\><C-V><C-N>" (resulting in <1c><0e>)
+      gives an error message.
+    + 6.1.198: Mac OS X: Dialogues don't work.
+    + 6.1.199: 'guifontwide' doesn't work on Win32.
+    + 6.1.200: ":syn sync fromstart" is not skipped after ":if 0". This
+      can make syntax highlighting very slow.
+    + 6.1.201: Warning for illegal pointer combination.
+    + 6.1.202: Win32: filewritable() doesn't work properly on directories.
+    + 6.1.203: ":%s/~//" causes a crash after ":%s/x//".
+    + 6.1.204: Warning for an illegal pointer on Solaris.
+    + 6.1.205: The gzip plugin changes the alternate file when editing
+      a compressed file.
+    + 6.1.206: The script generated with ":mksession" doesn't work properly
+      when some commands are mapped.
+
+ -- Wichert Akkerman <wakkerma@debian.org>  Tue,  1 Oct 2002 23:20:57 +0200
+
+vim (6.1.165-1) unstable; urgency=low
+
+  * Change priority to extra
+  * Build-Depend on libperl-dev >= 5.8.0-7 in order to force perl transition
+  * Apply upstream patches:
+    + 6.1.152: When $LANG is iso8859-1 translated menus are not used.
+    + 6.1.153: Searching in included files may search recursively when
+      the path starts with "../".
+    + 6.1.154: DJGPP: "vim -h" leaves the cursor in a wrong position.
+    + 6.1.155: Win32: Cursor may sometimes disappear in Insert mode.
+    + 6.1.156: Conversion between DBCS and UCS-2 isn't implemented cleanly.
+    + 6.1.157: 'hlsearch' highlights only the second comma in ",,,,,"
+      with "/,\@<=[^,]*".
+    + 6.1.158: "zs" and "ze" don't work correctly with ":set nowrap
+      siso=1".
+    + 6.1.159: When expanding an abbreviation that includes a multi-byte
+      character too many characters are deleted.
+    + 6.1.160: ":$read file.gz" doesn't work.
+    + 6.1.161: Warning for signed/unsigned compare. Can set 'siso' to a
+      negative value.
+    + 6.1.162: Python interface: Didn't initialize threads properly.
+    + 6.1.163: Win32: Can't compile with Python after 6.1.162.
+    + 6.1.164: If 'modifiable' is off, converting to xxd fails and
+      'filetype' is changed to "xxd" anyway.
+    + 6.1.165: Making changes in several lines and then a change in one
+      of these lines that splits it in two or more lines, undo information
+      was corrupted. May cause a crash.
+
+ -- Wichert Akkerman <wakkerma@debian.org>  Tue, 27 Aug 2002 17:10:44 +0000
+
+vim (6.1.152-1) unstable; urgency=low
+
+  * Apply upstream patches:
+    + 6.1.049: On a 32 bit display a valid color may cause an error
+      message, because its pixel value is negative.
+    + 6.1.050: After patch 6.1.049 the non-GUI version doesn't compile.
+    + 6.1.051: Doesn't compile with GUI and small features.
+    + 6.1.052: Unix: The executable() function doesn't work when the
+      "which" command isn't available.
+    + 6.1.053: When 'sessionoptions' contains "globals", or "localoptions"
+      and an option value contains a line break, the resulting script
+      is wrong.
+    + 6.1.054: GUI: A mouse click is not recognized at the more prompt,
+      even when 'mouse' includes 'r'.
+    + 6.1.055: When editing a compressed file, Vim will inspect the
+      contents to guess the filetype.
+    + 6.1.056: Loading the Syntax menu can take quite a bit of time.
+    + 6.1.057: An ESC inside a mapping doesn't work as documented when
+      'insertmode' is set, it does go from Visual or Normal mode to
+      Insert mode.
+    + 6.1.058: When there is a closed fold just above the first line in
+      the window, using CTRL-X CTRL-Y in Insert mode will show only one
+      line of the fold.
+    + 6.1.059: ":redir > ~/file" doesn't work.
+    + 6.1.060: When 'virtualedit' is set and 'selection' is "exclusive",
+      deleting a character just before a tab changes the tab into
+      spaces. Undo doesn't restore the tab.
+    + 6.1.061: When 'virtualedit' is set and 'selection' is "exclusive",
+      a Visual selection that ends just after a tab doesn't include that
+      tab in the highlighting.
+    + 6.1.062: The "man" filetype plugin doesn't work properly on
+      Solaris 5.
+    + 6.1.063: Java indenting doesn't work properly.
+    + 6.1.064: The URLs that the netrw plugin recognized for ftp and rcp
+      did not conform to the standard method://[user@]host[:port]/path.
+    + 6.1.065: VMS: The colorscheme, keymap and compiler menus are not
+      filled in.
+    + 6.1.066: When calling system() in a plugin reading stdin hangs.
+    + 6.1.067: ":set viminfo+=f0" is not working.
+    + 6.1.068: When a file is reloaded after it was changed outside of Vim,
+      diff mode isn't updated.
+    + 6.1.069: When 'showmatch' is set and "$" is in 'cpoptions', using
+      "C}<Esc>" may forget to remove the "$".
+    + 6.1.070: Compiler warning for signed/unsigned mismatch.
+    + 6.1.071: When 'selection' is exclusive, g CTRL-G in Visual mode
+      counts one character too much.
+    + 6.1.072: When a file name in a tags file starts with http://
+      or something else for which there is a BufReadCmd autocommand,
+      the file isn't opened anyway.
+    + 6.1.073: BC5: Can't easily specify a tiny, small, normal, big or
+      huge version.
+    + 6.1.074: When 'cdpath' includes "../..", changing to a directory
+      in which we currently already are doesn't work. ff_check_visited()
+      adds the directory both when using it as the root for searching
+      and for the actual matches.
+    + 6.1.075: Can't compile fileio.c on MS-Windows.
+    + 6.1.076: Macintosh: explorer plugin doesn't work on Mac Classic. IME
+      doesn't work. Dialog boxes don't work on Mac OS X
+    + 6.1.077: On a Debian system wht ACL linking fails.
+    + 6.1.078: When using 'foldmethod' "marker" and the end marker appears
+      before the start marker in the file, no fold is found.
+    + 6.1.079: When using "s" in Visual block mode with 'virtualedit'
+      set, when the selected block is after the end of some lines the
+      wrong text is inserted and some lines are skipped.
+    + 6.1.080: When using gcc with /usr/local already in the search path,
+      adding it again causes problems.
+    + 6.1.081: ":help CTRL-\_CTRL-N" doesn't work.
+    + 6.1.082: On MS-Windows the vimrc_example.vim script is sourced
+      and then mswin.vim. This enables using select mode, but since "p"
+      is mapped it doesn't replace the selection.
+    + 6.1.083: When $LANG is "sk" or "sk_sk", the Slovak menu file
+      isn't found.
+    + 6.1.084: "include" and "lib" are mixed up when checking the
+      directories gcc already searches.
+    + 6.1.085: When using CTRL-O CTRL-\ CTRL-N from Insert mode, the
+      displayed mode "
+    + 6.1.086: The guifg color for CursorIM doesn't take effect.
+    + 6.1.087: A thesaurus with Japanese characters has problems with
+      characters in different word classes.
+    + 6.1.088: Win32: no debugging info is generated. Tags file excludes
+      .cpp files.
+    + 6.1.089: On BSDI systems there is no ss_sp field in stack_t.
+    + 6.1.090: CTRL-F gets stuck when 'scrolloff' is non-zero and there
+      is a mix of long wrapping lines and a non-wrapping line.
+    + 6.1.091: GTK: Can't change preeditstate without setting
+      'imactivatekey'.
+    + 6.1.092: ":mapclear <buffer>" doesn't work.
+    + 6.1.093: Mac and MS-Windows GUI: when scrolling while ":s" is
+      working the results can be messed up, because the cursor is moved.
+    + 6.1.094: Cygwin: Passing a file name that has backslashes isn't
+      handled very well.
+    + 6.1.095: When using signs can free an item on the stack. Overruling
+      sign colors doesn't work.
+    + 6.1.096: When erasing the right halve of a double-byte character,
+      it may cause further characters to be erased.
+    + 6.1.097: When 'scrolloff' is set to a huge value, CTRL-F at the
+      end of the file scrolls one line.
+    + 6.1.098: MS-Windows: When the xxd program is under "c:\program files"
+      the "Convert to Hex" menu doesn't work.
+    + 6.1.099: Memory corrupted when closing a fold with more than
+      99999 lines.
+    + 6.1.100: Win32: VC5 and earlier don't support the /mapinfo option.
+    + 6.1.101: After using ":options" the tabstop of a new window is
+      15. Entry in ":options" window for 'autowriteall' is wrong. (Antoine
+      J Mechelynck) Can't insert a space in an option value.
+    + 6.1.102: Unprintable and multi-byte characters in a statusline item
+      are not truncated correctly.
+    + 6.1.103: A function returning from a while loop, with 'verbose'
+      set to 12 or higher, doesn't mention the return value. A function
+      with the 'abort' attribute may return -1 while the verbose message
+      says something else.
+    + 6.1.104: GCC 3.1 appears to have an optimizer problem that makes
+      test 3 crash.
+    + 6.1.105: Win32: The default for 'shellpipe' doesn't redirect
+      stderr. (Dion Nicolaas)
+    + 6.1.106: The maze program crashes.
+    + 6.1.107: When 'list' is set the current line in the error window
+      may be displayed wrong.
+    + 6.1.108: When interrupting a filter command such as "!!sleep 20"
+      the file becomes read-only.
+    + 6.1.109: When 'eadirection' is "hor", using CTRL-W = doesn't equalize
+      the window heights.
+    + 6.1.110: When using ":badd file" when "file" is already present
+      but not listed, it stays unlisted.
+    + 6.1.111: It's not possible to detect using the Unix sources on
+      Win32 or Mac.
+    + 6.1.112: When using ":argdo", ":bufdo" or ":windo", CTRL-O doesn't
+      go to the cursor position from before this command but every position
+      where the argument was executed.
+    + 6.1.113: ":bufdo bwipe" only wipes out half the buffers.
+    + 6.1.114: ":python import vim", ":python vim.current.buffer[0:0] =
+      []" gives a lalloc
+    + 6.1.115: "das" on the white space at the end of a paragraph does
+      not delete the "." the sentence ends with.
+    + 6.1.116: When 'endofline' is changed while 'binary' is set a file
+      should be considered modified.
+    + 6.1.117: Small problem with editing a file over ftp: and with Cygwin.
+    + 6.1.118: When a file in diff mode is reloaded because it changed
+      outside of Vim, other windows in diff mode are not always updated.
+    + 6.1.119: With the Sniff interface, using Sniff 4.0.X on HP-UX,
+      there may be a crash when connecting to Sniff.
+    + 6.1.120: When 'scrolloff' is non-zero and there are folds, CTRL-F
+      at the end of the file scrolls part of a closed fold.
+    + 6.1.121: When starting Select mode from Insert mode, then using
+      the Paste menu entry, the cursor is left before the laste pasted
+      character.
+    + 6.1.122: ":file name" creates a new buffer to hold the old buffer
+      name, which becomes the alternate file. This buffer is unexpectedly
+      listed.
+    + 6.1.123: A ":match" command with more than one argument doesn't
+      report an error.
+    + 6.1.124: When trying to exit and there is a hidden buffer that had
+      'eol' off and 'bin' set exiting isn't possible.
+    + 6.1.125: Explorer plugin asks for saving a modified buffer even
+      when it's open in another window as well.
+    + 6.1.126: Adding the choices in the syntax menu is consuming much
+      of the startup time of the GUI while it's not often used.
+    + 6.1.127: When using "--remote file" and the server has 'insertmode'
+      set, commands are inserted instead of being executed.
+    + 6.1.128: The expression "input('very long prompt')" puts the cursor
+      in the wrong line (column is OK).
+    + 6.1.129: On Solaris editing "file/" and then "file" results in
+      using the same buffer.
+    + 6.1.130: The documentation for some of the 'errorformat' items
+      is unclear.
+    + 6.1.131: X11 GUI: when expanding a CSI byte in the input stream to
+      K_CSI, the CSI byte itself isn't copied.
+    + 6.1.132: Executing a register in Ex mode may cause commands to
+      be skipped.
+    + 6.1.133: When drawing double-wide characters in the statusline,
+      may clear half of a character.
+    + 6.1.134: An error for a trailing argument of ":match" should not
+      be given after ":if 0".
+    + 6.1.135: Passing a command to the shell that includes a newline
+      always has a backslash before the newline.
+    + 6.1.136: When $TERM is "linux" the default for 'background' is
+      "dark", even though the GUI uses a light background.
+    + 6.1.137: Converting to HTML has a clumsy way of dealing with tabs
+      which may change the highlighting.
+    + 6.1.138: Adding extra items to the Syntax menu can't be done when
+      the "Show individual choices" menu is used.
+    + 6.1.139: Cygwin: PATH_MAX is not defined.
+    + 6.1.140: Cygwin: ":args `ls *.c`" does not work if the shell command
+      produces CR NL line separators.
+    + 6.1.141: ":wincmd gx" may cause problems when mixed with other
+      commands. ":wincmd c" doesn't close the window immediately.
+    + 6.1.142: Defining paragraphs without a separating blank line isn't
+      possible. Paragraphs can't be formatted automatically.
+    + 6.1.143: Auto formatting near the end of the file moves the cursor
+      to a wrong position. In Insert mode some lines are made one char
+      too narrow. When deleting a line undo might not always work properly.
+    + 6.1.144: Obtaining the size of a line in screen characters can be
+      wrong. A pointer may wrap around zero.
+    + 6.1.145: GTK: Drag&drop with more than 3 files may cause a
+      crash. (Mickael Marchand)
+    + 6.1.146: MS-Windows: When $HOME is constructed from $HOMEDRIVE and
+      $HOMEPATH, it is not used for storing the _viminfo file. (Normal
+      Diamond)
+    + 6.1.147: MS-Windows: When a dialog has no default button, pressing
+      Enter ends it anyway and all buttons are selected.
+    + 6.1.148: MS-Windows: ACL is not properly supported.
+    + 6.1.149: MS-Windows: Can't use diff mode from the file explorer.
+    + 6.1.150: OS/2, MS-Windows and MS-DOS: When 'shellslash' is set
+      getcwd() still uses backslash.
+    + 6.1.151: Win32: The NTFS substream isn't copied.
+    + 6.1.152: When $LANG is iso8859-1 translated menus are not used.
+
+ -- Wichert Akkerman <wakkerma@debian.org>  Tue, 13 Aug 2002 10:54:13 +0200
+
+vim (6.1.048-1) unstable; urgency=low
+
+  * Bump Standards-Version. Closes: Bug#145062
+  * Sync cscope support and dependencies. Closes: Bug#143205
+  * Apply upstream patches:
+    + 6.1.019: Win32: File name is messed up when editing just a drive
+      name.
+    + 6.1.020: col("'>") returns a huge number after using Visual line
+      mode.
+    + 6.1.021: Vim crashes when using a huge number for the minwid value
+      in a statusline.
+    + 6.1.022: Grabbing the status line above the command-line window
+      works like the bottom status line was grabbed.
+    + 6.1.023: VMS: running tests doesn't work properly.
+    + 6.1.024: When header files use a new syntax for declaring functions,
+      Vim can't figure out missing prototypes properly.
+    + 6.1.025: Five messages for "vim --help" don't start with a
+      capital.
+    + 6.1.026: *.patch files are not recognized as diff files. In a script
+      a "VAR=val" argument after "env" isn't ignored. PHP scripts are
+      not recognized.
+    + 6.1.027: When 'foldcolumn' is non-zero, a special character
+      that wraps to the next line disturbs the foldcolumn
+      highlighting.
+    + 6.1.028: Client-server: When a --remote-expr fails, Vim still exits
+      with status zero.
+    + 6.1.029: When 'encoding' is an 8-bit encoding other than "latin1",
+      editing a utf-8 or other Unicode file uses the wrong conversion. (Jan
+      Fedak)
+    + 6.1.030: When CTRL-N is mapped in Insert mode, it is also mapped
+      after CTRL-X CTRL-N, while it is not mapped after CTRL-X CTRL-F.
+    + 6.1.031: Cygwin: Xxd could read a file in text mode intead of
+      binary mode.
+    + 6.1.032: Can't specify a quickfix file without jumping to the
+      first error.
+    + 6.1.033: GUI: When the selection is lost and the Visual highlighting
+      is changed to underlining, the cursor is left in a different
+      position.
+    + 6.1.034: A CVS diff file isn't recognized as diff filetype.
+    + 6.1.035: Win32: Outputting Hebrew or Arabic text might have a
+      problem with reversing on MS-Windows 95/98/ME.
+    + 6.1.036: This command may cause a crash: ":v/./,//-j".
+    + 6.1.037: When 'lazyredraw' is set, pressing "q" at the hit-enter
+      prompt causes an incomplete redraw and the cursor isn't positioned.
+    + 6.1.038: Multi-byte: When a ":s" command contains a multi-byte
+      character where the trail byte is '~' the text is messed up.
+    + 6.1.039: When folds are defined and the file is changed outside
+      of Vim, reloading the file doesn't update the folds. (Anders
+      Schack-Nielsen)
+    + 6.1.040: When changing directory for expanding a file name fails
+      there is no error message.
+    + 6.1.041: ":mkvimrc" doesn't handle a mapping that has a leading
+      space in the rhs.
+    + 6.1.042: "vim -r" doesn't show all matches when 'wildignore'
+      removes swap files.
+    + 6.1.043: After patch 6.1.040 a few warnings are produced.
+    + 6.1.044: GUI: When using the find/replace dialog with text that
+      contains a slash, an invalid substitute command is generated. On
+      Win32 a find doesn't work when 'insertmode' is set.
+    + 6.1.045: In Visual mode, with lots of folds and 'scrolloff' set
+      to 999, moving the cursor down near the end of the file causes the
+      text to jump up and down.
+    + 6.1.046: X11 GUI: ":set lsp=2 gcr=n-v-i:hor1-blinkon0" draws a
+      black rectangle. ":set lsp=2 gcr=n-v-i:hor10-blinkon0" makes the
+      cursor disappear.
+    + 6.1.047: When skipping commands after an error was encountered,
+      expressions for ":if", ";elseif" and ":while" are still evaluated.
+    + 6.1.048: Unicode 3.2 changes were missing a few Hangul Jamo
+      characters.
+
+ -- Wichert Akkerman <wakkerma@debian.org>  Sat,  4 May 2002 17:57:01 +0200
+
+vim (6.1.018-1) unstable; urgency=low
+
+  * Apply upstream patches:
+    + 6.1.012: A system() call might fail if fread() does CR-LF to LF
+      translation.
+    + 6.1.013: Win32: The default for 'printexpr' doesn't work when there
+      are special characters in 'printdevice'.
+    + 6.1.014: An operator like "r" used in Visual block mode doesn't use
+      'virtualedit' when it's set to "block".
+    + 6.1.015: After patch 6.1.014 can't compile with tiny
+      features.
+    + 6.1.016: Win32: Outputting Hebrew or Arabic text might have a
+      problem with reversing.
+    + 6.1.017: Cygwin: After patch 6.1.012 Still doesn't do binary
+      file I/O.
+    + 6.1.018: Error message when using cterm highlighting. Closes: Bug#142663
+
+ -- Wichert Akkerman <wakkerma@debian.org>  Sun, 14 Apr 2002 20:38:53 +0200
+
+vim (6.1.011-1) unstable; urgency=low
+
+  * Enable langmap and keymap in all builds. Closes: Bug#141127
+  * Apply upstream patches:
+    + 6.1.001: When formatting UTF-8 text it might be wrapped at a space
+      that is followed by a composing character. Also correct a display
+      error for removing a composing char on top of a space.
+    + 6.1.002: Win32: after a ":popup" command the mouse pointer stays
+      hidden.
+    + 6.1.003: When 'laststatus' is zero and there is a vertical split, the
+      vertical separator is drawn in the command line.
+    + 6.1.004: Unicode 3.2 changes width and composing of a few characters.
+    + 6.1.005: When using more than 50 items in 'statusline' Vim might
+      crash.
+    + 6.1.006: When using "P" in Visual mode to put linewise selected text,
+      the wrong text is deleted.
+    + 6.1.007: Using ":filetype plugin off" when filetype plugins were
+      never enabled causes an error message.
+    + 6.1.008: The "%" command doesn't ignore \" inside a string, it's
+      seen as the end of the string.
+    + 6.1.009: Vim crashes when using a huge number for the maxwid value
+      in a statusline.
+    + 6.1.010: Searching backwards for a question mark with "?\?" doesn't
+      work. Same problem in ":s?\??" and ":g?\??".
+    + 6.1.011: XIM: doesn't work correctly when 'number' is set. Also,
+      a focus problem when selecting candidates.
+
+ -- Wichert Akkerman <wakkerma@debian.org>  Thu,  4 Apr 2002 14:49:27 +0200
+
+vim (6.1.000-2) unstable; urgency=low
+
+  * Fix version number
+  * Update copyright the uganda.txt version. Closes: Bug#139780
+
+ -- Wichert Akkerman <wakkerma@debian.org>  Mon, 25 Mar 2002 13:42:03 +0100
+
+vim (6.1.-1) unstable; urgency=low
+
+  * Small fixes to default vimrc
+  * New upstream version.
+    + includes 6.1b.033: When using a count after a ":s" command may get
+      ml_get errors. Closes: Bug#139403
+
+ -- Wichert Akkerman <wakkerma@debian.org>  Sun, 24 Mar 2002 18:24:35 +0100
+
+vim (6.0.270-1) unstable; urgency=low
+
+  * Switch to copyright from vim 6.1BETA which is fully GPL compatible
+  * More upstream patches:
+    + 6.0.227: The RISC OS port has several problems.
+    + 6.0.228: After putting text in Visual mode the '] mark is not at
+      the end of the put text. Undo doesn't work properly when putting
+      a word into a Visual selection that spans more than one line.
+    + 6.0.229: Multi-byte: With 'm' in 'formatoptions', formatting
+      doesn't break at a multi-byte char followed by an ASCII char,
+      and the other way around. When joining lines a space is inserted
+      between multi-byte characters, which is not always wanted.
+    + 6.0.230: The ":" used as a motion after an operator is exclusive,
+      but sometimes it should be inclusive.
+    + 6.0.231: "gd" and "gD" don't work when the variable matches in a
+      comment just above the match to be found.
+    + 6.0.232: "vim --version" prints on stderr while "vim --help" prints
+      on stdout.
+    + 6.0.233: "\1\{,8}" in a regexp is not allowed, but it should work,
+      because there is an upper limit.
+    + 6.0.234: It's not easy to set the cursor position without modifying
+      marks.
+    + 6.0.235: When writing a file and renaming the original file to make
+      the backup, permissions could change when setting the owner.
+    + 6.0.236: ":edit" without argument should move cursor to line 1 in
+      Vi compatible mode.
+    + 6.0.237: In a C file, using the filetype plugin, re-indenting a
+      comment with two spaces after the middle "*" doesn't align properly.
+    + 6.0.238: Using a ":subsitute" command with a substitute() call in
+      the substitution expression causes errors.
+    + 6.0.239: Using "A" to append after a Visually selected block which
+      is after the end of the line, spaces are inserted in the wrong line
+      and other unexpected effects.
+    + 6.0.240: Win32: building with Python 2.2 doesn't work.
+    + 6.0.241: Win32: Expanding the old value of an option that is a path
+      that starts with a backslash, an extra backslash is inserted.
+    + 6.0.242: GUI: On a system with an Exceed X server sometimes get a
+      "Bad Window" error.
+    + 6.0.243: Unix: "vim --version" outputs a NL before the last line
+      instead of after it.
+    + 6.0.244: Multi-byte: Problems with (illegal) UTF-8 characters in
+      menu and file name (e.g., icon text, status line).
+    + 6.0.245: After using a color scheme, setting the 'background'
+      option might not work.
+    + 6.0.246: ":echomsg" didn't use the highlighting set by
+      ":echohl". (Gary Holloway)
+    + 6.0.247: GTK GUI: Can't use gvim in a kpart widget.
+    + 6.0.248: When using compressed help files and 'encoding' isn't
+      "latin1", Vim converts the help file before decompressing.
+    + 6.0.249: "vim -t edit -c 'sta ex_help'" doesn't move cursor to
+      edit().
+    + 6.0.250: Macintosh: Various problems when compiling.
+    + 6.0.251: Macintosh: menu shortcuts are not very clear.
+    + 6.0.252: When a user function was defined with "abort", an error that
+      is not inside if/endif or while/endwhile doesn't abort the function.
+    + 6.0.253: When 'insertmode' is set, after "<C-O>:edit file" the next
+      <C-O> doesn't work. (Benji Fisher) <C-L> has the same problem.
+    + 6.0.254: Borland C++ 5.5: Checking for stack overflow doesn't work
+      correctly. Matters when using a complicated regexp.
+    + 6.0.255: Win32: ACL support doesn't work well on Samba drives.
+    + 6.0.256: Win32: ":highlight Comment guifg=asdf" does not give an
+      error message. (Randall W. Morris) Also for other systems.
+    + 6.0.257: Win32: When 'mousefocus' is set and there is a BufRead
+      autocommand, after the dialog for permissions changed outside of Vim:
+      'mousefocus' stops working.
+    + 6.0.258: When 'scrolloff' is 999 and there are folds, the text
+      can jump up and down when moving the cursor down near the end of
+      the file.
+    + 6.0.259: MS-DOS: after editing the command line the cursor shape
+      may remain like in Insert mode.
+    + 6.0.260: GUI: May crash while starting up when giving an error
+      message for missing color.
+    + 6.0.261: nr2char() and char2nr() don't work with multi-byte
+      characters.
+    + 6.0.262: Win32: IME doesn't work properly. OnImeComposition()
+      isn't used at all.
+    + 6.0.263: GTK: When a dialog is closed by the window manager,
+      Vim hangs.
+    + 6.0.264: The amount of virtual memory is used to initialize
+      'maxmemtot', which may be much more than the amount of physical
+      memory, resulting in a lot of swapping.
+    + 6.0.265: Win32: Using backspace while 'fkmap' is set causes a crash.
+    + 6.0.266: The rename() function deletes the file if the old and the
+      new name are the same.
+    + 6.0.267: UTF-8: Although 'isprint' says a character is printable,
+      utf_char2cells() still considers it unprintable.
+    + 6.0.268: Win32: ACL check crashes when using forward slash in
+      file name.
+    + 6.0.269: Unprintable characters in a file name may cause problems
+      when using the 'statusline' option or when 'buftype' is "nofile".
+    + 6.0.270: A tab causes UTF-8 text to be displayed in the wrong
+      position.
+
+ -- Wichert Akkerman <wakkerma@debian.org>  Sun, 24 Feb 2002 23:16:17 +0100
+
+vim (6.0.226-1) unstable; urgency=medium
+
+  * Don't abort if update-alternatives reports an error
+  * More upstream patches:
+    + 6.0.223: When splitting a window that contains the explorer, hitting CR
+      on a file name gives error messages.
+    + 6.0.224: When 'sidescroll' and 'sidescrolloff' are set in a narrow
+      window the text may jump left-right and the cursor is displayed in the
+      wrong position.
+    + 6.0.225: In Visual mode "gk" gets stuck in a closed fold. /
+    + 6.0.226: When doing ":recover file" get the ATTENTION prompt. After
+      recovering the same file five times get a read error or a crash.
+
+ -- Wichert Akkerman <wakkerma@debian.org>  Sun, 17 Feb 2002 15:08:03 +0100
+
+vim (6.0.222-1) unstable; urgency=low
+
+  * Do not Build-Depend on libgpmg1-dev for hurd-i386. Closes: Bug#117313
+  * chown a file before we chmod it so we don't lose s[ug]id bits
+  * Set compiled-by flag in configure
+  * More upstream patches:
+    + 6.0.202: The "icon=" argument for the menu command to define a toolbar
+      icon with a file didn't work for GTK. For Motif and Athena a full path
+      was required.
+    + 6.0.203: Can change 'fileformat' even though 'modifiable is off.
+    + 6.0.204: ":unlet" doesn't work for variables with curly braces.
+    + 6.0.205: "gvim -f" still forks when using the batch script to start Vim.
+    + 6.0.206: Unix: if expanding a wildcard in a file name results in a
+      wildcard character and there are more parts in the path with a wildcard,
+      it is expanded again. Windows: ":edit \[abc]" could never edit the file
+      "[abc]".
+    + 6.0.207: Win32: The shortcuts and start menu entries let Vim startup in
+      the desktop directory, which is not very useful.
+    + 6.0.208: GUI: When using a keymap and the cursor is not blinking, CTRL-^
+      in Insert mode doesn't directly change the cursor color.
+    + 6.0.209: GUI GTK: After selecting a 'guifont' with the font dialog there
+      are redraw problems for multi-byte characters.
+    + 6.0.210: After patch 6.0.167 it's no longer possible to edit a help file
+      in another encoding than latin1.
+    + 6.0.211: When reading a file fails, the buffer is empty, but it might
+      still be possible to write it with ":w" later. The original file is lost
+      then.
+    + 6.0.212: GUI GTK: confirm("foo", "") causes a crash.
+    + 6.0.213: When a file name contains unprintable characters, CTRL-G and
+      other commands don't work well.
+    + 6.0.214: When there is a buffer without a name, empty entries appear in
+      the jumplist saved in the viminfo file.
+    + 6.0.215: After using "/" from Visual mode the Paste menu and Toolbar
+      entries don't work. Pasting with the middle mouse doesn't work and
+      modeless selection doesn't work.
+    + 6.0.216: After reloading a file, displayed in another window than the
+      current one, which was changed outside of Vim the part of the file around
+      the cursor set by autocommands may be displayed, but jumping back to the
+      original cursor position when entering the window again.
+    + 6.0.217: When getting help from a help file that was used before, an
+      empty unlisted buffer remains in the buffer list.
+    + 6.0.218: With explorer plugin: "vim -o filename dirname" doesn't load the
+      explorer window until entering the window.
+    + 6.0.219: ":setlocal" and ":setglobal", without arguments, display
+      terminal options.
+    + 6.0.220: After patch 6.0.218 get a beep on startup.
+    + 6.0.221: When using ":bdel" and all other buffers are unloaded the lowest
+      numbered buffer is jumped to instead of the most recent one.
+    + 6.0.222: When 'virtualedit' is set and using autoindent, pressing Esc
+      after starting a new line leaves behind part of the autoindent.
+
+ -- Wichert Akkerman <wakkerma@debian.org>  Sat, 16 Feb 2002 00:15:24 +0100
+
+vim (6.0.201-1) unstable; urgency=low
+
+  * More upstream patches:
+    + 6.0.157: When defining a user command with "-complete=dir" files will
+      also be expanded. Also, "-complete=mapping" doesn't appear to work.
+    + 6.0.158: When getting the warning for a file being changed outside of Vim
+      and reloading the file, the 'readonly' option is reset, even when the
+      permissions didn't change.
+    + 6.0.159: Wildcard expansion for ":emenu" also shows separators.
+    + 6.0.160: When compiling with GCC 3.0.2 and using the "-O2" argument, the
+      optimizer causes a problem that makes Vim crash.
+    + 6.0.161: Win32: Bitmaps don't work with signs.
+    + 6.0.162: Client-server: An error message for a wrong expression appears
+      in the server instead of the cient.
+    + 6.0.163: When using a GUI dialog, a file name is sometimes used like it
+      was a directory.
+    + 6.0.164: After patch 6.0.135 the menu entries for pasting don't work in
+      Insert and Visual mode.
+    + 6.0.165: Using --remote and executing locally gives unavoidable error
+      messages.
+    + 6.0.166: GUI: There is no way to avoid dialogs to pop up.
+    + 6.0.167: When 'fileencodings' is "latin2" some characters in the help
+      files are displayed wrong.
+    + 6.0.168: ":%s/\n/#/" doesn't replace at an empty line.
+    + 6.0.169: When run as evim and the GUI can't be started we get stuck in a
+      terminal without menus in Insert mode.
+    + 6.0.170: When printing double-width characters the size of tabs after
+      them is wrong.
+    + 6.0.171: With 'keymodel' including "startsel", in Insert mode after the
+      end of a line, shift-Left does not move the cursor.
+    + 6.0.172: CTRL-Q doesn't replace CTRL-V after CTRL-X in Insert mode while
+      it does in most other situations.
+    + 6.0.173: When using "P" to insert a line break the cursor remains past
+      the end of the line.
+    + 6.0.174: After using "gd" or "gD" the search direction for "n" may still
+      be backwards.
+    + 6.0.175: ":help /\z(\)" doesn't work
+    + 6.0.176: When killed by a signal autocommands are still triggered as if
+      nothing happened.
+    + 6.0.177: When 'commentstring' is empty and 'foldmethod' is "marker", "zf"
+      doesn't work.
+    + 6.0.178: Uninitialized memory read from xp_backslash field.
+    + 6.0.179: Win32: When displaying UTF-8 characters may read uninitialized
+      memory.
+    + 6.0.180: Expanding environment variables in a string that ends in a
+      backslash could go past the end of the string.
+    + 6.0.181: When using ":cd dir" memory was leaked.
+    + 6.0.182: When using a regexp on multi-byte characters, could try to read
+      a character before the start of the line.
+    + 6.0.183: Leaking memory when ":func!" redefines a function.
+    + 6.0.184: Leaking memory when expanding option values.
+    + 6.0.185: Crash in Vim when pasting a selection in another application, on
+      a 64 bit machine.
+    + 6.0.186: X11: Three warnings when compiling the client-server code.
+    + 6.0.187: "I" in Visual mode and then "u" reports too many changes. "I" in
+      Visual linewise mode adjusts the indent for no apparent reason.
+    + 6.0.188: After patch 6.0.161 signs defined in the vimrc file don't work.
+    + 6.0.189: The size of the Visual area isn't always displayed when
+      scrolling ('ruler' off, 'showcmd' on). Also not when using a search
+      command.
+    + 6.0.190: GUI: when 'mouse' is empty a click with the middle button still
+      moves the cursor.
+    + 6.0.191: When no servers are available serverlist() gives an error
+      instead of returning an empty string.
+    + 6.0.192: When 'virtualedit' is set, "ylj" goes to the wrong column.
+    + 6.0.193: When 'virtualedit' is set, col(".") after the end of the line
+      should return one extra.
+    + 6.0.194: "--remote-silent" tries to send a reply to the client, like it
+      was "--remote-wait".
+    + 6.0.195: When 'virtualedit' is set and a search starts in virtual space
+      ":call search
+    + 6.0.196: When 'virtualedit' is set, 'selection' is "exclusive" and
+      visually selecting part of a tab at the start of a line, "x" joins it
+      with the previous line. Also, when the selection spans more than one line
+      the whole tab is deleted.
+    + 6.0.197: When 'virtualedit' is set and 'selection' is "exclusive", "v$x"
+      doesn't delete the last character in the line.
+    + 6.0.198: When 'virtualedit' is set and 'showbreak' is not empty, moving
+      the cursor over the line break doesn't work properly.
+    + 6.0.199: Multi-byte: could use iconv() after calling iconv_end().
+    + 6.0.200: A script that starts with "#!perl" isn't recognized as a Perl
+      filetype.
+    + 6.0.201: When scrollbinding and doing a long jump, switching windows
+      jumps to another position in the file.  Scrolling a few lines at a time
+      is OK.
+
+ -- Wichert Akkerman <wakkerma@debian.org>  Thu,  7 Feb 2002 22:14:09 +0100
+
+vim (6.0.156-1) unstable; urgency=low
+
+  * Fix typo in comment in vimrc. Closes: Bug#129815
+  * More upstream patches:
+    + 6.0.119: VMS: filewritable() doesn't work properly.
+    + 6.0.120: The conversion to html isn't compatible with XHTML.
+    + 6.0.121: Win32: After patch 6.0.116 Vim doesn't compile with mingw32.
+    + 6.0.122: Win16: Same resize problems as patch 6.0.117 fixed for
+      Win32. And dialog textfield problem from patch 6.0.115.
+    + 6.0.123: Win16: Compilation problems.
+    + 6.0.124: When using a ":substitute" command that starts with "\="
+      (evaluated as an expression), "~" was still replaced with the
+      previous substitute string.
+    + 6.0.125: Win32: When using the multi_byte_ime feature pressing the
+      shift key would be handled as if a character was entered, thus
+      mappings with a shifted key didn't work.
+    + 6.0.126: The python library was always statically linked.
+    + 6.0.127: When using a terminal that swaps screens and the Normal
+      background color has a different background, using an external
+      command may cause the color of the wrong screen to be changed.
+    + 6.0.128: When moving a vertically split window to the far left or
+      right, the scrollbars are not adjusted. (Scott E Lee) When
+      'mousefocus' is set the mouse pointer wasn't adjusted.
+    + 6.0.129: When using a very long file name, ":ls" (repeated a few
+      times) causes a crash. Test with "vim `perl -e 'print "A"x1000'`".
+    + 6.0.130: When using ":cprev" while the error window is open, and the
+      new line at the top wraps, the window isn't correctly drawn.
+    + 6.0.131: When using bufname() and there are two matches for listed
+      buffers and one match for an unlisted buffer, the unlisted buffer is
+      used.
+    + 6.0.132: When setting 'iminsert' in the vimrc and using an xterm with
+      two screens the ruler is drawn in the wrong screen.
+    + 6.0.133: When opening another buffer while 'keymap' is set and
+      'iminsert' is zero, 'iminsert' is set to one unexpectedly.
+    + 6.0.134: When completing ":set tags=" a path with an embedded space
+      causes the completion to stop.
+    + 6.0.135: Menus that are not supposed to do anything used "<Nul>",
+      which still produced an error beep. When CTRL-O is mapped for Insert
+      mode, ":amenu" commands didn't work in Insert mode. Menu language
+      falls back to English when $LANG ends in "@euro".
+    + 6.0.136: When completing in Insert mode, a mapping could be
+      unexpectedly applied.
+    + 6.0.137: GUI: When using the find or find/replace dialog from Insert
+      mode, the input mode is stopped.
+    + 6.0.138: GUI: When using the find or find/replace dialog from Insert
+      mode, the text is inserted when CTRL-O is mapped. When opening the
+      dialog again, a whole word search isn't recognized. When doing
+      "replace all" a whole word search was never done.
+    + 6.0.139: When stopping 'wildmenu' completion, the statusline of the
+      bottom-left vertically split window isn't redrawn.
+    + 6.0.140: Memory allocated for local mappings and abbreviations is
+      leaked when the buffer is wiped out.
+    + 6.0.141: When using ":enew" in an empty buffer, some buffer-local
+      things are not cleared. b:keymap_name is not set.
+    + 6.0.142: When Python is linked statically, loading dynamic extensions
+      might fail.
+    + 6.0.143: When a syntax item includes a line break in a pattern, the
+      syntax may not be updated properly when making a change.
+    + 6.0.144: After patch 6.0.088 redoing "veU" doesn't work.
+    + 6.0.145: When Vim can't read any input it might get stuck. When
+      redirecting stdin and stderr Vim would not read commands from a file.
+    + 6.0.146: When 'statusline' contains "%{'-'}" this results in a zero.
+    + 6.0.147: It's not easy to mark a Vim version as being modified. The
+      new license requires this.
+    + 6.0.148: After "p" in an empty line, `[ goes to the second character.
+    + 6.0.149: The pattern "\(.\{-}\)*" causes a hang. When using a search
+      pattern that causes a stack overflow to be detected Vim could still
+      hang.
+    + 6.0.150: When using a multi-byte encoding, patch 6.0.148 causes "p"
+      to work like "P".
+    + 6.0.151: Redrawing the status line and ruler can be wrong when it
+      contains multi-byte characters.
+    + 6.0.152: strtrans() could hang on an illegal UTF-8 byte sequence.
+    + 6.0.153: When using (illegal) double-byte characters and Vim syntax
+      highlighting Vim can crash.
+    + 6.0.154: MS-DOS and MS-Windows: The menu entries for xxd don't work
+      when there is no xxd in the path