updated for version 7.0007
diff --git a/runtime/doc/Makefile b/runtime/doc/Makefile
index a87565e..8da592c 100644
--- a/runtime/doc/Makefile
+++ b/runtime/doc/Makefile
@@ -71,6 +71,7 @@
 	pi_gzip.txt \
 	pi_netrw.txt \
 	pi_spec.txt \
+	print.txt \
 	quickfix.txt \
 	quickref.txt \
 	quotes.txt \
@@ -126,6 +127,7 @@
 	version4.txt \
 	version5.txt \
 	version6.txt \
+	version7.txt \
 	vi_diff.txt \
 	visual.txt \
 	windows.txt \
@@ -189,6 +191,7 @@
 	pi_gzip.html \
 	pi_netrw.html \
 	pi_spec.html \
+	print.html \
 	quickfix.html \
 	quickref.html \
 	quotes.html \
@@ -245,6 +248,7 @@
 	version4.html \
 	version5.html \
 	version6.html \
+	version7.html \
 	vi_diff.html \
 	visual.html \
 	windows.html \
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 45c0159..e51d372 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -928,6 +928,8 @@
 tempname()			String	name for a temporary file
 tolower( {expr})		String	the String {expr} switched to lowercase
 toupper( {expr})		String	the String {expr} switched to uppercase
+tr( {src}, {fromstr}, {tostr})	String	translate chars of {src} in {fromstr}
+					to chars in {tostr}
 type( {name})			Number	type of variable {name}
 virtcol( {expr})		Number	screen column of cursor or mark
 visualmode( [expr])		String	last visual mode used
@@ -2608,6 +2610,20 @@
 		characters turned into uppercase (just like applying |gU| to
 		the string).
 
+tr({src}, {fromstr}, {tostr})				*tr()*
+		The result is a copy of the {src} string with all characters
+		which appear in {fromstr} replaced by the character in that
+		position in the {tostr} string.  Thus the first character in
+		{fromstr} is translated into the first character in {tostr}
+		and so on.  Exactly like the unix "tr" command.
+		This code also deals with multibyte characters properly.
+
+		Examples: >
+			echo tr("hello there", "ht", "HT")
+<		returns "Hello THere" >
+			echo tr("<blob>", "<>", "{}")
+<		returns "{blob}"
+
 type({expr})						*type()*
 		The result is a Number:
 			0 if {expr} has the type Number
diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt
index 2807676..0e77179 100644
--- a/runtime/doc/help.txt
+++ b/runtime/doc/help.txt
@@ -129,6 +129,7 @@
 |fold.txt|	hide (fold) ranges of lines
 
 Special issues ~
+|print.txt|	printing
 |remote.txt|	using Vim as a server or client
 |term.txt|	using different terminals and mice
 |digraph.txt|	list of available digraphs
diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt
index a35ce54..fd94d32 100644
--- a/runtime/doc/indent.txt
+++ b/runtime/doc/indent.txt
@@ -1,4 +1,4 @@
-*indent.txt*    For Vim version 7.0aa.  Last change: 2004 Apr 25
+*indent.txt*    For Vim version 7.0aa.  Last change: 2004 Jul 07
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -425,8 +425,8 @@
 
 
 The defaults, spelled out in full, are:
-	cinoptions=>s,e0,n0,f0,{0,}0,^0,:s,=s,l0,gs,hs,ps,ts,+s,c3,C0,(2s,us,
-		   \U0,w0,m0,j0,)20,*30
+	cinoptions=>s,e0,n0,f0,{0,}0,^0,:s,=s,l0,b0,gs,hs,ps,ts,is,+s,c3,C0,
+		   /0,(2s,us,U0,w0,W0,m0,j0,)20,*30
 
 Vim puts a line in column 1 if:
 - It starts with '#' (preprocessor directives), if 'cinkeys' contains '#'.
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index 4262a76..42d4b7b 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -1,4 +1,4 @@
-*index.txt*     For Vim version 7.0aa.  Last change: 2004 Jul 04
+*index.txt*     For Vim version 7.0aa.  Last change: 2004 Jul 07
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1224,6 +1224,8 @@
 |:mkvimrc|	:mkv[imrc]	write current mappings and settings to a file
 |:mkview|	:mkvie[w]	write view of current window to a file
 |:mode|		:mod[e]		show or change the screen mode
+|:mzscheme|	:mz[scheme]	execute MzScheme command
+|:mzfile|	:mzf[ile]	execute MzScheme script file
 |:next|		:n[ext]		go to next file in the argument list
 |:new|		:new		create a new empty window
 |:nmap|		:nm[ap]		like ":map" but for Normal mode
diff --git a/runtime/doc/mbyte.txt b/runtime/doc/mbyte.txt
index 5766984..41723de 100644
--- a/runtime/doc/mbyte.txt
+++ b/runtime/doc/mbyte.txt
@@ -1,4 +1,4 @@
-*mbyte.txt*     For Vim version 7.0aa.  Last change: 2004 Jun 16
+*mbyte.txt*     For Vim version 7.0aa.  Last change: 2004 Jul 05
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar et al.
@@ -742,6 +742,8 @@
   Traditional and Simplified Chinese characters.  And it can accept other
   locale if you make a correct input table.  Xcin can be found at:
   http://xcin.linux.org.tw/
+  Others are scim: http://scim.freedesktop.org/ and fcitx:
+  http://www.fcitx.org/ 
 
 - Conversion Server
 							*conversion-server*
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index bf48cde..1a28bf1 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -4511,52 +4511,17 @@
 			{not in Vi}
 			{only available when compiled with the |+printer|
 			feature}
-	This defines the name of the printer to be used when the |:hardcopy|
-	command is issued with a bang (!) to skip the printer selection
-	dialog.  On Win32, it should be the printer name exactly as it appears
-	in the standard printer dialog.
-	If the option is empty, then vim will use the system default printer
-	for ":hardcopy!"
+	The name of the printer to be used for |:hardcopy|.
+	See |pdev-option|.
 
-					*'printencoding'* *'penc'* *E620*
-'printencoding' 'penc'	String	(default empty, except for:
-					Windows, OS/2: cp1252,
-					Macintosh: mac-roman,
-					VMS: dec-mcs,
-					HPUX: hp-roman8,
-					EBCDIC: ebcdic-uk)
+						*'printencoding'* *'penc'*
+'printencoding' 'penc'	String	(default empty, except for some systems)
 			global
 			{not in Vi}
 			{only available when compiled with the |+printer|
 			and |+postscript| features}
-	Sets the character encoding used when printing.  This option tells VIM
-	which print character encoding file from the "print" directory in
-	'runtimepath' to use.
-
-	This option will accept any value from |encoding-names|.  Any
-	recognized names are converted to VIM standard names - see 'encoding'
-	for more details.  Names not recognized by VIM will just be converted
-	to lower case and underscores replaced with '-' signs.
-
-	If 'printencoding' is empty or VIM cannot find the file then it will
-	use 'encoding' (if VIM is compiled with |+multi_byte| and it is set an
-	8-bit encoding) to find the print character encoding file.  If VIM is
-	unable to find a character encoding file then it will use the "latin1"
-	print character encoding file.
-
-	When 'encoding' is set to a multi-byte encoding, VIM will try to
-	convert characters to the printing encoding for printing (if
-	'printencoding' is empty then the conversion will be to latin1).
-	Conversion to a printing encoding other than latin1 will require VIM
-	to be compiled with the |+iconv| feature.  If no conversion is
-	possible then printing will fail.  Any characters that cannot be
-	converted will be replaced with upside down question marks.
-
-	Four print character encoding files are provided to support default
-	Mac, VMS, HPUX, and EBCDIC character encodings and are used by default
-	on these platforms.  Code page 1252 print character encoding is used
-	by default on Windows and OS/2 platforms.
-
+	Sets the character encoding used when printing.
+	See |penc-option|.
 
 						*'printexpr'* *'pexpr'*
 'printexpr' 'pexpr'	String	(default: see below)
@@ -4564,69 +4529,17 @@
 			{not in Vi}
 			{only available when compiled with the |+printer|
 			and |+postscript| features}
-	Expression that is evaluated to print the PostScript produced with
-	":hardcopy".
-	The file name to be printed is in |v:fname_in|.
-	The arguments to the ":hardcopy" command are in |v:cmdarg|.
-	The expression must take care of deleting the file after printing it.
-	When there is an error, the expression must return a non-zero number.
-	If there is no error, return zero or an empty string.
-	The default for non MS-Windows or VMS systems is to simply use "lpr"
-	to print the file: >
+	Expression used to print the PostScript produced with |:hardcopy|.
+	See |pexpr-option|.
 
-	    system('lpr' . (&printdevice == '' ? '' : ' -P' . &printdevice)
-		. ' ' . v:fname_in) . delete(v:fname_in) + v:shell_error
-<
-	On MS-Dos, MS-Windows and OS/2 machines the default is to copy the
-	file to the currently specified printdevice: >
-
-	    system('copy' . ' ' . v:fname_in . (&printdevice == ''
-			? ' LPT1:' : (' \"' . &printdevice . '\"')))
-			. delete(v:fname_in)
-<
-	On VMS machines the default is to send the file to either the default
-	or currently specified printdevice: >
-
-	    system('print' . (&printdevice == '' ? '' : ' /queue=' .
-			&printdevice) . ' ' . v:fname_in) . delete(v:fname_in)
-<
-	If you change this option, using a function is an easy way to avoid
-	having to escape all the spaces.  Example: >
-
-		:set printexpr=PrintFile(v:fname_in)
-		:function PrintFile(fname)
-		:  call system("ghostview " . a:fname)
-		:  call delete(a:fname)
-		:  return v:shell_error
-		:endfunc
-
-<	Be aware that some print programs return control before they have read
-	the file.  If you delete the file too soon it will not be printed.
-	These programs usually offer an option to have them remove the file
-	when printing is done.
-								*E365*
-	If evaluating the expression fails or it results in a non-zero number,
-	you get an error message.  In that case Vim will delete the
-	file.  In the default value for non-MS-Windows a trick is used: Adding
-	"v:shell_error" will result in a non-zero number when the system()
-	call fails.
-	This option cannot be set from a |modeline| or in the |sandbox|, for
-	security reasons.
-
-						*'printfont'* *'pfn'* *E613*
+						*'printfont'* *'pfn'*
 'printfont' 'pfn'	string	(default "courier")
 			global
 			{not in Vi}
 			{only available when compiled with the |+printer|
 			feature}
-	This is the name of the font that will be used for the |:hardcopy|
-	command's output.  It has the same format as the 'guifont' option,
-	except that only one font may be named, and the special "guifont=*"
-	syntax is not available.
-	In the Win32 GUI version this specifies a font name with its extra
-	attributes, as with the 'guifont' option.
-	For other systems, only ":h11" is recognized, where "11" is the point
-	size of the font.  When omitted, the point size is 10.
+	The name of the font that will be used for |:hardcopy|.
+	See |pfn-option|.
 
 						*'printheader'* *'pheader'*
 'printheader' 'pheader'  string  (default "%<%f%h%m%=Page %N")
@@ -4634,100 +4547,35 @@
 			{not in Vi}
 			{only available when compiled with the |+printer|
 			feature}
-	This defines the format of the header produced in |:hardcopy| output.
-	The option is defined in the same way as the 'statusline' option.
-	If Vim has not been compiled with the |+statusline| feature, this
-	option has no effect and a simple default header is used, which shows
-	the page number.
+	The format of the header produced in |:hardcopy| output.
+	See |pheader-option|.
+
+						*'printmbcharset'* *'pmbcs'*
+'printmbcharset' 'pmbcs'  string (default "")
+			global
+			{not in Vi}
+			{only available when compiled with the |+printer|
+			and |+multi_byte| features}
+	The CJK character set to be used for CJK output from |:hardcopy|.
+	See |pmbcs-option|.
+
+						*'printmbfont'* *'pmbfn'*
+'printmbfont' 'pmbfn'	string (default "")
+			global
+			{not in Vi}
+			{only available when compiled with the |+printer|
+			and |+multi_byte| features}
+	List of font names to be used for CJK output from |:hardcopy|.
+	See |pmbfn-option|.
 
 						*'printoptions'* *'popt'*
 'printoptions' 'popt' string (default "")
 			global
 			{not in Vi}
 			{only available when compiled with |+printer| feature}
-	This is a comma-separated list of items that control the format of
-	the output of |:hardcopy|:
+	List of items that control the format of the output of |:hardcopy|.
+	See |popt-option|.
 
-	  left:{spec}		left margin (default: 10pc)
-	  right:{spec}		right margin (default: 5pc)
-	  top:{spec}		top margin (default: 5pc)
-	  bottom:{spec}		bottom margin (default: 5pc)
-				{spec} is a number followed by "in" for
-				inches, "pt" for points (1 point is 1/72 of an
-				inch), "mm" for millimeters or "pc" for a
-				percentage of the media size.
-				Weird example:
-				    left:2in,top:30pt,right:16mm,bottom:3pc
-				If the unit is not recognized there is no
-				error and the default value is used.
-
-	  header:{nr}		Number of lines to reserve for the header.
-				Only the first line is actually filled, thus
-				when {nr} is 2 there is one empty line.  The
-				header is formatted according to
-				'printheader'.
-	  header:0		Do not print a header.
-	  header:2  (default)	Use two lines for the header
-
-	  syntax:n		Do not use syntax highlighting.  This is
-				faster and thus useful when printing large
-				files.
-	  syntax:y		Do syntax highlighting.
-	  syntax:a  (default)	Use syntax highlighting if the printer appears
-				to be able to print color or grey.
-
-	  number:y		Include line numbers in the printed output.
-	  number:n  (default)	No line numbers.
-
-	  wrap:y    (default)	Wrap long lines.
-	  wrap:n		Truncate long lines.
-
-	  duplex:off		Print on one side.
-	  duplex:long (default)	Print on both sides (when possible), bind on
-				long side.
-	  duplex:short		Print on both sides (when possible), bind on
-				short side.
-
-	  collate:y  (default)	Collating: 1 2 3, 1 2 3, 1 2 3
-	  collate:n		No collating: 1 1 1, 2 2 2, 3 3 3
-
-	  jobsplit:n (default)	Do all copies in one print job
-	  jobsplit:y		Do each copy as a separate print job.  Useful
-				when doing N-up postprocessing.
-
-	  portrait:y (default)	Orientation is portrait.
-	  portrait:n		Orientation is landscape.
-							*a4* *letter*
-	  paper:A4   (default)	Paper size: A4
-	  paper:{name}		Paper size from this table:
-				{name}	    size in cm	     size in inch ~
-				10x14	    25.4  x 35.57    10    x 14
-				A3	    29.7  x 42	     11.69 x 16.54
-				A4	    21	  x 29.7      8.27 x 11.69
-				A5	    14.8  x 21	      5.83 x  8.27
-				B4	    25	  x 35.3     10.12 x 14.33
-				B5	    17.6  x 25	      7.17 x 10.12
-				executive   18.42 x 26.67     7.25 x 10.5
-				folio	    21	  x 33	      8.27 x 13
-				ledger	    43.13 x 27.96    17    x 11
-				legal	    21.59 x 35.57     8.5  x 14
-				letter	    21.59 x 27.96     8.5  x 11
-				quarto	    21.59 x 27.5      8.5  x 10.83
-				statement   13.97 x 21.59     5.5  x  8.5
-				tabloid     27.96 x 43.13    11    x 17
-
-	  formfeed:n (default)	Treat form feed characters (0x0c) as a normal
-				print character.
-	  formfeed:y		When a form feed character is encountered,
-				continue printing of the current line at the
-				beginning of the first line on a new page.
-
-	The item indicated with (default) is used when the item is not
-	present.  The values are not always used, especially when using a
-	dialog to select the printer and options.
-	Example: >
-		:set printoptions=paper:letter,duplex:off
-<
 						*'quoteescape''* *'qe'*
 'quoteescape' 'qe'	string	(default "\")
 			local to buffer
diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt
index 5e28ed6..8bbdb02 100644
--- a/runtime/doc/pi_netrw.txt
+++ b/runtime/doc/pi_netrw.txt
@@ -17,20 +17,6 @@
 5.  Ex Commands.........................................|netrw-ex|
 6.  Variables and Options...............................|netrw-var|
 7.  Remote Directory Browser............................|netrw-browse|
-     ?..........Help....................................|netrw-help|
-     <cr>.......Browsing................................|netrw-cr|
-     <c-l>......Refreshing the Listing..................|netrw-c-l|
-     <del>......Removing Files or Directories...........|netrw-delete|
-     D..........Removing Files or Directories...........|netrw-D|
-     R..........Renaming Files or Directories...........|netrw-R|
-     -..........Going Up................................|netrw--|
-     a..........Hiding Files or Directories.............|netrw-a|
-     h..........Edit File/Directory Hiding..............|netrw-h|
-     o..........Browsing with a Horizontal Split........|netrw-o|
-     r..........Reversing Sorting Order.................|netrw-r|
-     s..........Selecting Sorting Style.................|netrw-s|
-     v..........Browsing with a Vertical Split..........|netrw-v|
-     x..........Customizing Browsing....................|netrw-x|
 8.  Debugging...........................................|netrw-debug|
 9.  History.............................................|netrw-history|
 10. Credits.............................................|netrw-credits|
@@ -514,7 +500,26 @@
 
 ==============================================================================
 7. Remote Directory Browser *netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
+     ?..........Help....................................|netrw-help|
+     <cr>.......Browsing................................|netrw-cr|
+     <c-l>......Refreshing the Listing..................|netrw-c-l|
+     <del>......Removing Files or Directories...........|netrw-delete|
+     D..........Removing Files or Directories...........|netrw-D|
+     \H.........Edit File/Directory Hiding List.........|netrw-H|
+     \M.........Make A New Directory....................|netrw-M|
+     R..........Renaming Files or Directories...........|netrw-R|
+     -..........Going Up................................|netrw--|
+     a..........Hiding Files or Directories.............|netrw-a|
+     i..........Long Listing............................|netrw-i|
+     o..........Browsing with a Horizontal Split........|netrw-o|
+     r..........Reversing Sorting Order.................|netrw-r|
+     s..........Selecting Sorting Style.................|netrw-s|
+     v..........Browsing with a Vertical Split..........|netrw-v|
+     x..........Customizing Browsing....................|netrw-x|
+     				*netrw-browse-cmds*
 >
+			Quick Reference Commands Table
+        -------	-----------
 	Command	Explanation
         -------	-----------
 	   ?	Causes Netrw to issue help
@@ -526,6 +531,7 @@
 	   -	Makes Netrw go up one directory
 	   a	Show all of a directory (temporarily ignore g:netrw_list_hide)
 	   h	Edit file hiding list
+	   i	Toggles between long and short listing
 	   o	Enter the file/directory under the cursor in a new browser
 	   	window.  A horizontal split is used.
 	   r	Reverse sorting order
@@ -540,16 +546,22 @@
 	Var			Explanation
 	---			-----------
 	g:netrw_list_cmd	supports listing
-	g:netrw_rm_cmd		supports removing files
-	g:netrw_rmf_cmd		supports removing softlinks to directories
-	g:netrw_rmdir_cmd	supports removing directories
-	g:netrw_winsize		specify initial size of new o/v windows
 	g:netrw_list_hide	comma separated list of patterns for
 				hiding files
+	g:netrw_local_mkdir	specify command for making a directory locally
+	g:netrw_local_rmdir	remove directory command          default: rmdir
+	g:netrw_local_rename	rename file/directory command
+				unix-default: rm    win32-default: ren
+	g:netrw_mkdir_cmd	specify command for making a directory remotely
+	g:netrw_rm_cmd		supports removing files
+	g:netrw_rmdir_cmd	supports removing directories
+	g:netrw_rmf_cmd		supports removing softlinks to directories
 	g:netrw_sort_by		sort by "name", "time", or "size"
 	g:netrw_sort_direction	sorting direction: "normal" or "reverse"
 	g:netrw_sort_sequence	when sorting by name, first sort by the
 				comma-separated pattern sequence
+	g:netrw_timefmt		specify format string to strftime()  default: %c
+	g:netrw_winsize		specify initial size of new o/v windows
 <
 INTRODUCTION TO REMOTE DIRECTORY BROWSING
 
@@ -588,15 +600,33 @@
 browsing expects that directories will be flagged by a trailing slash.
 
 
-BROWSING 						*netrw-cr*
+BROWSING 							*netrw-cr*
 
 Browsing is simple: move the cursor onto a file or directory of interest.
 Hitting the <cr> (the return key) will select the file or directory.
 Directories will themselves be listed, and files will be opened using the
 protocol given in the original read request.
 
+LONG VS SHORT LISTING						*netrw-i*
 
-REMOVING FILES OR DIRECTORIES	*netrw-delete* *netrw-remove* *netrw-D*
+The short listing format gives just the files' and directories' names.
+The long listing is either based on the "ls" command via ssh for remote
+directories or displays the filename, file size (in bytes), and the
+time and date of last modification for local directories.
+
+
+MAKING A NEW DIRECTORY						*netrw-M*
+
+Actually <Leader>M, where the <Leader> is, by default, the backslash.
+
+With the "<Leader>M" map one may make a new directory either remotely (which
+depends on the global variable g:netrw_mkdir_cmd) or locally (which depends on
+the global variable g:netrw_local_mkdir).  Netrw will issue a request for the
+new directory's name.  A bare <CR> at that point will abort the making of the
+directory.  Attempts to make a local directory that already exists (as either
+a file or a directory) will be detected, reported on, and ignored.
+
+REMOVING FILES OR DIRECTORIES	*netrw-delete* *netrw-remove*	*netrw-D*
 
 Deleting/removing files and directories involves moving the cursor to the
 file/directory to be deleted and pressing "D".  Directories must be empty first
@@ -626,7 +656,7 @@
 	g:netrw_rmf_cmd: ssh HOSTNAME rm -f
 
 
-RENAMING FILES OR DIRECTORIES			*netrw-move* *netrw-rename*
+RENAMING FILES OR DIRECTORIES		*netrw-move* *netrw-rename* *netrw-R*
 
 Renaming/moving files and directories involves moving the cursor to the
 file/directory to be moved (renamed) and pressing "R".  You will then be
@@ -643,13 +673,18 @@
 
 The "a" map lets the browser ignore the g:netrw_list_hide variable.  Normally
 the g:netrw_list_hide variable holds a comma separated list of patterns which
-will be hidden (removed) from the directory listing.
+will be hidden (removed) from the directory listing.  Mnemonically, the
+"a" stands for show All.
 
 
-EDIT FILE OR DIRECTORY HIDING					*netrw-h*
+EDIT FILE OR DIRECTORY HIDING LIST				*netrw-H*
 
-The "h" map brings up a requestor allowing the user to change the
-file/directory hiding list.
+Actually <Leader>H, where the <Leader> is, by default, the backslash.
+
+The "<Leader>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 be hidden (ie. not shown).
 
 
 BROWSING WITH A HORIZONTALLY SPLIT WINDOW			*netrw-o*
diff --git a/runtime/doc/print.txt b/runtime/doc/print.txt
new file mode 100644
index 0000000..42a6097
--- /dev/null
+++ b/runtime/doc/print.txt
@@ -0,0 +1,751 @@
+*print.txt*     For Vim version 7.0aa.  Last change: 2004 Jul 05
+
+
+		  VIM REFERENCE MANUAL    by Bram Moolenaar
+
+
+Printing						*printing*
+
+1. Introduction				|print-intro|
+2. Print options			|print-options|
+3. PostScript Printing			|postscript-printing|
+4. PostScript Printing Encoding		|postscript-print-encoding|
+5. PostScript CJK Printing 		|postscript-cjk-printing|
+6. PostScript Printing Troubleshooting	|postscript-print-trouble|
+7. PostScript Utilities			|postscript-print-util|
+8. Formfeed Characters			|printing-formfeed|
+
+{Vi has None of this}
+{only available when compiled with the |+printer| feature}
+
+==============================================================================
+1. Introduction						*print-intro*
+
+On MS-Windows Vim can print your text on any installed printer.  On other
+systems a PostScript file is produced.  This can be directly sent to a
+PostScript printer.  For other printers a program like ghostscript needs to be
+used.
+
+					*:ha* *:hardcopy* *E237* *E238* *E324*
+:[range]ha[rdcopy][!] [arguments]
+			Send [range] lines (default whole file) to the
+			printer.
+
+			On MS-Windows a dialog is displayed to allow selection
+			of printer, paper size etc. To skip the dialog, use
+			the [!].  In this case the printer defined by
+			'printdevice' is used, or, if 'printdevice' is empty,
+			the system default printer.
+
+			For systems other than MS-Windows, PostScript is
+			written in a temp file and 'printexpr' is used to
+			actually print it.  Then [arguments] can be used by
+			'printexpr' through |v:cmdarg|.  Otherwise [arguments]
+			is ignored.  'printoptions' can be used to specify
+			paper size, duplex, etc.
+
+:[range]ha[rdcopy][!] >{filename}
+			As above, but write the resulting PostScript in file
+			{filename}.
+			Things like "%" are expanded |cmdline-special|
+			Careful: An existing file is silently overwritten.
+			{only available when compiled with the |+postscript|
+			feature}
+			On MS-Windows use the "print to file" feature of the
+			printer driver.
+
+Progress is displayed during printing as a page number and a percentage.  To
+abort printing use the interrupt key (CTRL-C or, on MS-systems, CTRL-Break).
+
+Printer output is controlled by the 'printfont' and 'printoptions' options.
+'printheader' specifies the format of a page header.
+
+The printed file is always limited to the selected margins, irrespective of
+the current window's 'wrap' or 'linebreak' settings.  The "wrap" item in
+'printoptions' can be used to switch wrapping off.
+The current highlighting colors are used in the printout, with the following
+considerations:
+1) The normal background is always rendered as white (i.e. blank paper.)
+2) White text or the default foreground is rendered as black, so that it shows
+   up!
+3) If 'background' is "dark", then the colours are darkened to compensate for
+   the fact that otherwise they would be too bright to show up clearly on
+   white paper.
+
+==============================================================================
+2. Print options					*print-options*
+
+Here are the details for the options that change the way printing is done.
+For generic info about setting options see |options.txt|.
+
+							*pdev-option*
+'printdevice' 'pdev'	string	(default empty)
+			global
+This defines the name of the printer to be used when the |:hardcopy| command
+is issued with a bang (!) to skip the printer selection dialog.  On Win32, it
+should be the printer name exactly as it appears in the standard printer
+dialog.
+If the option is empty, then vim will use the system default printer for
+":hardcopy!"
+
+							*penc-option* *E620*
+'printencoding' 'penc'	String	(default empty, except for:
+					Windows, OS/2: cp1252,
+					Macintosh: mac-roman,
+					VMS: dec-mcs,
+					HPUX: hp-roman8,
+					EBCDIC: ebcdic-uk)
+			global
+Sets the character encoding used when printing.  This option tells VIM which
+print character encoding file from the "print" directory in 'runtimepath' to
+use.
+
+This option will accept any value from |encoding-names|.  Any recognized names
+are converted to VIM standard names - see 'encoding' for more details.  Names
+not recognized by VIM will just be converted to lower case and underscores
+replaced with '-' signs.
+
+If 'printencoding' is empty or VIM cannot find the file then it will use
+'encoding' (if VIM is compiled with |+multi_byte| and it is set an 8-bit
+encoding) to find the print character encoding file.  If VIM is unable to find
+a character encoding file then it will use the "latin1" print character
+encoding file.
+
+When 'encoding' is set to a multi-byte encoding, VIM will try to convert
+characters to the printing encoding for printing (if 'printencoding' is empty
+then the conversion will be to latin1).  Conversion to a printing encoding
+other than latin1 will require VIM to be compiled with the |+iconv| feature.
+If no conversion is possible then printing will fail.  Any characters that
+cannot be converted will be replaced with upside down question marks.
+
+Four print character encoding files are provided to support default Mac, VMS,
+HPUX, and EBCDIC character encodings and are used by default on these
+platforms.  Code page 1252 print character encoding is used by default on
+Windows and OS/2 platforms.
+
+							*pexpr-option*
+'printexpr' 'pexpr'	String	(default: see below)
+			global
+Expression that is evaluated to print the PostScript produced with
+|:hardcopy|.
+The file name to be printed is in |v:fname_in|.
+The arguments to the ":hardcopy" command are in |v:cmdarg|.
+The expression must take care of deleting the file after printing it.
+When there is an error, the expression must return a non-zero number.
+If there is no error, return zero or an empty string.
+The default for non MS-Windows or VMS systems is to simply use "lpr" to print
+the file: >
+
+    system('lpr' . (&printdevice == '' ? '' : ' -P' . &printdevice)
+	. ' ' . v:fname_in) . delete(v:fname_in) + v:shell_error
+
+On MS-Dos, MS-Windows and OS/2 machines the default is to copy the file to the
+currently specified printdevice: >
+
+    system('copy' . ' ' . v:fname_in . (&printdevice == ''
+		? ' LPT1:' : (' \"' . &printdevice . '\"')))
+		. delete(v:fname_in)
+
+On VMS machines the default is to send the file to either the default or
+currently specified printdevice: >
+
+    system('print' . (&printdevice == '' ? '' : ' /queue=' .
+		&printdevice) . ' ' . v:fname_in) . delete(v:fname_in)
+
+If you change this option, using a function is an easy way to avoid having to
+escape all the spaces.  Example: >
+
+	:set printexpr=PrintFile(v:fname_in)
+	:function PrintFile(fname)
+	:  call system("ghostview " . a:fname)
+	:  call delete(a:fname)
+	:  return v:shell_error
+	:endfunc
+
+Be aware that some print programs return control before they have read the
+file.  If you delete the file too soon it will not be printed.  These programs
+usually offer an option to have them remove the file when printing is done.
+							*E365*
+If evaluating the expression fails or it results in a non-zero number, you get
+an error message.  In that case Vim will delete the file.  In the default
+value for non-MS-Windows a trick is used: Adding "v:shell_error" will result
+in a non-zero number when the system() call fails.
+
+This option cannot be set from a |modeline| or in the |sandbox|, for security
+reasons.
+
+							*pfn-option* *E613*
+'printfont' 'pfn'	string	(default "courier")
+			global
+This is the name of the font that will be used for the |:hardcopy| command's
+output.  It has the same format as the 'guifont' option, except that only one
+font may be named, and the special "guifont=*" syntax is not available.
+
+In the Win32 GUI version this specifies a font name with its extra attributes,
+as with the 'guifont' option.
+
+For other systems, only ":h11" is recognized, where "11" is the point size of
+the font.  When omitted, the point size is 10.
+
+							*pheader-option*
+'printheader' 'pheader'  string  (default "%<%f%h%m%=Page %N")
+			 global
+This defines the format of the header produced in |:hardcopy| output.  The
+option is defined in the same way as the 'statusline' option.  If Vim has not
+been compiled with the |+statusline| feature, this option has no effect and a
+simple default header is used, which shows the page number.
+
+							*pmbcs-option*
+'printmbcharset' 'pmbcs'  string (default "")
+			  global
+Sets the CJK character set to be used when generating CJK output from
+|:hardcopy|.  The following predefined values are currently recognised by VIM:
+
+		Value		Description ~
+  Chinese	GB_2312-80
+  (Simplified)	GBT_12345-90
+		MAC		Apple Mac Simplified Chinese
+		GBT-90_MAC	GB/T 12345-90 Apple Mac Simplified
+				  Chinese
+		GBK		GBK (GB 13000.1-93)
+		ISO10646	ISO 10646-1:1993
+
+  Chinese	CNS_1993	CNS 11643-1993, Planes 1 & 2
+  (Traditional)	BIG5
+		ETEN		Big5 with ETen extensions
+		ISO10646	ISO 10646-1:1993
+
+  Japanese	JIS_C_1978
+		JIS_X_1983
+		JIS_X_1990
+		MSWINDOWS	Win3.1/95J (JIS X 1997 + NEC + 
+				  IBM extensions)
+		KANJITALK6	Apple Mac KanjiTalk V6.x
+		KANJITALK7	Apple Mac KanjiTalk V7.x
+
+  Korean	KS_X_1992
+		MAC		Apple Macintosh Korean
+		MSWINDOWS	KS X 1992 with MS extensions
+		ISO10646	ISO 10646-1:1993
+
+Only certain combinations of the above values and 'printencoding' are
+possible.  The following tables show the valid combinations:
+
+				euc-cn	 gbk	ucs-2	utf-8 ~
+  Chinese	GB_2312-80	   x
+  (Simplified)	GBT_12345-90	   x
+		MAC		   x
+		GBT-90_MAC	   x
+		GBK			   x
+		ISO10646			  x	  x
+
+				euc-tw	 big5	ucs-2	utf-8 ~
+  Chinese	CNS_1993	   x
+  (Traditional)	BIG5			   x
+		ETEN			   x
+		ISO10646			  x	  x
+
+				euc-jp	 sjis	ucs-2	utf-8 ~
+  Japanese	JIS_C_1978	   x	   x
+		JIS_X_1983	   x	   x
+		JIS_X_1990	   x		  x	  x
+		MSWINDOWS	   x
+		KANJITALK6	   x
+		KANJITALK7	   x
+
+				euc-kr	 cp949	ucs-2	utf-8 ~
+  Korean	KS_X_1992	   x   
+		MAC		   x
+		MSWINDOWS		   x
+		ISO10646			  x	  x
+
+To set up the correct encoding and character set for printing some
+Japanese text you would do the following; >
+	:set printencoding=euc-jp
+	:set printmbcharset=JIS_X_1983
+
+If 'printmbcharset' is not one of the above values then it is assumed to
+specify a custom multi-byte character set and no check will be made that it is
+compatible with the value for 'printencoding'.  VIM will look for a file
+defining the character set in the "print" directory in 'runtimepath'.
+
+							*pmbfn-option*
+'printmbfont' 'pmbfn'	string (default "")
+			global
+This is a comma-separated list of fields for font names to be used when
+generating CJK output from |:hardcopy|.  Each font name has to be preceded
+with a letter indicating the style the font is to be used for as follows:
+
+  r:{font-name}		font to use for normal characters
+  b:{font-name}		font to use for bold characters
+  i:{font-name}		font to use for italic characters
+  o:{font-name}		font to use for bold-italic characters
+
+A field with the r: prefix must be specified when doing CJK printing.  The
+other fontname specifiers are optional.  If a specifier is missing then
+another font will be used as follows:
+
+  if b: is missing, then use r:
+  if i: is missing, then use r:
+  if o: is missing, then use i:
+
+Some CJK fonts do not contain characters for codes in the ASCII code range.
+Also, some characters in the CJK ASCII code ranges differ in a few code points
+from traditional ASCII characters.  There are two additional fields to control
+printing of characters in the ASCII code range.
+
+  c:yes			Use Courier font for characters in the ASCII
+  c:no (default)	code range.
+
+  a:yes			Use ASCII character set for codes in the ASCII
+  a:no (default)	code range.
+
+The following is an example of specifying two multi-byte fonts, one for normal
+and italic printing and one for bold and bold-italic printing, and using
+Courier to print codes in the ASCII code range but using the national
+character set: >
+	:set printmbfont=r:WadaMin-Regular,b:WadaMin-Bold,c:yes
+<
+							*popt-option*
+'printoptions' 'popt' 	string (default "")
+			global
+This is a comma-separated list of items that control the format of the output
+of |:hardcopy|:
+
+  left:{spec}		left margin (default: 10pc)
+  right:{spec}		right margin (default: 5pc)
+  top:{spec}		top margin (default: 5pc)
+  bottom:{spec}		bottom margin (default: 5pc)
+			{spec} is a number followed by "in" for inches, "pt"
+			for points (1 point is 1/72 of an inch), "mm" for
+			millimeters or "pc" for a percentage of the media
+			size.
+			Weird example:
+			    left:2in,top:30pt,right:16mm,bottom:3pc
+			If the unit is not recognized there is no error and
+			the default value is used.
+
+  header:{nr}		Number of lines to reserve for the header.
+			Only the first line is actually filled, thus when {nr}
+			is 2 there is one empty line.  The header is formatted
+			according to 'printheader'.
+  header:0		Do not print a header.
+  header:2  (default)	Use two lines for the header
+
+  syntax:n		Do not use syntax highlighting.  This is faster and
+			thus useful when printing large files.
+  syntax:y		Do syntax highlighting.
+  syntax:a  (default)	Use syntax highlighting if the printer appears to be
+  			able to print color or grey.
+
+  number:y		Include line numbers in the printed output.
+  number:n  (default)	No line numbers.
+
+  wrap:y    (default)	Wrap long lines.
+  wrap:n		Truncate long lines.
+
+  duplex:off		Print on one side.
+  duplex:long (default)	Print on both sides (when possible), bind on long
+  			side.
+  duplex:short		Print on both sides (when possible), bind on short
+  			side.
+
+  collate:y  (default)	Collating: 1 2 3, 1 2 3, 1 2 3
+  collate:n		No collating: 1 1 1, 2 2 2, 3 3 3
+
+  jobsplit:n (default)	Do all copies in one print job
+  jobsplit:y		Do each copy as a separate print job.  Useful when
+  			doing N-up postprocessing.
+
+  portrait:y (default)	Orientation is portrait.
+  portrait:n		Orientation is landscape.
+						*a4* *letter*
+  paper:A4   (default)	Paper size: A4
+  paper:{name}		Paper size from this table:
+			{name}	    size in cm	     size in inch ~
+			10x14	    25.4  x 35.57    10    x 14
+			A3	    29.7  x 42	     11.69 x 16.54
+			A4	    21	  x 29.7      8.27 x 11.69
+			A5	    14.8  x 21	      5.83 x  8.27
+			B4	    25	  x 35.3     10.12 x 14.33
+			B5	    17.6  x 25	      7.17 x 10.12
+			executive   18.42 x 26.67     7.25 x 10.5
+			folio	    21	  x 33	      8.27 x 13
+			ledger	    43.13 x 27.96    17    x 11
+			legal	    21.59 x 35.57     8.5  x 14
+			letter	    21.59 x 27.96     8.5  x 11
+			quarto	    21.59 x 27.5      8.5  x 10.83
+			statement   13.97 x 21.59     5.5  x  8.5
+			tabloid     27.96 x 43.13    11    x 17
+
+  formfeed:n (default)	Treat form feed characters (0x0c) as a normal print
+  			character.
+  formfeed:y		When a form feed character is encountered, continue
+			printing of the current line at the beginning of the
+			first line on a new page.
+
+The item indicated with (default) is used when the item is not present.  The
+values are not always used, especially when using a dialog to select the
+printer and options.
+Example: >
+	:set printoptions=paper:letter,duplex:off
+
+==============================================================================
+3. PostScript Printing					*postscript-printing*
+						*E455* *E456* *E457* *E624*
+Provided you have enough disk space there should be no problems generating a
+PostScript file.  You need to have the runtime files correctly installed (if
+you can find the help files, they probably are).
+
+There are currently a number of limitations with PostScript printing:
+
+- 'printfont' - The font name is ignored (the Courier family is always used -
+  it should be available on all PostScript printers) but the font size is
+  used.
+
+- 'printoptions' - The duplex setting is used when generating PostScript
+  output, but it is up to the printer to take notice of the setting.  If the
+  printer does not support duplex printing then it should be silently ignored.
+  Some printers, however, don't print at all.
+
+- 8-bit support - While a number of 8-bit print character encodings are
+  supported it is possible that some characters will not print.  Whether a
+  character will print depends on the font in the printer knowing the
+  character.  Missing characters will be replaced with an upside down question
+  mark, or a space if that character is also not known by the font.  It may be
+  possible to get all the characters in an encoding to print by installing a
+  new version of the Courier font family.
+
+- Multi-byte support - Currently VIM will try to convert multi-byte characters
+  to the 8-bit encoding specified by 'printencoding' (or latin1 if it is
+  empty).  Any characters that are not successfully converted are shown as
+  unknown characters.  Printing will fail if VIM cannot convert the multi-byte
+  to the 8-bit encoding.
+
+==============================================================================
+4. Custom 8-bit Print Character Encodings	*postscript-print-encoding*
+								*E618* *E619*
+To use your own print character encoding when printing 8-bit character data
+you need to define your own PostScript font encoding vector.  Details on how
+to to define a font encoding vector is beyond the scope of this help file, but
+you can find details in the PostScript Language Reference Manual, 3rd Edition,
+published by Addison-Wesley and available in PDF form at
+http://www.adobe.com/.  The following describes what you need to do for VIM to
+locate and use your print character encoding.
+
+i.   Decide on a unique name for your encoding vector, one that does not clash
+     with any of the recognized or standard encoding names that VIM uses (see
+     |encoding-names| for a list), and that no one else is likely to use.
+ii.  Copy $VIMRUNTIME/print/latin1.ps to the print subdirectory in your
+     'runtimepath' and rename it with your unique name.
+iii. Edit your renamed copy of latin1.ps, replacing all occurrences of latin1
+     with your unique name (don't forget the line starting %%Title:), and
+     modify the array of glyph names to define your new encoding vector.  The
+     array must have exactly 256 entries or you will not be able to print!
+iv.  Within VIM, set 'printencoding' to your unique encoding name and then
+     print your file.  VIM will now use your custom print character encoding.
+
+VIM will report an error with the resource file if you change the order or
+content of the first 3 lines, other than the name of the encoding on the line
+starting %%Title: or the version number on the line starting %%Version:.
+
+[Technical explanation for those that know PostScript - VIM looks for a file
+with the same name as the encoding it will use when printing.  The file
+defines a new PostScript Encoding resource called /VIM-name, where name is the
+print character encoding VIM will use.]
+
+==============================================================================
+5. PostScript CJK Printing			*postscript-cjk-printing*
+							*E673* *E674* *E675*
+
+VIM supports printing of Chinese, Japanese, and Korean files.  Setting up VIM
+to correctly print CJK files requires setting up a few more options.
+
+Each of these countries has many standard character sets and encodings which
+require that both be specified when printing.  In addition, CJK fonts normally
+do not have the concept of italic glyphs and use different weight or stroke
+style to achieve emphasis when printing.  This in turn requires a different
+approach to specifying fonts to use when printing.
+
+The encoding and character set are specified with the 'printencoding' and
+'printmbcharset' options.  If 'printencoding' is not specified then 'encoding'
+is used as normal.  If 'printencoding' is specified then characters will be
+translated to this encoding for printing.  You should ensure that the encoding
+is compatible with the character set needed for the file contents or some
+characters may not appear when printed.
+
+The fonts to use for CJK printing are specified with 'printmbfont'.  This
+option allows you to specify different fonts to use when printing characters
+which are syntax highlighted with the font styles normal, italic, bold and
+bold-italic.
+
+No CJK fonts are supplied with VIM.  There are some free Korean, Japanese, and
+Traditional Chinese fonts available at:
+
+  http://examples.oreilly.com/cjkvinfo/adobe/samples/
+
+You can find descriptions of the various fonts in the read me file at 
+
+  http://examples.oreilly.com/cjkvinfo/adobe/00README
+
+Please read your printer documentation on how to install new fonts.
+
+CJK fonts can be large containing several thousand glyphs, and it is not
+uncommon to find that they only contain a subset of a national standard.  It
+is not unusual to find the fonts to not include characters for codes in the
+ASCII code range.  If you find half-width Roman characters are not appearing
+in your printout then you should configure VIM to use the Courier font the
+half-width ASCII characters with 'printmbfont'.  If your font does not include
+other characters then you will need to find another font that does.
+
+Another issue with ASCII characters, is that the various national character
+sets specify a couple of different glyphs in the ASCII code range.  If you
+print ASCII text using the national character set you may see some unexpected
+characters.  If you want true ASCII code printing then you need to configure
+VIM to output ASCII characters for the ASCII code range with 'printmbfont'.
+
+It is possible to define your own multi-byte character set although this
+should not be attempted lightly.  A discussion on the process if beyond the
+scope of these help files.  You can find details on CMap (character map) files
+in the document 'Adobe CMap and CIDFont Files Specification, Version 1.0',
+available from http://www.adobe.com as a PDF file.
+
+==============================================================================
+6. PostScript Printing Troubleshooting		*postscript-print-trouble*
+									*E621*
+Usually the only sign of a problem when printing with PostScript is that your
+printout does not appear.  If you are lucky you may get a printed page that
+tells you the PostScript operator that generated the error that prevented the
+print job completing.
+
+There are a number of possible causes as to why the printing may have failed:
+
+- Wrong version of the prolog resource file.  The prolog resource file
+  contains some PostScript that VIM needs to be able to print.  Each version
+  of VIM needs one particular version.  Make sure you have correctly installed
+  the runtime files, and don't have any old versions of a file called prolog
+  in the print directory in your 'runtimepath' directory.
+
+- Paper size.  Some PostScript printers will abort printing a file if they do
+  not support the requested paper size.  By default VIM uses A4 paper.  Find
+  out what size paper your printer normally uses and set the appropriate paper
+  size with 'printoptions'.  If you cannot find the name of the paper used,
+  measure a sheet and compare it with the table of supported paper sizes listed
+  for 'printoptions', using the paper that is closest in both width AND height.
+  Note: The dimensions of actual paper may vary slightly from the ones listed.
+  If there is no paper listed close enough, then you may want to try psresize
+  from PSUtils, discussed below.
+
+- Two-sided printing (duplex).  Normally a PostScript printer that does not
+  support two-sided printing will ignore any request to do it.  However, some
+  printers may abort the job altogether.  Try printing with duplex turned off.
+  Note: Duplex prints can be achieved manually using PS utils - see below.
+
+- Collated printing.  As with Duplex printing, most PostScript printers that
+  do not support collating printouts will ignore a request to do so.  Some may
+  not.  Try printing with collation turned off.
+
+- Syntax highlighting.  Some print management code may prevent the generated
+  PostScript file from being printed on a black and white printer when syntax
+  highlighting is turned on, even if solid black is the only color used.  Try
+  printing with syntax highlighting turned off.
+
+A safe printoptions setting to try is: >
+
+	:set printoptions=paper:A4,duplex:off,collate:n,syntax:n
+
+Replace "A4" with the paper size that best matches your printer paper.
+
+==============================================================================
+7. PostScript Utilities				*postscript-print-util*
+
+7.1 Ghostscript
+
+Ghostscript is a PostScript and PDF interpreter that can be used to display
+and print on non-PostScript printers PostScript and PDF files.  It can also
+generate PDF files from PostScript.
+
+Ghostscript will run on a wide variety of platforms.
+
+There are three available versions:
+
+- AFPL Ghostscript (formerly Aladdin Ghostscript) which is free for
+  non-commercial use.  It can be obtained from:
+
+    http://www.cs.wisc.edu/~ghost/
+
+- GNU Ghostscript which is available under the GNU General Public License.  It
+  can be obtained from:
+
+    ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/gnu/
+
+- A commercial version for inclusion in commercial products.
+
+Additional information on Ghostscript can also be found at:
+
+  http://www.ghostscript.com/
+
+Support for a number of non PostScript printers is provided in the
+distribution as standard, but if you cannot find support for your printer
+check the Ghostscript site for other printers not included by default.
+
+
+7.2 Ghostscript Previewers.
+
+The interface to Ghostscript is very primitive so a number of graphical front
+ends have been created.  These allow easier PostScript file selection,
+previewing at different zoom levels, and printing.  Check supplied
+documentation for full details.
+
+X11
+
+- Ghostview.  Obtainable from:
+
+    http://www.cs.wisc.edu/~ghost/gv/
+
+- gv.  Derived from Ghostview.  Obtainable from:
+
+    http://wwwthep.physik.uni-mainz.de/~plass/gv/
+
+  Copies (possibly not the most recent) can be found at:
+
+    http://www.cs.wisc.edu/~ghost/gv/
+
+OpenVMS
+
+- Is apparently supported in the main code now (untested).  See:
+
+    http://wwwthep.physik.uni-mainz.de/~plass/gv/
+
+Windows and OS/2
+
+- GSview.  Obtainable from:
+
+    http://www.cs.wisc.edu/~ghost/gsview/
+
+DOS
+
+- ps_view.  Obtainable from:
+
+    ftp://ftp.pg.gda.pl/pub/TeX/support/ps_view/
+    ftp://ftp.dante.de/tex-archive/support/ps_view/
+
+Linux
+
+- GSview.  Linux version of the popular Windows and OS/2 previewer.
+  Obtainable from:
+
+    http://www.cs.wisc.edu/~ghost/gsview/
+
+- BMV.  Different from Ghostview and gv in that it doesn't use X but svgalib.
+  Obtainable from:
+
+    ftp://sunsite.unc.edu/pub/Linux/apps/graphics/viewers/svga/bmv-1.2.tgz
+
+
+7.3 PSUtils
+
+PSUtils is a collection of utility programs for manipulating PostScript
+documents.  Binary distributions are available for many platforms, as well as
+the full source.  PSUtils can be found at:
+
+  http://knackered.org/angus/psutils
+
+The utilities of interest include:
+
+- psnup.     Convert PS files for N-up printing.
+- psselect.  Select page range and order of printing.
+- psresize.  Change the page size.
+- psbook.    Reorder and lay out pages ready for making a book.
+
+The output of one program can be used as the input to the next, allowing for
+complex print document creation.
+
+
+N-UP PRINTING
+
+The psnup utility takes an existing PostScript file generated from VIM and
+convert it to an n-up version.  The simplest way to create a 2-up printout is
+to first create a PostScript file with: >
+
+	:hardcopy > test.ps
+
+Then on your command line execute: >
+
+	psnup -n 2 test.ps final.ps
+
+Note: You may get warnings from some Ghostscript previewers for files produced
+by psnup - these may safely be ignored.
+
+Finally print the file final.ps to your PostScript printer with your
+platform's print command.  (You will need to delete the two PostScript files
+afterwards yourself.)  'printexpr' could be modified to perform this extra
+step before printing.
+
+
+ALTERNATE DUPLEX PRINTING
+
+It is possible to achieve a poor man's version of duplex printing using the PS
+utility psselect.  This utility has options -e and -o for printing just the
+even or odd pages of a PS file respectively.
+
+First generate a PS file with the 'hardcopy' command, then generate a new
+files with all the odd and even numbered pages with: >
+
+	psselect -o test.ps odd.ps
+	psselect -e test.ps even.ps
+
+Next print odd.ps with your platform's normal print command.  Then take the
+print output, turn it over and place it back in the paper feeder.  Now print
+even.ps with your platform's print command.  All the even pages should now
+appear on the back of the odd pages.
+
+There a couple of points to bear in mind:
+
+1. Position of the first page.  If the first page is on top of the printout
+   when printing the odd pages then you need to reverse the order that the odd
+   pages are printed.  This can be done with the -r option to psselect.  This
+   will ensure page 2 is printed on the back of page 1.
+   Note: it is better to reverse the odd numbered pages rather than the even
+   numbered in case there are an odd number of pages in the original PS file.
+
+2. Paper flipping.  When turning over the paper with the odd pages printed on
+   them you may have to either flip them horizontally (along the long edge) or
+   vertically (along the short edge), as well as possibly rotating them 180
+   degrees.  All this depends on the printer - it will be more obvious for
+   desktop ink jets than for small office laser printers where the paper path
+   is hidden from view.
+
+
+==============================================================================
+8. Formfeed Characters					*printing-formfeed*
+
+By default VIM does not do any special processing of |formfeed| control
+characters.  Setting the 'printoptions' formfeed item will make VIM recognize
+formfeed characters and continue printing the current line at the beginning
+of the first line on a new page.  The use of formfeed characters provides
+rudimentary print control but there are certain things to be aware of.
+
+VIM will always start printing a line (including a line number if enabled)
+containing a formfeed character, even if it is the first character on the
+line.  This means if a line starting with a formfeed character is the first
+line of a page then VIM will print a blank page.
+
+Since the line number is printed at the start of printing the line containing
+the formfeed character, the remainder of the line printed on the new page
+will not have a line number printed for it (in the same way as the wrapped
+lines of a long line when wrap in 'printoptions' is enabled).
+
+If the formfeed character is the last character on a line, then printing will
+continue on the second line of the new page, not the first.  This is due to
+VIM processing the end of the line after the formfeed character and moving
+down a line to continue printing.
+
+Due to the points made above it is recommended that when formfeed character
+processing is enabled, printing of line numbers is disabled, and that form
+feed characters are not the last character on a line.  Even then you may need
+to adjust the number of lines before a formfeed character to prevent
+accidental blank pages.
+
+==============================================================================
+ vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt
index ef832eb..a16cd4a 100644
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -1,4 +1,4 @@
-*quickref.txt*  For Vim version 7.0aa.  Last change: 2004 Jul 04
+*quickref.txt*  For Vim version 7.0aa.  Last change: 2004 Jul 05
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -782,6 +782,8 @@
 |'printexpr'|     |'pexpr'|  expression used to print PostScript for :hardcopy
 |'printfont'|	  |'pfn'|    name of the font to be used for :hardcopy
 |'printheader'|   |'pheader'| format of the header used for :hardcopy
+|'printmbcharset'| |'pmbcs'| CJK character set to be used for :hardcopy
+|'printmbfont'|   |'pmbfn'|  font names to be used for CJK output of :hardcopy
 |'printoptions'|  |'popt'|   controls the format of :hardcopy output
 |'quoteescape'|   |'qe'|     escape characters used in a string
 |'readonly'|	  |'ro'|     disallow writing the buffer
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 4e2a274..c1e7de7 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt*	For Vim version 7.0aa.  Last change: 2004 Jul 01
+*syntax.txt*	For Vim version 7.0aa.  Last change: 2004 Jul 06
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -812,11 +812,20 @@
 this should have the value 1, and for Windows 2000 it should be 2.
 Select the version you want with the following line: >
 
-  :let dosbatch_cmdextversion = 1
+   :let dosbatch_cmdextversion = 1
 
 If this variable is not defined it defaults to a value of 2 to support
 Windows 2000.
 
+A second option covers whether *.btm files should be detected as type
+"dosbatch" (MS-DOS batch files) or type "btm" (4DOS batch files). The latter
+is used by default. You may select the former with the following line: >
+
+   :let g:dosbatch_syntax_for_btm = 1
+
+If this variable is undefined or zero, btm syntax is selected.
+
+
 
 DTD						*dtd.vim* *dtd-syntax*
 
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 485923c..597e307 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -615,6 +615,8 @@
 'pheader'	options.txt	/*'pheader'*
 'pi'	options.txt	/*'pi'*
 'pm'	options.txt	/*'pm'*
+'pmbcs'	options.txt	/*'pmbcs'*
+'pmbfn'	options.txt	/*'pmbfn'*
 'popt'	options.txt	/*'popt'*
 'preserveindent'	options.txt	/*'preserveindent'*
 'previewheight'	options.txt	/*'previewheight'*
@@ -624,6 +626,8 @@
 'printexpr'	options.txt	/*'printexpr'*
 'printfont'	options.txt	/*'printfont'*
 'printheader'	options.txt	/*'printheader'*
+'printmbcharset'	options.txt	/*'printmbcharset'*
+'printmbfont'	options.txt	/*'printmbfont'*
 'printoptions'	options.txt	/*'printoptions'*
 'prompt'	vi_diff.txt	/*'prompt'*
 'pt'	options.txt	/*'pt'*
@@ -1923,8 +1927,8 @@
 :gv	gui_x11.txt	/*:gv*
 :gvim	gui_x11.txt	/*:gvim*
 :h	various.txt	/*:h*
-:ha	various.txt	/*:ha*
-:hardcopy	various.txt	/*:hardcopy*
+:ha	print.txt	/*:ha*
+:hardcopy	print.txt	/*:hardcopy*
 :help	various.txt	/*:help*
 :helpf	various.txt	/*:helpf*
 :helpfind	various.txt	/*:helpfind*
@@ -3046,8 +3050,8 @@
 E234	options.txt	/*E234*
 E235	options.txt	/*E235*
 E236	options.txt	/*E236*
-E237	various.txt	/*E237*
-E238	various.txt	/*E238*
+E237	print.txt	/*E237*
+E238	print.txt	/*E238*
 E239	sign.txt	/*E239*
 E24	message.txt	/*E24*
 E240	remote.txt	/*E240*
@@ -3140,7 +3144,7 @@
 E321	editing.txt	/*E321*
 E322	message.txt	/*E322*
 E323	message.txt	/*E323*
-E324	various.txt	/*E324*
+E324	print.txt	/*E324*
 E325	usr_11.txt	/*E325*
 E326	recover.txt	/*E326*
 E327	gui.txt	/*E327*
@@ -3185,7 +3189,7 @@
 E362	term.txt	/*E362*
 E363	pattern.txt	/*E363*
 E364	eval.txt	/*E364*
-E365	options.txt	/*E365*
+E365	print.txt	/*E365*
 E366	options.txt	/*E366*
 E367	autocmd.txt	/*E367*
 E368	eval.txt	/*E368*
@@ -3284,9 +3288,9 @@
 E452	os_msdos.txt	/*E452*
 E453	os_msdos.txt	/*E453*
 E454	os_msdos.txt	/*E454*
-E455	various.txt	/*E455*
-E456	various.txt	/*E456*
-E457	various.txt	/*E457*
+E455	print.txt	/*E455*
+E456	print.txt	/*E456*
+E457	print.txt	/*E457*
 E458	message.txt	/*E458*
 E459	message.txt	/*E459*
 E46	message.txt	/*E46*
@@ -3454,19 +3458,19 @@
 E610	options.txt	/*E610*
 E611	options.txt	/*E611*
 E612	sign.txt	/*E612*
-E613	options.txt	/*E613*
+E613	print.txt	/*E613*
 E614	editing.txt	/*E614*
 E615	editing.txt	/*E615*
 E616	editing.txt	/*E616*
 E617	options.txt	/*E617*
-E618	various.txt	/*E618*
-E619	various.txt	/*E619*
+E618	print.txt	/*E618*
+E619	print.txt	/*E619*
 E62	pattern.txt	/*E62*
-E620	options.txt	/*E620*
-E621	various.txt	/*E621*
+E620	print.txt	/*E620*
+E621	print.txt	/*E621*
 E622	if_cscop.txt	/*E622*
 E623	if_cscop.txt	/*E623*
-E624	various.txt	/*E624*
+E624	print.txt	/*E624*
 E625	if_cscop.txt	/*E625*
 E626	if_cscop.txt	/*E626*
 E627	netbeans.txt	/*E627*
@@ -3520,6 +3524,9 @@
 E670	various.txt	/*E670*
 E671	starting.txt	/*E671*
 E672	starting.txt	/*E672*
+E673	print.txt	/*E673*
+E674	print.txt	/*E674*
+E675	print.txt	/*E675*
 E68	pattern.txt	/*E68*
 E69	pattern.txt	/*E69*
 E70	pattern.txt	/*E70*
@@ -3882,7 +3889,7 @@
 a'	motion.txt	/*a'*
 a(	motion.txt	/*a(*
 a)	motion.txt	/*a)*
-a4	options.txt	/*a4*
+a4	print.txt	/*a4*
 a:firstline	eval.txt	/*a:firstline*
 a:lastline	eval.txt	/*a:lastline*
 a:var	eval.txt	/*a:var*
@@ -5205,7 +5212,7 @@
 lc_time-variable	eval.txt	/*lc_time-variable*
 left-right-motions	motion.txt	/*left-right-motions*
 less	various.txt	/*less*
-letter	options.txt	/*letter*
+letter	print.txt	/*letter*
 lex-syntax	syntax.txt	/*lex-syntax*
 lex.vim	syntax.txt	/*lex.vim*
 lhaskell.vim	syntax.txt	/*lhaskell.vim*
@@ -5462,6 +5469,8 @@
 new-6	version6.txt	/*new-6*
 new-7	version7.txt	/*new-7*
 new-GTK-GUI	version5.txt	/*new-GTK-GUI*
+new-KDE	version7.txt	/*new-KDE*
+new-MzScheme	version7.txt	/*new-MzScheme*
 new-Select-mode	version5.txt	/*new-Select-mode*
 new-View	version6.txt	/*new-View*
 new-argument-list	version6.txt	/*new-argument-list*
@@ -5490,7 +5499,6 @@
 new-indent-flex	version6.txt	/*new-indent-flex*
 new-items-6	version6.txt	/*new-items-6*
 new-items-7	version7.txt	/*new-items-7*
-new-kde	version7.txt	/*new-kde*
 new-line-continuation	version5.txt	/*new-line-continuation*
 new-multi-byte	version5.txt	/*new-multi-byte*
 new-multi-lang	version6.txt	/*new-multi-lang*
@@ -5500,6 +5508,7 @@
 new-options-5.4	version5.txt	/*new-options-5.4*
 new-perl-python	version5.txt	/*new-perl-python*
 new-plugins	version6.txt	/*new-plugins*
+new-print-multi-byte	version7.txt	/*new-print-multi-byte*
 new-printing	version6.txt	/*new-printing*
 new-runtime-dir	version5.txt	/*new-runtime-dir*
 new-script	version5.txt	/*new-script*
@@ -5589,6 +5598,8 @@
 pattern-overview	pattern.txt	/*pattern-overview*
 pattern-searches	pattern.txt	/*pattern-searches*
 pattern.txt	pattern.txt	/*pattern.txt*
+pdev-option	print.txt	/*pdev-option*
+penc-option	print.txt	/*penc-option*
 perl	if_perl.txt	/*perl*
 perl-Append	if_perl.txt	/*perl-Append*
 perl-Buffer	if_perl.txt	/*perl-Buffer*
@@ -5613,6 +5624,9 @@
 perl-syntax	syntax.txt	/*perl-syntax*
 perl-using	if_perl.txt	/*perl-using*
 perl.vim	syntax.txt	/*perl.vim*
+pexpr-option	print.txt	/*pexpr-option*
+pfn-option	print.txt	/*pfn-option*
+pheader-option	print.txt	/*pheader-option*
 photon-fonts	os_qnx.txt	/*photon-fonts*
 photon-gui	os_qnx.txt	/*photon-gui*
 php-syntax	syntax.txt	/*php-syntax*
@@ -5628,16 +5642,20 @@
 plugin-details	filetype.txt	/*plugin-details*
 plugin-filetype	usr_41.txt	/*plugin-filetype*
 plugin-special	usr_41.txt	/*plugin-special*
+pmbcs-option	print.txt	/*pmbcs-option*
+pmbfn-option	print.txt	/*pmbfn-option*
+popt-option	print.txt	/*popt-option*
 popup-menu	gui.txt	/*popup-menu*
 popup-menu-added	version5.txt	/*popup-menu-added*
 ports-5.2	version5.txt	/*ports-5.2*
 ports-6	version6.txt	/*ports-6*
 postscr-syntax	syntax.txt	/*postscr-syntax*
 postscr.vim	syntax.txt	/*postscr.vim*
-postscript-print-encoding	various.txt	/*postscript-print-encoding*
-postscript-print-trouble	various.txt	/*postscript-print-trouble*
-postscript-print-util	various.txt	/*postscript-print-util*
-postscript-printing	various.txt	/*postscript-printing*
+postscript-cjk-printing	print.txt	/*postscript-cjk-printing*
+postscript-print-encoding	print.txt	/*postscript-print-encoding*
+postscript-print-trouble	print.txt	/*postscript-print-trouble*
+postscript-print-util	print.txt	/*postscript-print-util*
+postscript-printing	print.txt	/*postscript-printing*
 ppwiz-syntax	syntax.txt	/*ppwiz-syntax*
 ppwiz.vim	syntax.txt	/*ppwiz.vim*
 press-enter	message.txt	/*press-enter*
@@ -5645,9 +5663,12 @@
 prevcount-variable	eval.txt	/*prevcount-variable*
 preview-window	windows.txt	/*preview-window*
 prevnonblank()	eval.txt	/*prevnonblank()*
+print-intro	print.txt	/*print-intro*
+print-options	print.txt	/*print-options*
+print.txt	print.txt	/*print.txt*
 printcap-syntax	syntax.txt	/*printcap-syntax*
-printing	various.txt	/*printing*
-printing-formfeed	various.txt	/*printing-formfeed*
+printing	print.txt	/*printing*
+printing-formfeed	print.txt	/*printing-formfeed*
 progname-variable	eval.txt	/*progname-variable*
 progress-syntax	syntax.txt	/*progress-syntax*
 progress.vim	syntax.txt	/*progress.vim*
@@ -6247,6 +6268,7 @@
 tolower()	eval.txt	/*tolower()*
 toolbar-icon	gui.txt	/*toolbar-icon*
 toupper()	eval.txt	/*toupper()*
+tr()	eval.txt	/*tr()*
 trojan-horse	starting.txt	/*trojan-horse*
 try-conditionals	eval.txt	/*try-conditionals*
 try-echoerr	eval.txt	/*try-echoerr*
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 880d770..8812496 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt*      For Vim version 7.0aa.  Last change: 2004 Jul 05
+*todo.txt*      For Vim version 7.0aa.  Last change: 2004 Jul 09
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -30,78 +30,21 @@
 							*known-bugs*
 -------------------- Known bugs and current work -----------------------
 
+:syn sync ccomment asdf gives a warning without a line number.
+
+@: doesn't work if cmdline has a ^M, requires using ^V. (Tim Chase)
+
+Mac: Compiling --enable-gui=athena doesn't work.  Try to fix without disabling
+Carbon.  Otherwise adjust configure to disable darwin. (raf)
+
+Mac: "make install" doesn't install.
+
+Make aap build script work again.
+
+
 For version 7.0:
 -   Include many PATCHES:
-    8   ":hardcopy":
-	- support printing multi-byte characters.  Patch from Motonobu
-	  Ichimura.  New (better) patch from Mike Williams (2004 Jan 20)
-	  Updated patch: http://www.eandem.co.uk/mrw/vim/special/index.html
-    7   Add patch from Wall for this one ( ~/Mail/oldmail/wall/in.00019 ):
-	'flipcase' variable: upper/lowercase pairs.
-	Insert comma's between pairs and allow a range, make it look like
-	'isfname'.  E.g. ":set flipcase=a-zA-Z,xX,23-33:143-153".  The colon to
-	separate the from and to part is optional.
-	Resp: no time now.
-    8   Add GTK 2.3 file dialog support.  Patch by Grahame Bowland, 2004 Mar 15,
-	but it doesn't use "initdir" or "dflt". (will update patch)
-    8   Add ":n" to fnamemodify(): normalize path, remove "../" when possible.
-	Aric Blumer has a patch for this.
-	He will update the patch for 6.3.
-    8   Add buffer-local autocommands?  Reduces overhead for autocommands that
-	trigger often (inserting a character, switching mode).
-	    :au Event <buffer> do-something
-	E.g.:
-	    :au BufEnter <buffer> menu enable ...
-	    :au BufLeave <buffer> menu disable ...
-	Patch from Yakov Lerner, including test (2004 Jan 7).
-        He'll send updated patch.
-    Autocommands:
-	VimResized	    - When the Vim window has been resized (SIGWINCH)
-	  patch from Yakov Lerner, 2003 July 24.
-	  He'll write documentation and send updated patch.
-    7   Completion of network shares, patch by Yasuhiro Matsumoto.
-	Update 2004 Jun 17.
-	How does this work?  Missing comments.
-    gettext()		Translate a message.  (Patch from Yasuhiro Matsumoto)
-			Update 2004 Jun 17
-			Missing docs.  Search in 'runtimepath'?
-			How to get the messages into the .po files?
-    8   Make it possible to delete marks.  Charles Campbell has a patch that
-	does this with the markclear() function (2004 Jan 9).
-	And the ":delmark" command (2004 Feb 9)
-	http://mysite.verizon.net/astronaut/vim/index.html#Patch
-	~/tmp/ptch.delmark.bz2
-	~/tmp/ptch.markclear
-	Implement setmark(markname, lnum, col [, filename]) instead?
-    --- responses above --
-    7   Make "5dd" on last-but-one-line not delete anything (Vi compatible).
-	Add flag in 'cpoptions' for this.  When not present, "2dd" in the last
-	line should delete the last line.  Patch from greenx 2002 Apr 11.
-    8   Accelerators don't work in a dialog.  Include patch from Martin Dalecki
-	(Jan 3, tested by David Harrison).  Should work with Alt-o then.
-    7   Use accelerators for the Motif file selection dialog.  Patch from
-	Martin Dalecki 2002 Jan 11.
-    8   Add a few more command names to the menus.  Patch from Jiri Brezina
-	(28 feb 2002).
-    7   ATTENTION dialog choices are more logical when "Delete it' appears
-	before "Quit".  Patch by Robert Webb, 2004 May 3.
-    -   Include flipcase patch: ~/vim/patches/wall.flipcase2 ?  Make it work
-	for multi-byte characters.
-    -   Win32: add options to print dialog.  Patch from Vipin Aravind.
-    -   Patch to add highlighting for whitespace. (Tom Schumm, 2003 Jul 5)
-	use the patch that keeps using HLF_8 if HLF_WS has not
-	been given values.
-	Add section in help files for these highlight groups?
-    8   "fg" and "bg" don't work in an xterm.  Get default colors from xterm
-	with an ESC sequence.  Ideas in: ~/vim/patches/vikas.xtermcolors .
-    7   Add "DefaultFG" and "DefaultBG" for the colors of the menu. (Martin
-	Dalecki has a patch for Motif)
-    -   Add possibility to highlight specific columns (for Fortran).  Or put a
-	line in between columns (e.g. for 'textwidth').
-	Patch to add 'hlcolumn' from Vit Stradal, 2004 May 20.
     8   Add functions:
-	tr(expr, from, to)	translate chars (Patch from Ron Aaron, Apr 8
-				2004)
 	strrep()		Repeat a string (patch from Christophe Poucet,
 				2003 Sep 12, also contains XX)
 				Alt: repeat(expr, count) werkt ook voor lists.
@@ -140,7 +83,75 @@
 	search()		Add optional offset argument.
 				Add 'n' flag.  (patch from Nikolai Weibull
 				2003 Jan 13)
-	---
+    8   Make it possible to delete marks.  Charles Campbell has a patch that
+	does this with the markclear() function (2004 Jan 9).
+	And the ":delmark" command (2004 Feb 9)
+	http://mysite.verizon.net/astronaut/vim/index.html#Patch
+	~/tmp/ptch.delmark.bz2
+	~/tmp/ptch.markclear
+	Implement setmark(markname, lnum [, col [, filename]]) instead?
+	When "lnum" is zero delete the mark.
+	When "filename" has no wildcards and there is no matching buffer, add
+	the buffer (unlisted).
+    Patch for \xnn (Ciaran McCreesh)  2004 Jul 7
+    --- awaiting updated patch ---
+    7   Add patch from Wall for this one ( ~/Mail/oldmail/wall/in.00019 ):
+	'flipcase' variable: upper/lowercase pairs.
+	Insert comma's between pairs and allow a range, make it look like
+	'isfname'.  E.g. ":set flipcase=a-zA-Z,xX,23-33:143-153".  The colon to
+	separate the from and to part is optional.
+	Resp: no time now.
+    8   Add GTK 2.3 file dialog support.  Patch by Grahame Bowland, 2004 Mar 15,
+	but it doesn't use "initdir" or "dflt". (will update patch)
+    8   Add ":n" to fnamemodify(): normalize path, remove "../" when possible.
+	Aric Blumer has a patch for this.
+	He will update the patch for 6.3.
+    8   Add buffer-local autocommands?  Reduces overhead for autocommands that
+	trigger often (inserting a character, switching mode).
+	    :au Event <buffer> do-something
+	E.g.:
+	    :au BufEnter <buffer> menu enable ...
+	    :au BufLeave <buffer> menu disable ...
+	Patch from Yakov Lerner, including test (2004 Jan 7).
+        He'll send updated patch.
+    Autocommands:
+	VimResized	    - When the Vim window has been resized (SIGWINCH)
+	  patch from Yakov Lerner, 2003 July 24.
+	  He'll write documentation and send updated patch.
+    7   Completion of network shares, patch by Yasuhiro Matsumoto.
+	Update 2004 Jun 17.
+	How does this work?  Missing comments.
+    gettext()		Translate a message.  (Patch from Yasuhiro Matsumoto)
+			Update 2004 Jun 17
+			Missing docs.  Search in 'runtimepath'?
+			How to get the messages into the .po files?
+    --- did not respond (yet) --
+    7   Make "5dd" on last-but-one-line not delete anything (Vi compatible).
+	Add flag in 'cpoptions' for this.  When not present, "2dd" in the last
+	line should delete the last line.  Patch from greenx 2002 Apr 11.
+    8   Accelerators don't work in a dialog.  Include patch from Martin Dalecki
+	(Jan 3, tested by David Harrison).  Should work with Alt-o then.
+    7   Use accelerators for the Motif file selection dialog.  Patch from
+	Martin Dalecki 2002 Jan 11.
+    8   Add a few more command names to the menus.  Patch from Jiri Brezina
+	(28 feb 2002).
+    7   ATTENTION dialog choices are more logical when "Delete it' appears
+	before "Quit".  Patch by Robert Webb, 2004 May 3.
+    -   Include flipcase patch: ~/vim/patches/wall.flipcase2 ?  Make it work
+	for multi-byte characters.
+    -   Win32: add options to print dialog.  Patch from Vipin Aravind.
+    -   Patch to add highlighting for whitespace. (Tom Schumm, 2003 Jul 5)
+	use the patch that keeps using HLF_8 if HLF_WS has not
+	been given values.
+	Add section in help files for these highlight groups?
+    8   "fg" and "bg" don't work in an xterm.  Get default colors from xterm
+	with an ESC sequence.  Ideas in: ~/vim/patches/vikas.xtermcolors .
+    7   Add "DefaultFG" and "DefaultBG" for the colors of the menu. (Martin
+	Dalecki has a patch for Motif)
+    -   Add possibility to highlight specific columns (for Fortran).  Or put a
+	line in between columns (e.g. for 'textwidth').
+	Patch to add 'hlcolumn' from Vit Stradal, 2004 May 20.
+    8   Add functions:
 	confirm()		add "flags" argument, with 'v' for vertical
 				layout and 'c' for console dialog. (Haegg)
 				Flemming Madsen has a patch for the 'c' flag
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index 3624a7b..9676801 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -1,4 +1,4 @@
-*various.txt*   For Vim version 7.0aa.  Last change: 2004 Jun 18
+*various.txt*   For Vim version 7.0aa.  Last change: 2004 Jul 05
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -8,8 +8,7 @@
 
 1. Various commands		|various-cmds|
 2. Online help			|online-help|
-3. Printing			|printing|
-4. Using Vim like less or more	|less|
+3. Using Vim like less or more	|less|
 
 ==============================================================================
 1. Various commands					*various-cmds*
@@ -722,369 +721,6 @@
   languages in the specified directory.
 
 ==============================================================================
-3. Printing						*printing*
-
-On MS-Windows Vim can print your text on any installed printer.  On other
-systems a PostScript file is produced.  This can be directly sent to a
-PostScript printer.  For other printers a program like ghostscript needs to be
-used.
-
-3.1 PostScript Printing			|postscript-printing|
-3.2 PostScript Printing Encoding	|postscript-print-encoding|
-3.3 PostScript Printing Troubleshooting |postscript-print-trouble|
-3.4 PostScript Utilities		|postscript-print-util|
-3.5 Formfeed Characters			|printing-formfeed|
-
-{not in Vi}
-{only available when compiled with |+printer| feature}
-
-					*:ha* *:hardcopy* *E237* *E238* *E324*
-:[range]ha[rdcopy][!] [arguments]
-			Send [range] lines (default whole file) to the
-			printer.
-
-			On MS-Windows a dialog is displayed to allow selection
-			of printer, paper size etc. To skip the dialog, use
-			the [!].  In this case the printer defined by
-			'printdevice' is used, or, if 'printdevice' is empty,
-			the system default printer.
-
-			For systems other than MS-Windows, PostScript is
-			written in a temp file and 'printexpr' is used to
-			actually print it.  Then [arguments] can be used by
-			'printexpr' through |v:cmdarg|.  Otherwise [arguments]
-			is ignored.  'printoptions' can be used to specify
-			paper size, duplex, etc.
-
-:[range]ha[rdcopy][!] >{filename}
-			As above, but write the resulting PostScript in file
-			{filename}.
-			Things like "%" are expanded |cmdline-special|
-			Careful: An existing file is silently overwritten.
-			{only available when compiled with the |+postscript|
-			feature}
-			On MS-Windows use the "print to file" feature of the
-			printer driver.
-
-Progress is displayed during printing as a page number and a percentage.  To
-abort printing use the interrupt key (CTRL-C or, on MS-systems, CTRL-Break).
-
-Printer output is controlled by the 'printfont' and 'printoptions' options.
-'printheader' specifies the format of a page header.
-
-The printed file is always limited to the selected margins, irrespective of
-the current window's 'wrap' or 'linebreak' settings.  The "wrap" item in
-'printoptions' can be used to switch wrapping off.
-The current highlighting colors are used in the printout, with the following
-considerations:
-1) The normal background is always rendered as white (i.e. blank paper.)
-2) White text or the default foreground is rendered as black, so that it shows
-   up!
-3) If 'background' is "dark", then the colours are darkened to compensate for
-   the fact that otherwise they would be too bright to show up clearly on
-   white paper.
-
-
-3.1 PostScript Printing					*postscript-printing*
-						*E455* *E456* *E457* *E624*
-Provided you have enough disk space there should be no problems generating a
-PostScript file.  You need to have the runtime files correctly installed (if
-you can find the help files, they probably are).
-
-There are currently a number of limitations with PostScript printing:
-
-- 'printfont' - The font name is ignored (the Courier family is always used -
-  it should be available on all PostScript printers) but the font size is
-  used.
-
-- 'printoptions' - The duplex setting is used when generating PostScript
-  output, but it is up to the printer to take notice of the setting.  If the
-  printer does not support duplex printing then it should be silently ignored.
-  Some printers, however, don't print at all.
-
-- 8-bit support - While a number of 8-bit print character encodings are
-  supported it is possible that some characters will not print.  Whether a
-  character will print depends on the font in the printer knowing the
-  character.  Missing characters will be replaced with an upside down question
-  mark, or a space if that character is also not known by the font.  It may be
-  possible to get all the characters in an encoding to print by installing a
-  new version of the Courier font family.
-
-- Multi-byte support - Currently VIM will try to convert multi-byte characters
-  to the 8-bit encoding specified by 'printencoding' (or latin1 if it is
-  empty).  Any characters that are not successfully converted are shown as
-  unknown characters.  Printing will fail if VIM cannot convert the multi-byte
-  to the 8-bit encoding.
-
-
-3.2 Custom 8-bit Print Character Encodings	*postscript-print-encoding*
-								*E618* *E619*
-To use your own print character encoding when printing 8-bit character data
-you need to define your own PostScript font encoding vector.  Details on how
-to to define a font encoding vector is beyond the scope of this help file, but
-you can find details in the PostScript Language Reference Manual, 3rd Edition,
-published by Addison-Wesley and available in PDF form at
-http://www.adobe.com/.  The following describes what you need to do for VIM to
-locate and use your print character encoding.
-
-i.   Decide on a unique name for your encoding vector, one that does not clash
-     with any of the recognized or standard encoding names that VIM uses (see
-     |encoding-names| for a list), and that no one else is likely to use.
-ii.  Copy $VIMRUNTIME/print/latin1.ps to the print subdirectory in your
-     'runtimepath' and rename it with your unique name.
-iii. Edit your renamed copy of latin1.ps, replacing all occurrences of latin1
-     with your unique name (don't forget the line starting %%Title:), and
-     modify the array of glyph names to define your new encoding vector.  The
-     array must have exactly 256 entries or you will not be able to print!
-iv.  Within VIM, set 'printencoding' to your unique encoding name and then
-     print your file.  VIM will now use your custom print character encoding.
-
-VIM will report an error with the resource file if you change the order or
-content of the first 3 lines, other than the name of the encoding on the line
-starting %%Title: or the version number on the line starting %%Version:.
-
-[Technical explanation for those that know PostScript - VIM looks for a file
-with the same name as the encoding it will use when printing.  The file
-defines a new PostScript Encoding resource called /VIM-name, where name is the
-print character encoding VIM will use.]
-
-
-3.3 PostScript Printing Troubleshooting		*postscript-print-trouble*
-									*E621*
-Usually the only sign of a problem when printing with PostScript is that your
-printout does not appear.  If you are lucky you may get a printed page that
-tells you the PostScript operator that generated the error that prevented the
-print job completing.
-
-There are a number of possible causes as to why the printing may have failed:
-
-- Wrong version of the prolog resource file.  The prolog resource file
-  contains some PostScript that VIM needs to be able to print.  Each version
-  of VIM needs one particular version.  Make sure you have correctly installed
-  the runtime files, and don't have any old versions of a file called prolog
-  in the print directory in your 'runtimepath' directory.
-
-- Paper size.  Some PostScript printers will abort printing a file if they do
-  not support the requested paper size.  By default VIM uses A4 paper.  Find
-  out what size paper your printer normally uses and set the appropriate paper
-  size with 'printoptions'.  If you cannot find the name of the paper used,
-  measure a sheet and compare it with the table of supported paper sizes listed
-  for 'printoptions', using the paper that is closest in both width AND height.
-  Note: The dimensions of actual paper may vary slightly from the ones listed.
-  If there is no paper listed close enough, then you may want to try psresize
-  from PSUtils, discussed below.
-
-- Two-sided printing (duplex).  Normally a PostScript printer that does not
-  support two-sided printing will ignore any request to do it.  However, some
-  printers may abort the job altogether.  Try printing with duplex turned off.
-  Note: Duplex prints can be achieved manually using PS utils - see below.
-
-- Collated printing.  As with Duplex printing, most PostScript printers that
-  do not support collating printouts will ignore a request to do so.  Some may
-  not.  Try printing with collation turned off.
-
-- Syntax highlighting.  Some print management code may prevent the generated
-  PostScript file from being printed on a black and white printer when syntax
-  highlighting is turned on, even if solid black is the only color used.  Try
-  printing with syntax highlighting turned off.
-
-A safe printoptions setting to try is: >
-
-	:set printoptions=paper:A4,duplex:off,collate:n,syntax:n
-
-Replace "A4" with the paper size that best matches your printer paper.
-
-
-3.4 PostScript Utilities			*postscript-print-util*
-
-3.4.1 Ghostscript
-
-Ghostscript is a PostScript and PDF interpreter that can be used to display
-and print on non-PostScript printers PostScript and PDF files.  It can also
-generate PDF files from PostScript.
-
-Ghostscript will run on a wide variety of platforms.
-
-There are three available versions:
-
-- AFPL Ghostscript (formerly Aladdin Ghostscript) which is free for
-  non-commercial use.  It can be obtained from:
-
-    http://www.cs.wisc.edu/~ghost/
-
-- GNU Ghostscript which is available under the GNU General Public License.  It
-  can be obtained from:
-
-    ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/gnu/
-
-- A commercial version for inclusion in commercial products.
-
-Additional information on Ghostscript can also be found at:
-
-  http://www.ghostscript.com/
-
-Support for a number of non PostScript printers is provided in the
-distribution as standard, but if you cannot find support for your printer
-check the Ghostscript site for other printers not included by default.
-
-
-3.4.2 Ghostscript Previewers.
-
-The interface to Ghostscript is very primitive so a number of graphical front
-ends have been created.  These allow easier PostScript file selection,
-previewing at different zoom levels, and printing.  Check supplied
-documentation for full details.
-
-X11
-
-- Ghostview.  Obtainable from:
-
-    http://www.cs.wisc.edu/~ghost/gv/
-
-- gv.  Derived from Ghostview.  Obtainable from:
-
-    http://wwwthep.physik.uni-mainz.de/~plass/gv/
-
-  Copies (possibly not the most recent) can be found at:
-
-    http://www.cs.wisc.edu/~ghost/gv/
-
-OpenVMS
-
-- Is apparently supported in the main code now (untested).  See:
-
-    http://wwwthep.physik.uni-mainz.de/~plass/gv/
-
-Windows and OS/2
-
-- GSview.  Obtainable from:
-
-    http://www.cs.wisc.edu/~ghost/gsview/
-
-DOS
-
-- ps_view.  Obtainable from:
-
-    ftp://ftp.pg.gda.pl/pub/TeX/support/ps_view/
-    ftp://ftp.dante.de/tex-archive/support/ps_view/
-
-Linux
-
-- GSview.  Linux version of the popular Windows and OS/2 previewer.
-  Obtainable from:
-
-    http://www.cs.wisc.edu/~ghost/gsview/
-
-- BMV.  Different from Ghostview and gv in that it doesn't use X but svgalib.
-  Obtainable from:
-
-    ftp://sunsite.unc.edu/pub/Linux/apps/graphics/viewers/svga/bmv-1.2.tgz
-
-
-3.4.3 PSUtils
-
-PSUtils is a collection of utility programs for manipulating PostScript
-documents.  Binary distributions are available for many platforms, as well as
-the full source.  PSUtils can be found at:
-
-  http://knackered.org/angus/psutils
-
-The utilities of interest include:
-
-- psnup.     Convert PS files for N-up printing.
-- psselect.  Select page range and order of printing.
-- psresize.  Change the page size.
-- psbook.    Reorder and lay out pages ready for making a book.
-
-The output of one program can be used as the input to the next, allowing for
-complex print document creation.
-
-
-N-UP PRINTING
-
-The psnup utility takes an existing PostScript file generated from VIM and
-convert it to an n-up version.  The simplest way to create a 2-up printout is
-to first create a PostScript file with: >
-
-	:hardcopy > test.ps
-
-Then on your command line execute: >
-
-	psnup -n 2 test.ps final.ps
-
-Note: You may get warnings from some Ghostscript previewers for files produced
-by psnup - these may safely be ignored.
-
-Finally print the file final.ps to your PostScript printer with your
-platform's print command.  (You will need to delete the two PostScript files
-afterwards yourself.)  'printexpr' could be modified to perform this extra
-step before printing.
-
-
-ALTERNATE DUPLEX PRINTING
-
-It is possible to achieve a poor man's version of duplex printing using the PS
-utility psselect.  This utility has options -e and -o for printing just the
-even or odd pages of a PS file respectively.
-
-First generate a PS file with the 'hardcopy' command, then generate a new
-files with all the odd and even numbered pages with: >
-
-	psselect -o test.ps odd.ps
-	psselect -e test.ps even.ps
-
-Next print odd.ps with your platform's normal print command.  Then take the
-print output, turn it over and place it back in the paper feeder.  Now print
-even.ps with your platform's print command.  All the even pages should now
-appear on the back of the odd pages.
-
-There a couple of points to bear in mind:
-
-1. Position of the first page.  If the first page is on top of the printout
-   when printing the odd pages then you need to reverse the order that the odd
-   pages are printed.  This can be done with the -r option to psselect.  This
-   will ensure page 2 is printed on the back of page 1.
-   Note: it is better to reverse the odd numbered pages rather than the even
-   numbered in case there are an odd number of pages in the original PS file.
-
-2. Paper flipping.  When turning over the paper with the odd pages printed on
-   them you may have to either flip them horizontally (along the long edge) or
-   vertically (along the short edge), as well as possibly rotating them 180
-   degrees.  All this depends on the printer - it will be more obvious for
-   desktop ink jets than for small office laser printers where the paper path
-   is hidden from view.
-
-
-3.5 Formfeed Characters					*printing-formfeed*
-
-By default VIM does not do any special processing of |formfeed| control
-characters.  Setting the 'printoptions' formfeed item will make VIM recognize
-formfeed characters and continue printing the current line at the beginning
-of the first line on a new page.  The use of formfeed characters provides
-rudimentary print control but there are certain things to be aware of.
-
-VIM will always start printing a line (including a line number if enabled)
-containing a formfeed character, even if it is the first character on the
-line.  This means if a line starting with a formfeed character is the first
-line of a page then VIM will print a blank page.
-
-Since the line number is printed at the start of printing the line containing
-the formfeed character, the remainder of the line printed on the new page
-will not have a line number printed for it (in the same way as the wrapped
-lines of a long line when wrap in 'printoptions' is enabled).
-
-If the formfeed character is the last character on a line, then printing will
-continue on the second line of the new page, not the first.  This is due to
-VIM processing the end of the line after the formfeed character and moving
-down a line to continue printing.
-
-Due to the points made above it is recommended that when formfeed character
-processing is enabled, printing of line numbers is disabled, and that form
-feed characters are not the last character on a line.  Even then you may need
-to adjust the number of lines before a formfeed character to prevent
-accidental blank pages.
-
-==============================================================================
 4. Using Vim like less or more					*less*
 
 If you use the less or more program to view a file, you don't get syntax
diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt
index 8ac96b7..96f28c3 100644
--- a/runtime/doc/version7.txt
+++ b/runtime/doc/version7.txt
@@ -79,6 +79,13 @@
 The |:mzscheme| command can be used to execute MzScheme commands.
 The |:mzfile| command can be used to execute an MzScheme script file.
 
+Printing multi-byte text				*new-print-multi-byte*
+------------------
+
+The |:hardcopy| command now supports printing multi-byte characters.
+The 'printmbcharset' and 'printmbfont' options are used for this.
+Also see |postscript-cjk-printing|.  (Mike Williams)
+
 
 Various new items					*new-items-7*
 -----------------
@@ -98,27 +105,31 @@
 'numberwidth'		Minimal width of the space used for the 'number'
 			option. (Emmanuel Renieris)
 'mzquantum'		Time in msec to schedule MzScheme threads.
+'printmbcharset'	CJK character set to be used for :hardcopy
+'printmbfont'		font names to be used for CJK output of :hardcopy
 
 
 Ex commands: ~
 
 Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
 
-:startreplace		Start Replace mode. (Charles Campbell)
+|:startreplace|		Start Replace mode. (Charles Campbell)
 
-:0file			Removes the name of the buffer. (Charles Campbell)
+|:0file|		Removes the name of the buffer. (Charles Campbell)
 
 
 New functions: ~
 
+tr(expr, from, to)	|tr()| Translate characters. (Ron Aaron)
+
 
 New autocommand events: ~
 
-InsertEnter		starting Insert or Replace mode
-InsertChange		going from Insert to Replace mode or back
-InsertLeave		leaving Insert or Replace mode
+|InsertEnter|		starting Insert or Replace mode
+|InsertChange|		going from Insert to Replace mode or back
+|InsertLeave|		leaving Insert or Replace mode
 
-ColorScheme		after loading a color scheme
+|ColorScheme|		after loading a color scheme
 
 
 New Syntax/Indent/FTplugin files: ~
@@ -143,6 +154,8 @@
 
 ":helpgrep" accepts a language specifier after the pattern: "pat@it".
 
+Move the help for printing to a separate help file.  It's quite a lot now.
+
 ":breakadd here" and ":breakdel here" can be used to set or delete a
 breakpoint at the cursor.
 
diff --git a/runtime/doc/vimtutor.man b/runtime/doc/vimtutor.man
index c36b1c1..8bc4a80 100644
--- a/runtime/doc/vimtutor.man
+++ b/runtime/doc/vimtutor.man
@@ -1,9 +1,7 @@
+VIMTUTOR(1)                                                        VIMTUTOR(1)
 
 
 
-VIMTUTOR(1)                                           VIMTUTOR(1)
-
-
 NAME
        vimtutor - the Vim tutor
 
@@ -11,18 +9,17 @@
        vimtutor [language]
 
 DESCRIPTION
-       Vimtutor  starts  the Vim tutor.  It copies the tutor file
-       first, so that it can be  modified  without  changing  the
-       original file.
+       Vimtutor starts the Vim tutor.  It copies the tutor file first, so that
+       it can be modified without changing the original file.
 
-       The Vimtutor is useful for people that want to learn their
-       first Vim commands.
+       The Vimtutor is useful for people that want to learn  their  first  Vim
+       commands.
 
-       The optional [language] argument is the two-letter name of
-       a language, like "it" or "es".  If the [language] argument
-       is missing, the language of the  current  locale  will  be
-       used.   If  a tutor in this language is available, it will
-       be used.  Otherwise the English version will be used.
+       The  optional [language] argument is the two-letter name of a language,
+       like "it" or "es".  If the [language] argument is missing, the language
+       of  the  current  locale  will be used.  If a tutor in this language is
+       available, it will be used.  Otherwise  the  English  version  will  be
+       used.
 
        Vim is always started in Vi compatible mode.
 
@@ -31,36 +28,19 @@
                       The Vimtutor text file(s).
 
        /usr/local/lib/vim/tutor/tutor.vim
-                      The Vim script used to  copy  the  Vimtutor
-                      text file.
+                      The Vim script used to copy the Vimtutor text file.
 
 AUTHOR
-       The  Vimtutor  was originally written for Vi by Michael C.
-       Pierce and Robert K. Ware, Colorado School of Mines  using
-       ideas  supplied  by  Charles Smith, Colorado State Univer-
-       sity.  E-mail: bware@mines.colorado.edu.
-       It was modified for Vim by Bram Moolenaar.  For the  names
-       of the translators see the tutor files.
+       The  Vimtutor  was  originally  written for Vi by Michael C. Pierce and
+       Robert K. Ware, Colorado  School  of  Mines  using  ideas  supplied  by
+       Charles  Smith,  Colorado  State  University.  E-mail: bware@mines.col-
+       orado.edu.
+       It was modified for Vim by Bram Moolenaar.  For the names of the trans-
+       lators see the tutor files.
 
 SEE ALSO
        vim(1)
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-                           2001 April 2                         1
-
-
+                                 2001 April 2                      VIMTUTOR(1)
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 919efd7..19669fb 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
 " Vim support file to detect file types
 "
 " Maintainer:	Bram Moolenaar <Bram@vim.org>
-" Last Change:	2004 Jul 01
+" Last Change:	2004 Jul 06
 
 " Listen very carefully, I will say this only once
 if exists("did_load_filetypes")
@@ -205,13 +205,20 @@
 au BufNewFile,BufRead *.vbs,*.dsm,*.ctl		setf vb
 
 " Batch file for MSDOS.
-au BufNewFile,BufRead *.bat,*.btm,*.sys		setf dosbatch
+au BufNewFile,BufRead *.bat,*.sys		setf dosbatch
 " *.cmd is close to a Batch file, but on OS/2 Rexx files also use *.cmd.
 au BufNewFile,BufRead *.cmd
 	\ if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif
 
 " Batch file for 4DOS
-au BufNewFile,BufRead *.btm			setf btm
+au BufNewFile,BufRead *.btm			call <SID>FTbtm()
+fun! <SID>FTbtm()
+  if exists("g:dosbatch_syntax_for_btm") && g:dosbatch_syntax_for_btm
+    setf dosbatch
+  else
+    setf btm
+  endif
+endfun
 
 " BC calculator
 au BufNewFile,BufRead *.bc			setf bc
diff --git a/runtime/ftplugin/abaqus.vim b/runtime/ftplugin/abaqus.vim
index f63962f..17985b3 100644
--- a/runtime/ftplugin/abaqus.vim
+++ b/runtime/ftplugin/abaqus.vim
@@ -1,7 +1,7 @@
 " Vim filetype plugin file
 " Language:     Abaqus finite element input file (www.abaqus.com)
 " Maintainer:   Carl Osterwisch <osterwischc@asme.org>
-" Last Change:  2004 May
+" Last Change:  2004 Jul 06
 
 " Only do this when not done yet for this buffer
 if exists("b:did_ftplugin") | finish | endif
@@ -27,6 +27,10 @@
 " Remove characters up to the first = when evaluating filenames
 setlocal includeexpr=substitute(v:fname,'.\\{-}=','','')
 
+" Remove comma from valid filename characters since it is used to
+" separate keyword parameters
+setlocal isfname-=,
+
 " Define format of comment lines (see 'formatoptions' for uses)
 setlocal comments=:**
 setlocal commentstring=**%s
diff --git a/runtime/ftplugin/btm.vim b/runtime/ftplugin/btm.vim
new file mode 100644
index 0000000..d3dc5b7
--- /dev/null
+++ b/runtime/ftplugin/btm.vim
@@ -0,0 +1,12 @@
+" Vim filetype plugin file
+" Language:	BTM
+" Maintainer:	Bram Moolenaar <Bram@vim.org>
+" Last Change:	2004 Jul 06
+
+" Only do this when not done yet for this buffer
+if exists("b:did_ftplugin")
+  finish
+endif
+
+" Behaves just like dosbatch
+runtime! ftplugin/dosbatch.vim ftplugin/dosbatch_*.vim ftplugin/dosbatch/*.vim
diff --git a/runtime/ftplugin/config.vim b/runtime/ftplugin/config.vim
index e4e1a41..427d0ed 100644
--- a/runtime/ftplugin/config.vim
+++ b/runtime/ftplugin/config.vim
@@ -1,7 +1,7 @@
 " Vim filetype plugin file
 " Language:	config
 " Maintainer:	Dan Sharp <dwsharp at hotmail dot com>
-" Last Changed: 2003 Sep 29
+" Last Changed: 2004 Jul 08
 " URL:		http://mywebpage.netscape.com/sharppeople/vim/ftplugin
 
 if exists("b:did_ftplugin") | finish | endif
@@ -30,7 +30,7 @@
 
 " Change the :browse e filter to primarily show configure-related files.
 if has("gui_win32")
-    let  b:browsefilter="Configure Scripts (configure.*)\tconfigure.*\n" .
+    let  b:browsefilter="Configure Scripts (configure.*, config.*)\tconfigure*;config.*\n" .
 		\	s:browsefilter
 endif
 
diff --git a/runtime/ftplugin/dosbatch.vim b/runtime/ftplugin/dosbatch.vim
index 39a83c4..91d57d9 100644
--- a/runtime/ftplugin/dosbatch.vim
+++ b/runtime/ftplugin/dosbatch.vim
@@ -17,5 +17,5 @@
 
 " Define patterns for the browse file filter
 if has("gui_win32") && !exists("b:browsefilter")
-  let b:browsefilter = "DOS Batch Files (*.bat, *.cmd)\t*.bat;*.cmd\nAll Files (*.*)\t*.*\n"
+  let b:browsefilter = "DOS Batch Files (*.bat, *.btm, *.cmd)\t*.bat;*.btm;*.cmd\nAll Files (*.*)\t*.*\n"
 endif
diff --git a/runtime/ftplugin/html.vim b/runtime/ftplugin/html.vim
index 7334b15..80b04cd 100644
--- a/runtime/ftplugin/html.vim
+++ b/runtime/ftplugin/html.vim
@@ -1,7 +1,7 @@
 " Vim filetype plugin file
 " Language:	html
 " Maintainer:	Dan Sharp <dwsharp at hotmail dot com>
-" Last Changed: 2004 May 11
+" Last Changed: 2004 Jul 08
 " URL:		http://mywebpage.netscape.com/sharppeople/vim/ftplugin
 
 if exists("b:did_ftplugin") | finish | endif
@@ -26,7 +26,7 @@
 
 " Change the :browse e filter to primarily show HTML-related files.
 if has("gui_win32")
-    let  b:browsefilter="HTML Files (*.html,*.htm)\t*.htm*\n" .
+    let  b:browsefilter="HTML Files (*.html,*.htm)\t*.htm;*.html\n" .
 		\	"JavaScript Files (*.js)\t*.js\n" .
 		\	"Cascading StyleSheets (*.css)\t*.css\n" .
 		\	"All Files (*.*)\t*.*\n"
diff --git a/runtime/ftplugin/jsp.vim b/runtime/ftplugin/jsp.vim
index 7c6ac84..4968aab 100644
--- a/runtime/ftplugin/jsp.vim
+++ b/runtime/ftplugin/jsp.vim
@@ -1,7 +1,7 @@
 " Vim filetype plugin file
 " Language:	jsp
 " Maintainer:	Dan Sharp <dwsharp at hotmail dot com>
-" Last Changed: 2003 Sep 29
+" Last Changed: 2004 Jul 08
 " URL:		http://mywebpage.netscape.com/sharppeople/vim/ftplugin
 
 if exists("b:did_ftplugin") | finish | endif
@@ -14,7 +14,7 @@
 " Define some defaults in case the included ftplugins don't set them.
 let s:undo_ftplugin = ""
 let s:browsefilter = "Java Files (*.java)\t*.java\n" .
-	    \	 "HTML Files (*.html, *.htm)\t*.htm*\n" .
+	    \	 "HTML Files (*.html, *.htm)\t*.html;*.htm\n" .
 	    \	 "All Files (*.*)\t*.*\n"
 let s:match_words = ""
 
diff --git a/runtime/ftplugin/php.vim b/runtime/ftplugin/php.vim
index a1c7329..5df7872 100644
--- a/runtime/ftplugin/php.vim
+++ b/runtime/ftplugin/php.vim
@@ -1,7 +1,7 @@
 " Vim filetype plugin file
 " Language:	php
 " Maintainer:	Dan Sharp <dwsharp at hotmail dot com>
-" Last Changed: 2003 Sep 29
+" Last Changed: 2004 Jul 08
 " URL:		http://mywebpage.netscape.com/sharppeople/vim/ftplugin
 
 if exists("b:did_ftplugin") | finish | endif
@@ -13,7 +13,7 @@
 
 " Define some defaults in case the included ftplugins don't set them.
 let s:undo_ftplugin = ""
-let s:browsefilter = "HTML Files (*.html, *.htm)\t*.htm*\n" .
+let s:browsefilter = "HTML Files (*.html, *.htm)\t*.html;*.htm\n" .
 	    \	     "All Files (*.*)\t*.*\n"
 let s:match_words = ""
 
diff --git a/runtime/ftplugin/xhtml.vim b/runtime/ftplugin/xhtml.vim
index 8011529..e03407b 100644
--- a/runtime/ftplugin/xhtml.vim
+++ b/runtime/ftplugin/xhtml.vim
@@ -1,7 +1,7 @@
 " Vim filetype plugin file
 " Language:	xhtml
 " Maintainer:	Dan Sharp <dwsharp at hotmail dot com>
-" Last Changed: 2004 May 11
+" Last Changed: 2004 Jul 08
 " URL:		http://mywebpage.netscape.com/sharppeople/vim/ftplugin
 
 if exists("b:did_ftplugin") | finish | endif
@@ -13,7 +13,7 @@
 
 " Define some defaults in case the included ftplugins don't set them.
 let s:undo_ftplugin = ""
-let s:browsefilter = "HTML Files (*.html, *.htm)\t*.htm*\n" .
+let s:browsefilter = "HTML Files (*.html, *.htm)\t*.html;*.htm\n" .
 	    \	     "XML Files (*.xml)\t*.xml\n" .
 	    \	     "All Files (*.*)\t*.*\n"
 let s:match_words = ""
@@ -56,7 +56,7 @@
 
 " Change the :browse e filter to primarily show tcsh-related files.
 if has("gui_win32")
-    let  b:browsefilter=s:browsefilter
+    let  b:browsefilter="XHTML files (*.xhtml, *.xhtm)\t*.xhtml;*.xhtm\n" . s:browsefilter
 endif
 
 " Undo the stuff we changed.
diff --git a/runtime/ftplugin/xslt.vim b/runtime/ftplugin/xslt.vim
index a4b80a6..9580432 100644
--- a/runtime/ftplugin/xslt.vim
+++ b/runtime/ftplugin/xslt.vim
@@ -1,7 +1,7 @@
 " Vim filetype plugin file
 " Language:	xslt
 " Maintainer:	Dan Sharp <dwsharp at hotmail dot com>
-" Last Changed: 2002 Nov 26
+" Last Changed: 2004 Jul 08
 " URL:		http://mywebpage.netscape.com/sharppeople/vim/ftplugin
 
 if exists("b:did_ftplugin") | finish | endif
@@ -12,5 +12,5 @@
 
 " Change the :browse e filter to primarily show xsd-related files.
 if has("gui_win32") && exists("b:browsefilter")
-    let  b:browsefilter="XSLT Files (*.xsl,*.xslt)\t*.xsl,*.xslt\n" . b:browsefilter
+    let  b:browsefilter="XSLT Files (*.xsl,*.xslt)\t*.xsl;*.xslt\n" . b:browsefilter
 endif
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index 98ac00e..85e201c 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -1,7 +1,7 @@
 " These commands create the option window.
 "
 " Maintainer:	Bram Moolenaar <Bram@vim.org>
-" Last Change:	2004 Jul 03
+" Last Change:	2004 Jul 05
 
 " If there already is an option window, jump to that one.
 if bufwinnr("option-window") > 0
@@ -563,18 +563,28 @@
 
 if has("printer")
   call <SID>Header("printing")
+  call append("$", "printoptions\tlist of items that control the format of :hardcopy output")
+  call <SID>OptionG("popt", &popt)
   call append("$", "printdevice\tname of the printer to be used for :hardcopy")
   call <SID>OptionG("pdev", &pdev)
-  call append("$", "printencoding\tencoding used to print the PostScript file for :hardcopy")
-  call <SID>OptionG("penc", &penc)
-  call append("$", "printexpr\texpression used to print the PostScript file for :hardcopy")
-  call <SID>OptionG("pexpr", &pexpr)
+  if has("postscript")
+    call append("$", "printexpr\texpression used to print the PostScript file for :hardcopy")
+    call <SID>OptionG("pexpr", &pexpr)
+  endif
   call append("$", "printfont\tname of the font to be used for :hardcopy")
   call <SID>OptionG("pfn", &pfn)
   call append("$", "printheader\tformat of the header used for :hardcopy")
   call <SID>OptionG("pheader", &pheader)
-  call append("$", "printoptions\tlist of items that control the format of :hardcopy output")
-  call <SID>OptionG("popt", &popt)
+  if has("postscript")
+    call append("$", "printencoding\tencoding used to print the PostScript file for :hardcopy")
+    call <SID>OptionG("penc", &penc)
+  endif
+  if has("multi_byte")
+    call append("$", "printmbcharset\tthe CJK character set to be used for CJK output from :hardcopy")
+    call <SID>OptionG("pmbcs", &pmbcs)
+    call append("$", "printmbfont\tlist of font names to be used for CJK output from :hardcopy")
+    call <SID>OptionG("pmbfn", &pmbfn)
+  endif
 endif
 
 call <SID>Header("messages and info")
diff --git a/runtime/plugin/NetrwFileHandlers.vim b/runtime/plugin/NetrwFileHandlers.vim
index 401fc58..addba4e 100644
--- a/runtime/plugin/NetrwFileHandlers.vim
+++ b/runtime/plugin/NetrwFileHandlers.vim
@@ -1,33 +1,125 @@
 " NetrwFileHandlers: contains various extension-based file handlers for
-"               netrw's browser
+"                    netrw's browsers' x command
 " Author:	Charles E. Campbell, Jr.
-" Date:		Jul 02, 2004
-" Version:	2
+" Date:		Jul 06, 2004
+" Version:	3
 " ---------------------------------------------------------------------
 
 " NetrwFileHandler_html: handles html when the user hits "x" when the
 "                        cursor is atop a *.html file
-fun! NetrwFileHandler_html(webpage)
-"  call Dfunc("NetrwFileHandler_html(".a:webpage.")")
+fun! NetrwFileHandler_html(pagefile)
+"  call Dfunc("NetrwFileHandler_html(".a:pagefile.")")
 
-  let host= substitute(a:webpage,'^\w\+://\%(\w*@\)\=\(\w\+\)/.*$','\1','e')
-"  call Decho("host<".host.">")
-
-  if host == hostname() || host == substitute(hostname(),'\..*$','','e')
-   let page= substitute(a:webpage,'^\w\+://\%(\w*@\)\=\(\w\+\)/','file://\1/'.expand("$HOME").'/','e')
-  else
-   let page= substitute(a:webpage,'^\w\+://\%(\w*@\)\=\(\w\+\)/','http://\1/','e')
-  endif
+  let page= substitute(a:pagefile,'^','file://','')
 
   if executable("mozilla")
-"  call Decho("executing !mozilla ".page)
+"   call Decho("executing !mozilla ".page)
    exe "!mozilla ".page
   elseif executable("netscape")
-"  call Decho("executing !netscape ".page)
+"   call Decho("executing !netscape ".page)
    exe "!netscape ".page
+  else
+"   call Dret("NetrwFileHandler_html 0")
+   return 0
   endif
 
-"  call Dret("NetrwFileHandler_html")
+"  call Dret("NetrwFileHandler_html 1")
+  return 1
+endfun
+
+" ---------------------------------------------------------------------
+" NetrwFileHandler_htm: handles html when the user hits "x" when the
+"                        cursor is atop a *.htm file
+fun! NetrwFileHandler_htm(pagefile)
+"  call Dfunc("NetrwFileHandler_htm(".a:pagefile.")")
+
+  let page= substitute(a:pagefile,'^','file://','')
+
+  if executable("mozilla")
+"   call Decho("executing !mozilla ".page)
+   exe "!mozilla ".page
+  elseif executable("netscape")
+"   call Decho("executing !netscape ".page)
+   exe "!netscape ".page
+  else
+"   call Dret("NetrwFileHandler_htm 0")
+   return 0
+  endif
+
+"  call Dret("NetrwFileHandler_htm 1")
+  return 1
+endfun
+
+" ---------------------------------------------------------------------
+" NetrwFileHandler_jpg:
+fun! NetrwFileHandler_jpg(jpgfile)
+"  call Dfunc("NetrwFileHandler_jpg(jpgfile<".a:jpgfile.">)")
+
+  if executable("gimp")
+   exe "silent! !gimp -s ".a:jpgfile
+  elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
+   exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".a:jpgfile
+  else
+"   call Dret("NetrwFileHandler_jpg 0")
+   return 0
+  endif
+
+"  call Dret("NetrwFileHandler_jpg 1")
+  return 1
+endfun
+
+" ---------------------------------------------------------------------
+" NetrwFileHandler_gif:
+fun! NetrwFileHandler_gif(giffile)
+"  call Dfunc("NetrwFileHandler_gif(giffile<".a:giffile.">)")
+
+  if executable("gimp")
+   exe "silent! !gimp -s ".a:giffile
+  elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
+   exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".a:giffile
+  else
+"   call Dret("NetrwFileHandler_gif 0")
+   return 0
+  endif
+
+"  call Dret("NetrwFileHandler_gif 1")
+  return 1
+endfun
+
+" ---------------------------------------------------------------------
+" NetrwFileHandler_pnm:
+fun! NetrwFileHandler_pnm(pnmfile)
+"  call Dfunc("NetrwFileHandler_pnm(pnmfile<".a:pnmfile.">)")
+
+  if executable("gimp")
+   exe "silent! !gimp -s ".a:pnmfile
+  elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
+   exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".a:pnmfile
+  else
+"   call Dret("NetrwFileHandler_pnm 0")
+   return 0
+  endif
+
+"  call Dret("NetrwFileHandler_pnm 1")
+  return 1
+endfun
+
+" ---------------------------------------------------------------------
+" NetrwFileHandler_bmp:
+fun! NetrwFileHandler_bmp(bmpfile)
+"  call Dfunc("NetrwFileHandler_bmp(bmpfile<".a:bmpfile.">)")
+
+  if executable("gimp")
+   exe "silent! !gimp -s ".a:bmpfile
+  elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
+   exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".a:bmpfile
+  else
+"   call Dret("NetrwFileHandler_bmp 0")
+   return 0
+  endif
+
+"  call Dret("NetrwFileHandler_bmp 1")
+  return 1
 endfun
 
 " ---------------------------------------------------------------------
diff --git a/runtime/plugin/explorer.vim b/runtime/plugin/explorer.vim
deleted file mode 100644
index e0fcb33..0000000
--- a/runtime/plugin/explorer.vim
+++ /dev/null
@@ -1,1326 +0,0 @@
-"=============================================================================
-" File: explorer.vim
-" Author: M A Aziz Ahmed (aziz@acorn-networks.com - doesn't work)
-" Last Change:	2004 Jun 22
-" Version: 2.5 + changes
-" Additions by Mark Waggoner (waggoner@aracnet.com) et al.
-"-----------------------------------------------------------------------------
-" This file implements a file explorer.
-"-----------------------------------------------------------------------------
-" Normally, this file will reside in the plugins directory and be
-" automatically sourced.  If not, you must manually source this file
-" using :source explorer.vim
-"
-" To use it, just edit a directory (vi dirname) or type :Explore to
-" launch the file explorer in the current window, or :Sexplore to split
-" the current window and launch explorer there.
-"
-" If the current buffer is modified, the window is always split.
-"
-" It is also possible to delete files and rename files within explorer.
-" See :help file-explorer for more details
-"
-"-----------------------------------------------------------------------------
-" Update history removed, it's not very interesting.
-" Contributors were: Doug Potts, Bram Moolenaar, Thomas Köhler
-"=============================================================================
-
-" Has this already been loaded?
-if exists("loaded_explorer")
-  finish
-endif
-let loaded_explorer=1
-
-" Line continuation used here
-let s:cpo_save = &cpo
-set cpo&vim
-
-"---
-" Default settings for global configuration variables
-
-" Split vertically instead of horizontally?
-if !exists("g:explVertical")
-  let g:explVertical=0
-endif
-
-" How big to make the window? Set to "" to avoid resizing
-if !exists("g:explWinSize")
-  let g:explWinSize=15
-endif
-
-" When opening a new file/directory, split below current window (or
-" above)?  1 = below, 0 = to above
-if !exists("g:explSplitBelow")
-  let g:explSplitBelow = &splitbelow
-endif
-
-" Split to right of current window (or to left)?
-" 1 = to right, 0 = to left
-if !exists("g:explSplitRight")
-  let g:explSplitRight = &splitright
-endif
-
-" Start the first explorer window...
-" Defaults to be the same as explSplitBelow
-if !exists("g:explStartBelow")
-  let g:explStartBelow = g:explSplitBelow
-endif
-
-" Start the first explorer window...
-" Defaults to be the same as explSplitRight
-if !exists("g:explStartRight")
-  let g:explStartRight = g:explSplitRight
-endif
-
-" Show detailed help?
-if !exists("g:explDetailedHelp")
-  let g:explDetailedHelp=0
-endif
-
-" Show file size and dates?
-if !exists("g:explDetailedList")
-  let g:explDetailedList=0
-endif
-
-" Format for the date
-if !exists("g:explDateFormat")
-  let g:explDateFormat="%d %b %Y %H:%M"
-endif
-
-" Files to hide
-if !exists("g:explHideFiles")
-  let g:explHideFiles=''
-endif
-
-" Field to sort by
-if !exists("g:explSortBy")
-  let g:explSortBy='name'
-endif
-
-" Segregate directories? 1, 0, or -1
-if !exists("g:explDirsFirst")
-  let g:explDirsFirst=1
-endif
-
-" Segregate items in suffixes option? 1, 0, or -1
-if !exists("g:explSuffixesLast")
-  let g:explSuffixesLast=1
-endif
-
-" Include separator lines between directories, files, and suffixes?
-if !exists("g:explUseSeparators")
-  let g:explUseSeparators=0
-endif
-
-" Execute file handler
-if !exists("g:explFileHandler")
-  if has("win32")
-    " for Win32 use rundll32
-    function! s:explFileHandlerWin32(fn)
-      exec 'silent !start rundll32 url.dll,FileProtocolHandler "'
-		\ . escape(a:fn, '%#') . '"'
-    endfunction
-    let g:explFileHandler = "<SID>explFileHandlerWin32"
-
-  elseif has("unix")
-    " for KDE use kfmclient, for GNUME use gnome-open
-    if executable("kfmclient")
-      let g:explFileHandlerCmd = "kfmclient exec"
-    elseif executable("gnome-open")
-      let g:explFileHandlerCmd = "gnome-open"
-    else
-      let g:explFileHandlerCmd = ""
-    endif
-    if g:explFileHandlerCmd != ""
-      function! s:explFileHandlerUnix(fn)
-	if &shellredir =~ "%s"
-	  let redir = substitute(&shellredir, "%s", "/dev/null", "")
-	else
-	  let redir = &shellredir . "/dev/null"
-	endif
-	" Need to escape % and # but not spaces.
-	exec "silent !" . g:explFileHandlerCmd . " '" . escape(a:fn, '%#') . "'" . redir
-      endfunction
-      let g:explFileHandler = "<SID>explFileHandlerUnix"
-    endif
-  endif
-endif
-
-"---
-" script variables - these are the same across all
-" explorer windows
-
-" characters that must be escaped for a regular expression
-let s:escregexp = '/*^$.~\'
-
-" characters that must be escaped for filenames
-if has("dos16") || has("dos32") || has("win16") || has("win32") || has("os2")
-  let s:escfilename = ' %#'
-else
-  let s:escfilename = ' \%#[]'
-endif
-
-
-" A line to use for separating sections
-let s:separator='"---------------------------------------------------'
-
-"---
-" Create commands
-
-if !exists(':Explore')
-  command -n=? -complete=dir Explore :call s:StartExplorer(0, '<a>')
-endif
-if !exists(':Sexplore')
-  command -n=? -complete=dir Sexplore :call s:StartExplorer(1, '<a>')
-endif
-
-"---
-" Start the explorer using the preferences from the global variables
-"
-function! s:StartExplorer(split, start_dir)
-  let startcmd = "edit"
-  if a:start_dir != ""
-    let fname=a:start_dir
-  else
-    let fname = expand("%:p:h")
-  endif
-  if fname == ""
-    let fname = getcwd()
-  endif
-
-  " Create a variable to use if splitting vertically
-  let splitMode = ""
-  if g:explVertical == 1
-    let splitMode = "vertical"
-  endif
-
-  " Save the user's settings for splitbelow and splitright
-  let savesplitbelow = &splitbelow
-  let savesplitright = &splitright
-
-  if a:split || &modified
-    let startcmd = splitMode . " " . g:explWinSize . "new " . fname
-    let &splitbelow = g:explStartBelow
-    let &splitright = g:explStartRight
-  else
-    let startcmd = "edit " . fname
-  endif
-  silent execute startcmd
-  let &splitbelow = savesplitbelow
-  let &splitright = savesplitright
-endfunction
-
-"---
-" This is the main entry for 'editing' a directory
-"
-function! s:EditDir()
-  " Get out of here right away if this isn't a directory!
-  let name = expand("%")
-  if name == ""
-    let name = expand("%:p")
-  endif
-  if !isdirectory(name)
-    return
-  endif
-
-  " Turn off the swapfile, set the buffer type so that it won't get
-  " written, and so that it will get deleted when it gets hidden.
-  setlocal noreadonly modifiable
-  setlocal noswapfile
-  setlocal buftype=nowrite
-  setlocal bufhidden=delete
-  " Don't wrap around long lines
-  setlocal nowrap
-
-  " No need for any insertmode abbreviations, since we don't allow
-  " insertions anyway!
-  iabc <buffer>
-
-  " Long or short listing?  Use the global variable the first time
-  " explorer is called, after that use the script variable as set by
-  " the interactive user.
-  if exists("s:longlist")
-    let w:longlist = s:longlist
-  else
-    let w:longlist = g:explDetailedList
-  endif
-
-  " Show keyboard shortcuts?
-  if exists("s:longhelp")
-    let w:longhelp = s:longhelp
-  else
-    let w:longhelp = g:explDetailedHelp
-  endif
-
-  " Set the sort based on the global variables the first time.  If you
-  " later change the sort order, it will be retained in the s:sortby
-  " variable for the next time you open explorer
-  let w:sortdirection=1
-  let w:sortdirlabel = ""
-  let w:sorttype = ""
-  if exists("s:sortby")
-    let sortby=s:sortby
-  else
-    let sortby=g:explSortBy
-  endif
-  if sortby =~ "reverse"
-    let w:sortdirection=-1
-    let w:sortdirlabel = "reverse "
-  endif
-  if sortby =~ "date"
-    let w:sorttype = "date"
-  elseif sortby =~ "size"
-    let w:sorttype = "size"
-  else
-    let w:sorttype = "name"
-  endif
-  call s:SetSuffixesLast()
-
-  " If directory is already loaded, don't open it again!
-  if line('$') > 1
-    setlocal readonly nomodifiable
-    return
-  endif
-
-  " Get the complete path to the directory to look at with a slash at
-  " the end.  This also removes "/../" and "/./" things.
-  let b:completePath = s:Path(expand("%:p"))
-
-  " Add a slash at the end
-  if b:completePath !~ '/$'
-    let b:completePath = b:completePath . '/'
-  endif
-
-  " escape special characters for exec commands
-  let b:completePathEsc = escape(b:completePath, s:escfilename)
-  let b:parentDirEsc = substitute(b:completePathEsc, '/[^/]*/$', '/', 'g')
-
-  " Set up syntax highlighting
-  " Something wrong with the evaluation of the conditional though...
-  if has("syntax") && exists("g:syntax_on") && !has("syntax_items")
-    syn match browseSynopsis    "^\"[ -].*"
-    syn match browseDirectory   "[^\"].*/ "
-    syn match browseDirectory   "[^\"].*/$"
-    syn match browseCurDir      "^\"= .*$"
-    syn match browseSortBy      "^\" Sorted by .*$"  contains=browseSuffixInfo
-    syn match browseSuffixInfo  "(.*)$"  contained
-    syn match browseFilter      "^\" Not Showing:.*$"
-    syn match browseFiletime    "««\d\+$"
-    exec('syn match browseSuffixes    "' . b:suffixesHighlight . '"')
-
-    "hi def link browseSynopsis    PreProc
-    hi def link browseSynopsis    Special
-    hi def link browseDirectory   Directory
-    hi def link browseCurDir      Statement
-    hi def link browseSortBy      String
-    hi def link browseSuffixInfo  Type
-    hi def link browseFilter      String
-    hi def link browseFiletime    Ignore
-    hi def link browseSuffixes    Type
-  endif
-
-  " Set filter for hiding files
-  let b:filterFormula=substitute(g:explHideFiles, '\([^\\]\),', '\1\\|', 'g')
-  if b:filterFormula != ''
-    let b:filtering="\nNot showing: " . b:filterFormula
-  else
-    let b:filtering=""
-  endif
-
-  " Show the files
-  call s:ShowDirectory()
-
-  " Set up mappings for this buffer
-  let cpo_save = &cpo
-  set cpo&vim
-  nnoremap <buffer> <cr> :call <SID>EditEntry("","edit")<cr>
-  nnoremap <buffer> -    :exec ("silent e "  . b:parentDirEsc)<cr>
-  if exists("g:explFileHandler")
-    nnoremap <buffer> x    :call <SID>ExecuteEntry()<cr>
-  endif
-  nnoremap <buffer> o    :call <SID>OpenEntry()<cr>
-  nnoremap <buffer> O    :call <SID>OpenEntryPrevWindow()<cr>
-  nnoremap <buffer> p    :call <SID>EditEntry("","pedit")<cr>
-  nnoremap <buffer> ?    :call <SID>ToggleHelp()<cr>
-  nnoremap <buffer> a    :call <SID>ShowAllFiles()<cr>
-  nnoremap <buffer> R    :call <SID>RenameFile()<cr>
-  nnoremap <buffer> D    :. call <SID>DeleteFile()<cr>
-  vnoremap <buffer> D    :call <SID>DeleteFile()<cr>
-  nnoremap <buffer> i    :call <SID>ToggleLongList()<cr>
-  nnoremap <buffer> s    :call <SID>SortSelect()<cr>
-  nnoremap <buffer> r    :call <SID>SortReverse()<cr>
-  nnoremap <buffer> c    :exec "cd ".b:completePathEsc<cr>
-  nnoremap <buffer> <2-leftmouse> :call <SID>DoubleClick()<cr>
-  if exists("*ExplorerCustomMap")
-    call ExplorerCustomMap()
-  endif
-  let &cpo = cpo_save
-
-  " prevent the buffer from being modified
-  setlocal readonly nomodifiable
-endfunction
-
-"---
-" Determine the number of windows open to this buffer number.
-" Care of Yegappan Lakshman.  Thanks!
-fun! s:BufInWindows(bnum)
-  let cnt = 0
-  let winnum = 1
-  while 1
-    let bufnum = winbufnr(winnum)
-    if bufnum < 0
-      break
-    endif
-    if bufnum == a:bnum
-      let cnt = cnt + 1
-    endif
-    let winnum = winnum + 1
-  endwhile
-
-  return cnt
-endfunction
-
-" If this is the only window, open file in a new window
-" Otherwise, open file in the most recently visited window
-"
-function! s:OpenEntryPrevWindow()
-  " Figure out if there are any other windows
-  let n = winnr()
-  wincmd p
-  " No other window?  Then open a new one
-  if n == winnr()
-    call s:OpenEntry()
-  " Other windows exist
-  else
-    " Check if the previous buffer is modified - ask if they want to save!
-    " Was it modified, and is it the only window open to this file
-    if &modified && s:BufInWindows(winbufnr(winnr())) < 2
-      let bufname = bufname(winbufnr(winnr()))
-
-      let action=confirm("Save Changes in " . bufname . "?","&Yes\n&No\n&Cancel")
-      " Yes - try to save - if there is an error, cancel
-      if action == 1
-	let v:errmsg = ""
-	silent w
-	if v:errmsg != ""
-	  echoerr "Unable to write buffer!"
-	  wincmd p
-	  return
-	endif
-      " No, abandon changes
-      elseif action == 2
-	set nomodified
-	echomsg "Warning, abandoning changes in " . bufname
-      " Cancel (or any other result), don't do the open
-      else
-	wincmd p
-	return
-      endif
-    endif
-    wincmd p
-    call s:EditEntry("wincmd p","edit")
-  endif
-endfunction
-
-
-"---
-" Open a file or directory in a new window.
-" Use g:explSplitBelow and g:explSplitRight to decide where to put the
-" split window, and resize the original explorer window if it is
-" larger than g:explWinSize
-"
-function! s:OpenEntry()
-  " Are we on a line with a file name?
-  let l = getline(".")
-  if l =~ '^"'
-    return
-  endif
-
-  " Copy window settings to script settings
-  let s:sortby=w:sortdirlabel . w:sorttype
-  let s:longhelp = w:longhelp
-  let s:longlist = w:longlist
-
-  " Get the window number of the explorer window
-  let n = winnr()
-
-  " Save the user's settings for splitbelow and splitright
-  let savesplitbelow=&splitbelow
-  let savesplitright=&splitright
-
-  " Figure out how to do the split based on the user's preferences.
-  " We want to split to the (left,right,top,bottom) of the explorer
-  " window, but we want to extract the screen real-estate from the
-  " window next to the explorer if possible.
-  "
-  " 'there' will be set to a command to move from the split window
-  " back to the explorer window
-  "
-  " 'back' will be set to a command to move from the explorer window
-  " back to the newly split window
-  "
-  " 'right' and 'below' will be set to the settings needed for
-  " splitbelow and splitright IF the explorer is the only window.
-  "
-  if g:explVertical
-    if g:explSplitRight
-      let there="wincmd h"
-      let back ="wincmd l"
-      let right=1
-      let below=0
-    else
-      let there="wincmd l"
-      let back ="wincmd h"
-      let right=0
-      let below=0
-    endif
-  else
-    if g:explSplitBelow
-      let there="wincmd k"
-      let back ="wincmd j"
-      let right=0
-      let below=1
-    else
-      let there="wincmd j"
-      let back ="wincmd k"
-      let right=0
-      let below=0
-    endif
-  endif
-
-  " Get the file name
-  let fn=s:GetFullFileName()
-
-  " Attempt to go to adjacent window
-  exec(back)
-  " If no adjacent window, set splitright and splitbelow appropriately
-  if n == winnr()
-    let &splitright=right
-    let &splitbelow=below
-  else
-    " found adjacent window - invert split direction
-    let &splitright=!right
-    let &splitbelow=!below
-  endif
-
-  " Create a variable to use if splitting vertically
-  let splitMode = ""
-  if g:explVertical == 1
-    let splitMode = "vertical"
-  endif
-
-  " Is it a directory?  If so, get a real path to it instead of
-  " relative path.  This also removes "/../" and "/./" things.
-  if isdirectory(fn)
-    let fn = fnamemodify(fn, ":p")
-  endif
-
-  " Open the new window
-  exec("silent " . splitMode." sp " . escape(fn,s:escfilename))
-
-  " resize the explorer window if it is larger than the requested size
-  exec(there)
-  if g:explWinSize =~ '[0-9]\+' && winheight("") > g:explWinSize
-    exec("silent ".splitMode." resize ".g:explWinSize)
-  endif
-  exec(back)
-
-  " Restore splitmode settings
-  let &splitbelow=savesplitbelow
-  let &splitright=savesplitright
-
-endfunction
-
-function! s:ExecuteEntry()
-  " Are we on a line with a file name?
-  let l = getline(".")
-  if l =~ '^"'
-    return
-  endif
-
-  " Get the file name
-  let fn = s:GetFullFileName()
-  if has("win32") && fn =~ '^//'
-    let fn = substitute(fn, '/', '\\', 'g')
-  endif
-  exec "call " . g:explFileHandler . "(fn)"
-endfunction
-
-"---
-" Double click with the mouse
-"
-function s:DoubleClick()
-  if expand("<cfile>") =~ '[\\/]$'
-    call s:EditEntry("","edit")		" directory: open in this window
-  else
-    call s:OpenEntryPrevWindow()	" file: open in another window
-  endif
-endfun
-
-"---
-" Open file or directory in the same window as the explorer is
-" currently in
-"
-function! s:EditEntry(movefirst,editcmd)
-  " Are we on a line with a file name?
-  let l = getline(".")
-  if l =~ '^"'
-    return
-  endif
-
-  " Copy window settings to script settings
-  let s:sortby=w:sortdirlabel . w:sorttype
-  let s:longhelp = w:longhelp
-  let s:longlist = w:longlist
-
-  " Get the file name
-  let fn = s:GetFullFileName()
-  if isdirectory(fn)
-    " This removes "/../" and "/./" things.
-    let fn = fnamemodify(fn, ":p")
-  endif
-
-  " Move to desired window if needed
-  exec(a:movefirst)
-  " Edit the file/dir
-  exec(a:editcmd . " " . escape(fn,s:escfilename))
-endfunction
-
-
-"---
-" Create a regular expression out of the suffixes option for sorting
-" and set a string to indicate whether we are sorting with the
-" suffixes at the end (or the beginning)
-"
-function! s:SetSuffixesLast()
-  let b:suffixesRegexp = '\(' . substitute(escape(&suffixes,s:escregexp),',','\\|','g') . '\)$'
-  let b:suffixesHighlight = '^[^"].*\(' . substitute(escape(&suffixes,s:escregexp),',','\\|','g') . '\)\( \|$\)'
-  if has("fname_case")
-    let b:suffixesRegexp = '\C' . b:suffixesRegexp
-    let b:suffixesHighlight = '\C' . b:suffixesHighlight
-  else
-    let b:suffixesRegexp = '\c' . b:suffixesRegexp
-    let b:suffixesHighlight = '\c' . b:suffixesHighlight
-  endif
-  if g:explSuffixesLast > 0 && &suffixes != ""
-    let b:suffixeslast=" (" . &suffixes . " at end of list)"
-  elseif g:explSuffixesLast < 0 && &suffixes != ""
-    let b:suffixeslast=" (" . &suffixes . " at start of list)"
-  else
-    let b:suffixeslast=" ('suffixes' mixed with files)"
-  endif
-endfunction
-
-"---
-" Show the header and contents of the directory
-"
-function! s:ShowDirectory()
-  "Delete all lines
-  1,$d _
-  " Prevent a report of our actions from showing up
-  let oldRep=&report
-  let save_sc = &sc
-  set report=10000 nosc
-
-  " Add the header
-  call s:AddHeader()
-  $d _
-
-  " Display the files
-
-  " Get a list of all the files
-  let files = s:Path(glob(b:completePathEsc . "*"))
-  if files != "" && files !~ "\n$"
-    let files = files . "\n"
-  endif
-
-  " Add the dot files now, making sure "." is not included!
-  let files = files . substitute(s:Path(glob(b:completePathEsc . ".*")), "[^\n]*/./\\=\n", '' , '')
-  if files != "" && files !~ "\n$"
-    let files = files . "\n"
-  endif
-
-  " Are there any files left after filtering?
-  if files != ""
-    normal! mt
-    put =files
-    let b:maxFileLen = 0
-    0
-    /^"=/+1,$g/^/call s:MarkDirs()
-    keepjumps normal! `t
-    call s:AddFileInfo()
-  endif
-
-  normal! zz
-
-  " Move to first directory in the listing
-  0
-  /^"=/+1
-
-  " Do the sort
-  call s:SortListing("Loaded contents of ".b:completePath.". ")
-
-  " Move to first directory in the listing
-  0
-  /^"=/+1
-
-  let &report=oldRep
-  let &sc = save_sc
-
-endfunction
-
-"---
-" Mark which items are directories - called once for each file name
-" must be used only when size/date is not displayed
-"
-function! s:MarkDirs()
-  let oldRep=&report
-  set report=1000
-  "Remove slashes if added
-  s;/$;;e
-  "Removes all the leading slashes and adds slashes at the end of directories
-  s;^.*\\\([^\\]*\)$;\1;e
-  s;^.*/\([^/]*\)$;\1;e
-  "normal! ^
-  let currLine=getline(".")
-  if isdirectory(b:completePath . currLine)
-    s;$;/;
-    let fileLen=strlen(currLine)+1
-  else
-    let fileLen=strlen(currLine)
-    if (b:filterFormula!="") && (currLine =~ b:filterFormula)
-      " Don't show the file if it is to be filtered.
-      d _
-    endif
-  endif
-  if fileLen > b:maxFileLen
-    let b:maxFileLen=fileLen
-  endif
-  let &report=oldRep
-endfunction
-
-"---
-" Make sure a path has proper form
-"
-function! s:Path(p)
-  if has("dos16") || has("dos32") || has("win16") || has("win32") || has("os2")
-    return substitute(a:p,'\\','/','g')
-  else
-    return a:p
-  endif
-endfunction
-
-"---
-" Extract the file name from a line in several different forms
-"
-function! s:GetFullFileNameEsc()
-    return s:EscapeFilename(s:GetFullFileName())
-endfunction
-
-function! s:GetFileNameEsc()
-    return s:EscapeFilename(s:GetFileName())
-endfunction
-
-function! s:EscapeFilename(name)
-    return escape(a:name,s:escfilename)
-endfunction
-
-
-function! s:GetFullFileName()
-  return s:ExtractFullFileName(getline("."))
-endfunction
-
-function! s:GetFileName()
-  return s:ExtractFileName(getline("."))
-endfunction
-
-function! s:ExtractFullFileName(line)
-      let fn=s:ExtractFileName(a:line)
-      if fn == '/'
-	return b:completePath
-      else
-	return b:completePath . s:ExtractFileName(a:line)
-      endif
-endfunction
-
-function! s:ExtractFileName(line)
-  return substitute(strpart(a:line,0,b:maxFileLen),'\s\+$','','')
-endfunction
-
-"---
-" Get the size of the file
-function! s:ExtractFileSize(line)
-  if (w:longlist==0)
-    return getfsize(s:ExtractFileName(a:line))
-  else
-    return strpart(a:line,b:maxFileLen+2,b:maxFileSizeLen)
-  endif
-endfunction
-
-"---
-" Get the date of the file as a number
-function! s:ExtractFileDate(line)
-  if w:longlist==0
-    return getftime(s:ExtractFileName(a:line))
-  else
-    return strpart(matchstr(strpart(a:line,b:maxFileLen+b:maxFileSizeLen+4),"««.*"),2) + 0
-  endif
-endfunction
-
-
-"---
-" Add the header with help information
-"
-function! s:AddHeader()
-    let save_f=@f
-    1
-    if w:longhelp==1
-      let @f="\" <enter> : open file or directory\n"
-	   \."\" o : open new window for file/directory\n"
-	   \."\" O : open file in previously visited window\n"
-	   \."\" p : preview the file\n"
-      if exists("g:explFileHandler")
-	let @f=@f."\" x : execute file or directory\n"
-      endif
-      let @f=@f
-	   \."\" i : toggle size/date listing\n"
-	   \."\" s : select sort field    r : reverse sort\n"
-	   \."\" - : go up one level      c : cd to this dir\n"
-	   \."\" R : rename file          D : delete file\n"
-	   \."\" :help file-explorer for detailed help\n"
-    else
-      let @f="\" Press ? for keyboard shortcuts\n"
-    endif
-    let @f=@f."\" Sorted by ".w:sortdirlabel.w:sorttype.b:suffixeslast.b:filtering."\n"
-    let @f=@f."\"= ".b:completePath."\n"
-    put! f
-    let @f=save_f
-endfunction
-
-
-"---
-" Show the size and date for each file
-"
-function! s:AddFileInfo()
-  let save_sc = &sc
-  set nosc
-
-  " Mark our starting point
-  normal! mt
-
-  call s:RemoveSeparators()
-
-  " Remove all info
-  0
-  /^"=/+1,$g/^/call setline(line("."),s:GetFileName())
-
-  " Add info if requested
-  if w:longlist==1
-    " Add file size and calculate maximum length of file size field
-    let b:maxFileSizeLen = 0
-    0
-    /^"=/+1,$g/^/let fn=s:GetFullFileName() |
-		   \let fileSize=getfsize(fn) |
-		   \let fileSizeLen=strlen(fileSize) |
-		   \if fileSizeLen > b:maxFileSizeLen |
-		   \  let b:maxFileSizeLen = fileSizeLen |
-		   \endif |
-		   \exec "normal! ".(b:maxFileLen-strlen(getline("."))+2)."A \<esc>" |
-		   \exec 's/$/'.fileSize.'/'
-
-    " Right justify the file sizes and
-    " add file modification date
-    0
-    /^"=/+1,$g/^/let fn=s:GetFullFileName() |
-		   \exec "normal! A \<esc>$b".(b:maxFileLen+b:maxFileSizeLen-strlen(getline("."))+3)."i \<esc>\"_x" |
-		   \exec 's/$/ '.escape(s:FileModDate(fn), '/').'/'
-    setlocal nomodified
-  endif
-
-  call s:AddSeparators()
-
-  " return to start
-  keepjumps normal! `t
-
-  let &sc = save_sc
-endfunction
-
-
-"----
-" Get the modification time for a file
-"
-function! s:FileModDate(name)
-  let filetime=getftime(a:name)
-  if filetime > 0
-    return strftime(g:explDateFormat,filetime) . " ««" . filetime
-  else
-    return ""
-  endif
-endfunction
-
-"---
-" Delete a file or files
-"
-function! s:DeleteFile() range
-  let oldRep = &report
-  let &report = 1000
-
-  let filesDeleted = 0
-  let stopDel = 0
-  let delAll = 0
-  let currLine = a:firstline
-  let lastLine = a:lastline
-  setlocal noreadonly modifiable
-
-  while ((currLine <= lastLine) && (stopDel==0))
-    exec(currLine)
-    let fileName=s:GetFullFileName()
-    if isdirectory(fileName)
-      echo fileName." : Directory deletion not supported yet"
-      let currLine = currLine + 1
-    else
-      if delAll == 0
-	let sure=input("Delete ".fileName." (y/n/a/q)? ")
-	if sure=="a"
-	  let delAll = 1
-	endif
-      endif
-      if (sure=="y") || (sure=="a")
-	let success=delete(fileName)
-	if success!=0
-	  exec (" ")
-	  echo "\nCannot delete ".fileName
-	  let currLine = currLine + 1
-	else
-	  d _
-	  let filesDeleted = filesDeleted + 1
-	  let lastLine = lastLine - 1
-	endif
-      elseif sure=="q"
-	let stopDel = 1
-      elseif sure=="n"
-	let currLine = currLine + 1
-      endif
-    endif
-  endwhile
-  echo "\n".filesDeleted." files deleted"
-  let &report = oldRep
-  setlocal nomodified
-  setlocal readonly nomodifiable
-endfunction
-
-"---
-" Rename a file
-"
-function! s:RenameFile()
-  let fileName=s:GetFullFileName()
-  setlocal noreadonly modifiable
-  if isdirectory(fileName)
-    echo "Directory renaming not supported yet"
-  elseif filereadable(fileName)
-    let altName=input("Rename ".fileName." to : ")
-    echo " "
-    if altName==""
-      setlocal readonly nomodifiable
-      return
-    endif
-    let success=rename(fileName, b:completePath.altName)
-    if success!=0
-      echo "Cannot rename ".fileName. " to ".altName
-    else
-      echo "Renamed ".fileName." to ".altName
-      let oldRep=&report
-      set report=1000
-      e!
-      let &report=oldRep
-    endif
-  endif
-  setlocal nomodified
-  setlocal readonly nomodifiable
-endfunction
-
-"---
-" Toggle between short and long help
-"
-function! s:ToggleHelp()
-  if exists("w:longhelp") && w:longhelp==0
-    let w:longhelp=1
-    let s:longhelp=1
-  else
-    let w:longhelp=0
-    let s:longhelp=0
-  endif
-  " Allow modification
-  setlocal noreadonly modifiable
-  call s:UpdateHeader()
-  " Disallow modification
-  setlocal readonly nomodifiable
-endfunction
-
-"---
-" Update the header
-"
-function! s:UpdateHeader()
-  let oldRep=&report
-  set report=10000
-  " Save position
-  normal! mt
-  " Remove old header
-  0
-  1,/^"=/ d _
-  " Add new header
-  call s:AddHeader()
-  " Go back where we came from if possible
-  0
-  if line("'t") != 0
-    keepjumps normal! `t
-  endif
-
-  let &report=oldRep
-  setlocal nomodified
-endfunction
-
-"---
-" Toggle long vs. short listing
-"
-function! s:ToggleLongList()
-  setlocal noreadonly modifiable
-  if exists("w:longlist") && w:longlist==1
-    let w:longlist=0
-    let s:longlist=0
-  else
-    let w:longlist=1
-    let s:longlist=1
-  endif
-  call s:AddFileInfo()
-  setlocal readonly nomodifiable
-endfunction
-
-"---
-" Show all files - remove filtering
-"
-function! s:ShowAllFiles()
-  setlocal noreadonly modifiable
-  let b:filterFormula=""
-  let b:filtering=""
-  call s:ShowDirectory()
-  setlocal readonly nomodifiable
-endfunction
-
-"---
-" Figure out what section we are in
-"
-function! s:GetSection()
-  let fn=s:GetFileName()
-  let section="file"
-  if fn =~ '/$'
-    let section="directory"
-  elseif fn =~ b:suffixesRegexp
-    let section="suffixes"
-  endif
-  return section
-endfunction
-
-"---
-" Remove section separators
-"
-function! s:RemoveSeparators()
-  if !g:explUseSeparators
-    return
-  endif
-  0
-  silent! exec '/^"=/+1,$g/^' . s:separator . "/d _"
-endfunction
-
-"---
-" Add section separators
-"   between directories and files if they are separated
-"   between files and 'suffixes' files if they are separated
-function! s:AddSeparators()
-  if !g:explUseSeparators
-    return
-  endif
-  0
-  /^"=/+1
-  let lastsec=s:GetSection()
-  +1
-  .,$g/^/let sec=s:GetSection() |
-	       \if g:explDirsFirst != 0 && sec != lastsec &&
-	       \   (lastsec == "directory" || sec == "directory") |
-	       \  exec "normal! I" . s:separator . "\n\<esc>" |
-	       \elseif g:explSuffixesLast != 0 && sec != lastsec &&
-	       \   (lastsec == "suffixes" || sec == "suffixes") |
-	       \  exec "normal! I" . s:separator . "\n\<esc>" |
-	       \endif |
-	       \let lastsec=sec
-endfunction
-
-"---
-" General string comparison function
-"
-function! s:StrCmp(line1, line2, direction)
-  if a:line1 < a:line2
-    return -a:direction
-  elseif a:line1 > a:line2
-    return a:direction
-  else
-    return 0
-  endif
-endfunction
-
-"---
-" Function for use with Sort(), to compare the file names
-" Default sort is to put in alphabetical order, but with all directory
-" names before all file names
-"
-function! s:FileNameCmp(line1, line2, direction)
-  let f1=s:ExtractFileName(a:line1)
-  let f2=s:ExtractFileName(a:line2)
-
-  " Put directory names before file names
-  if (g:explDirsFirst != 0) && (f1 =~ '\/$') && (f2 !~ '\/$')
-    return -g:explDirsFirst
-  elseif (g:explDirsFirst != 0) && (f1 !~ '\/$') && (f2 =~ '\/$')
-    return g:explDirsFirst
-  elseif (g:explSuffixesLast != 0) && (f1 =~ b:suffixesRegexp) && (f2 !~ b:suffixesRegexp)
-    return g:explSuffixesLast
-  elseif (g:explSuffixesLast != 0) && (f1 !~ b:suffixesRegexp) && (f2 =~ b:suffixesRegexp)
-    return -g:explSuffixesLast
-  else
-    return s:StrCmp(substitute(f1, "/$", "", ""), substitute(f2, "/$", "", ""), a:direction)
-  endif
-
-endfunction
-
-"---
-" Function for use with Sort(), to compare the file modification dates
-" Default sort is to put NEWEST files first.  Reverse will put oldest
-" files first
-"
-function! s:FileDateCmp(line1, line2, direction)
-  let f1=s:ExtractFileName(a:line1)
-  let f2=s:ExtractFileName(a:line2)
-  let t1=s:ExtractFileDate(a:line1)
-  let t2=s:ExtractFileDate(a:line2)
-
-  " Put directory names before file names
-  if (g:explDirsFirst != 0) && (f1 =~ '\/$') && (f2 !~ '\/$')
-    return -g:explDirsFirst
-  elseif (g:explDirsFirst != 0) && (f1 !~ '\/$') && (f2 =~ '\/$')
-    return g:explDirsFirst
-  elseif (g:explSuffixesLast != 0) && (f1 =~ b:suffixesRegexp) && (f2 !~ b:suffixesRegexp)
-    return g:explSuffixesLast
-  elseif (g:explSuffixesLast != 0) && (f1 !~ b:suffixesRegexp) && (f2 =~ b:suffixesRegexp)
-    return -g:explSuffixesLast
-  elseif t1 > t2
-    return -a:direction
-  elseif t1 < t2
-    return a:direction
-  else
-    return s:StrCmp(substitute(f1, "/$", "", ""), substitute(f2, "/$", "", ""), 1)
-  endif
-endfunction
-
-"---
-" Function for use with Sort(), to compare the file sizes
-" Default sort is to put largest files first.  Reverse will put
-" smallest files first
-"
-function! s:FileSizeCmp(line1, line2, direction)
-  let f1=s:ExtractFileName(a:line1)
-  let f2=s:ExtractFileName(a:line2)
-  let s1=s:ExtractFileSize(a:line1)
-  let s2=s:ExtractFileSize(a:line2)
-
-  if (g:explDirsFirst != 0) && (f1 =~ '\/$') && (f2 !~ '\/$')
-    return -g:explDirsFirst
-  elseif (g:explDirsFirst != 0) && (f1 !~ '\/$') && (f2 =~ '\/$')
-    return g:explDirsFirst
-  elseif (g:explSuffixesLast != 0) && (f1 =~ b:suffixesRegexp) && (f2 !~ b:suffixesRegexp)
-    return g:explSuffixesLast
-  elseif (g:explSuffixesLast != 0) && (f1 !~ b:suffixesRegexp) && (f2 =~ b:suffixesRegexp)
-    return -g:explSuffixesLast
-  elseif s1 > s2
-    return -a:direction
-  elseif s1 < s2
-    return a:direction
-  else
-    return s:StrCmp(substitute(f1, "/$", "", ""), substitute(f2, "/$", "", ""), 1)
-  endif
-endfunction
-
-"---
-" Sort lines.  SortR() is called recursively.
-"
-function! s:SortR(start, end, cmp, direction)
-
-  " Bottom of the recursion if start reaches end
-  if a:start >= a:end
-    return
-  endif
-  "
-  let partition = a:start - 1
-  let middle = partition
-  let partStr = getline((a:start + a:end) / 2)
-  let i = a:start
-  while (i <= a:end)
-    let str = getline(i)
-    exec "let result = " . a:cmp . "(str, partStr, " . a:direction . ")"
-    if result <= 0
-      " Need to put it before the partition.  Swap lines i and partition.
-      let partition = partition + 1
-      if result == 0
-	let middle = partition
-      endif
-      if i != partition
-	let str2 = getline(partition)
-	call setline(i, str2)
-	call setline(partition, str)
-      endif
-    endif
-    let i = i + 1
-  endwhile
-
-  " Now we have a pointer to the "middle" element, as far as partitioning
-  " goes, which could be anywhere before the partition.  Make sure it is at
-  " the end of the partition.
-  if middle != partition
-    let str = getline(middle)
-    let str2 = getline(partition)
-    call setline(middle, str2)
-    call setline(partition, str)
-  endif
-  call s:SortR(a:start, partition - 1, a:cmp,a:direction)
-  call s:SortR(partition + 1, a:end, a:cmp,a:direction)
-endfunction
-
-"---
-" To Sort a range of lines, pass the range to Sort() along with the name of a
-" function that will compare two lines.
-"
-function! s:Sort(cmp,direction) range
-  call s:SortR(a:firstline, a:lastline, a:cmp, a:direction)
-endfunction
-
-"---
-" Reverse the current sort order
-"
-function! s:SortReverse()
-  if exists("w:sortdirection") && w:sortdirection == -1
-    let w:sortdirection = 1
-    let w:sortdirlabel  = ""
-  else
-    let w:sortdirection = -1
-    let w:sortdirlabel  = "reverse "
-  endif
-  let s:sortby=w:sortdirlabel . w:sorttype
-  call s:SortListing("")
-endfunction
-
-"---
-" Toggle through the different sort orders
-"
-function! s:SortSelect()
-  " Select the next sort option
-  if !exists("w:sorttype")
-    let w:sorttype="name"
-  elseif w:sorttype == "name"
-    let w:sorttype="size"
-  elseif w:sorttype == "size"
-    let w:sorttype="date"
-  else
-    let w:sorttype="name"
-  endif
-  let s:sortby=w:sortdirlabel . w:sorttype
-  call s:SortListing("")
-endfunction
-
-"---
-" Sort the file listing
-"
-function! s:SortListing(msg)
-    " Save the line we start on so we can go back there when done
-    " sorting
-    let startline = getline(".")
-    let col=col(".")
-    let lin=line(".")
-
-    " Allow modification
-    setlocal noreadonly modifiable
-
-    " Send a message about what we're doing
-    " Don't really need this - it can cause hit return prompts
-"   echo a:msg . "Sorting by" . w:sortdirlabel . w:sorttype
-
-    " Create a regular expression out of the suffixes option in case
-    " we need it.
-    call s:SetSuffixesLast()
-
-    " Remove section separators
-    call s:RemoveSeparators()
-
-    " Do the sort
-    0
-    if w:sorttype == "size"
-      /^"=/+1,$call s:Sort("s:FileSizeCmp",w:sortdirection)
-    elseif w:sorttype == "date"
-      /^"=/+1,$call s:Sort("s:FileDateCmp",w:sortdirection)
-    else
-      /^"=/+1,$call s:Sort("s:FileNameCmp",w:sortdirection)
-    endif
-
-    " Replace the header with updated information
-    call s:UpdateHeader()
-
-    " Restore section separators
-    call s:AddSeparators()
-
-    " Return to the position we started on
-    0
-    if search('\m^'.escape(startline,s:escregexp),'W') <= 0
-      execute lin
-    endif
-    execute "normal!" col . "|"
-
-    " Disallow modification
-    setlocal nomodified
-    setlocal readonly nomodifiable
-
-endfunction
-
-"---
-" Setup for editing directories after starting up by going to each window.
-" Required for "vim -o filename dirname"
-"
-function! s:EditAll()
-  if winbufnr(2) == -1
-    return
-  endif
-  let cmd = winrestcmd()
-  let curwin = winnr()
-  while 1
-    wincmd w
-    if winnr() == curwin
-      break
-    endif
-    call s:EditDir()
-  endwhile
-  exe cmd
-endfunction
-
-"---
-" Set up the autocommand to allow directories to be edited
-"
-augroup fileExplorer
-  au!
-  " Fill the window when entering the buffer; ":edit dir".
-  au BufEnter * call s:EditDir()
-  " Set the window variables after a split; ":split".
-  au WinEnter * if !exists("w:sortdirection") | call s:EditDir() | endif
-  " Fill the windows after Vim has started up.
-  au VimEnter * call s:EditAll()
-augroup end
-
-" restore 'cpo'
-let &cpo = s:cpo_save
-unlet s:cpo_save
diff --git a/runtime/plugin/netrw.vim b/runtime/plugin/netrw.vim
index 9f4f91b..e6af41b 100644
--- a/runtime/plugin/netrw.vim
+++ b/runtime/plugin/netrw.vim
@@ -1,7 +1,7 @@
 " netrw.vim: Handles file transfer and remote directory listing across a network
-" Last Change:	Jun 30, 2004
+" Last Change:	Jul 08, 2004
 " Maintainer:	Charles E. Campbell, Jr. PhD   <drchipNOSPAM at campbellfamily.biz>
-" Version:	47g	ASTRO-ONLY
+" Version:	47l	 ASTRO-ONLY
 " License:	Vim License  (see vim's :help license)
 "
 "  But be doers of the word, and not only hearers, deluding your own selves
@@ -12,8 +12,9 @@
 if exists("loaded_netrw") || &cp
   finish
 endif
-let loaded_netrw = "v47g	ASTRO-ONLY"
-let s:save_cpo   = &cpo
+let loaded_netrw    = "v47l	 ASTRO-ONLY"
+let s:save_cpo      = &cpo
+let loaded_explorer = 1
 set cpo&vim
 
 " ---------------------------------------------------------------------
@@ -74,6 +75,36 @@
  " alternative: reverse  (z y x ...)
  let g:netrw_sort_direction= "normal"
 endif
+if !exists("g:netrw_longlist") || g:netrw_longlist == 0
+ let g:netrw_longlist= 0
+else
+ let g:netrw_longlist= 1
+ let g:netrw_list_cmd= "ssh HOSTNAME ls -FLa -l"
+endif
+if !exists("g:netrw_timefmt")
+ let g:netrw_timefmt= "%c"
+endif
+if !exists("g:netrw_local_rmdir")
+ let g:netrw_local_rmdir= "rmdir"
+endif
+if !exists("g:netrw_local_rename")
+ if has("win32")
+  let g:netrw_local_rename= "ren"
+ elseif has("unix")
+  let g:netrw_local_rename= "mv"
+ endif
+endif
+if !exists("g:netrw_local_mkdir")
+ let g:netrw_local_mkdir= "mkdir"
+endif
+if !exists("g:netrw_mkdir_cmd")
+ let g:netrw_mkdir_cmd= "ssh HOSTNAME mkdir"
+endif
+
+" BufEnter event ignored by decho when following variable is true
+"  Has a side effect that doau BufReadPost doesn't work, so
+"  files read by network transfer aren't appropriately highlighted.
+"let g:decho_bufenter = 1	"Decho
 
 " ---------------------------------------------------------------------
 " Default values for global protocol variables {{{1
@@ -125,11 +156,13 @@
 
 " ---------------------------------------------------------------------
 " Transparency Support: {{{1
-" Auto-detection for ftp://*, rcp://*, scp://*, sftp://*, http://*, dav://*,
-" and rsync://*
-" Should make file transfers across networks transparent.  Currently I haven't
-" supported appends.  Hey, gotta leave something for a future <netrw.vim>!
+ " File Explorer: {{{2
 if version >= 600
+ augroup FileExplorer
+  au!
+  au BufEnter * call <SID>LocalBrowse(expand("<afile>"))
+ augroup END
+ " Network Handler: {{{2
  augroup Network
   au!
   if has("win32")
@@ -328,7 +361,7 @@
 "    call Decho("read via ftp+.netrc (method #2)")
      let netrw_fname= b:netrw_fname
      new
-     set ff=unix
+     setlocal ff=unix
      exe "put ='".g:netrw_ftpmode."'"
      exe "put ='get ".netrw_fname." ".tmpfile."'"
      if exists("g:netrw_port") && g:netrw_port != ""
@@ -353,7 +386,7 @@
 "    call Decho("read via ftp+mipf (method #3)")
     let netrw_fname= b:netrw_fname
     new
-    set ff=unix
+    setlocal ff=unix
     if exists("g:netrw_port") && g:netrw_port != ""
      put ='open '.g:netrw_machine.' '.g:netrw_port
     else
@@ -444,7 +477,7 @@
     " Construct execution string (four lines) which will be passed through filter
     let netrw_fname= b:netrw_fname
     new
-    set ff=unix
+    setlocal ff=unix
     if exists("g:netrw_port") && g:netrw_port != ""
      put ='open '.g:netrw_machine.' '.g:netrw_port
     else
@@ -538,7 +571,7 @@
    unlet b:netrw_fname
   endif
   call s:NetOptionRestore()
- 
+
 "  call Dret("NetRead")
 endfun
 " end of NetRead
@@ -614,7 +647,7 @@
     exe bufnr("#")."bwipe!"
    else
     let oldul= &ul
-    set ul=-1
+    setlocal ul=-1
     exe a:readcmd." ".v:cmdarg." ".fname
     if delline > 0
      " wipe out last line, which should be a blank line anyway
@@ -641,6 +674,11 @@
 "   call Decho("calling NetReadFixup(method<".a:method."> line1=".line1." line2=".line2.")")
    call NetReadFixup(a:method, line1, line2)
   endif
+
+  " update the Buffers menu
+  if has("gui") && has("gui_running")
+   silent! emenu Buffers.Refresh\ menu
+  endif
  
 "  call Decho("readcmd<".a:readcmd."> cmdarg<".v:cmdarg."> fname<".a:fname."> readable=".filereadable(a:fname))
  
@@ -763,7 +801,7 @@
    elseif b:netrw_method == 2	" write with ftp + <.netrc>
     let netrw_fname = b:netrw_fname
     new
-    set ff=unix
+    setlocal ff=unix
     exe "put ='".g:netrw_ftpmode."'"
 "    call Decho(" NetWrite: put ='".g:netrw_ftpmode."'")
     exe "put ='put ".tmpfile." ".netrw_fname."'"
@@ -788,7 +826,7 @@
    elseif b:netrw_method == 3	" write with ftp + machine, id, passwd, and fname
     let netrw_fname= b:netrw_fname
     new
-    set ff=unix
+    setlocal ff=unix
     if exists("g:netrw_port") && g:netrw_port != ""
      put ='open '.g:netrw_machine.' '.g:netrw_port
     else
@@ -850,7 +888,7 @@
     " Construct execution string (four lines) which will be passed through filter
     let netrw_fname= b:netrw_fname
     new
-    set ff=unix
+    setlocal ff=unix
     if exists("g:netrw_port") && g:netrw_port != ""
      put ='open '.g:netrw_machine.' '.g:netrw_port
     else
@@ -895,7 +933,7 @@
      let uid_machine = g:netrw_machine
     endif
     new
-    set ff=unix
+    setlocal ff=unix
     put ='put '.tmpfile.' '.netrw_fname
     norm 1Gdd
 "    call Decho("executing: %!".g:netrw_sftp_cmd.' '.uid_machine)
@@ -959,18 +997,18 @@
 "  call Decho("set up path   <".path   .">")
 "  call Decho("set up fname  <".fname  .">")
 
-   let listcmd = substitute(g:netrw_list_cmd,'\<HOSTNAME\>',user.machine,'')
+  let listcmd = substitute(g:netrw_list_cmd,'\<HOSTNAME\>',user.machine,'')
 
-   " optionally sort by time (-t) or by size (-S)
-   if g:netrw_sort_by =~ "^t"
-    let listcmd= listcmd."t"
-   elseif g:netrw_sort_by =~ "^s"
-    let listcmd= listcmd."S"
-   endif
-   " optionally sort in reverse
-   if g:netrw_sort_direction =~ "^r"
-    let listcmd= listcmd."r"
-   endif
+  " optionally sort by time (-t) or by size (-S)
+  if g:netrw_sort_by =~ "^t"
+   let listcmd= listcmd."t"
+  elseif g:netrw_sort_by =~ "^s"
+   let listcmd= listcmd."S"
+  endif
+  " optionally sort in reverse
+  if g:netrw_sort_direction =~ "^r"
+   let listcmd= listcmd."r"
+  endif
 
 "  call Decho("set up listcmd<".listcmd.">")
 
@@ -993,12 +1031,12 @@
 
    " remote-read the requested file into current buffer
    enew!
-   exe "file ".method."://".user.machine."/".path
+   exe "file ".method."://".user.machine."/".escape(path,' ')
    exe "silent doau BufReadPre ".fname
    silent call s:NetRead(method."://".user.machine."/".path)
    exe "silent doau BufReadPost ".fname
-   1d
-   set nomod
+   keepjumps 1d
+   setlocal nomod
 
 "   call Dret("NetBrowse 0 : file<".fname.">")
    return 0
@@ -1021,26 +1059,28 @@
   else
    enew!
   endif
-  setlocal bt=nofile bh=wipe nobl
-  exe 'file '.bufname
-  set bt=nowrite bh=hide nobl
-  nnoremap <buffer> <silent> <cr>       :exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),expand("<cWORD>")))<cr>
+  setlocal ts=32 bt=nofile bh=wipe nobl
+  exe 'file '.escape(bufname,' ')
+  setlocal bt=nowrite bh=hide nobl
+  nnoremap <buffer> <silent> <cr>	:exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetDir()))<cr>
   nnoremap <buffer> <silent> <c-l>	:exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))<cr>
   nnoremap <buffer> <silent> -		:exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'../'))<cr>
   nnoremap <buffer> <silent> a		:let g:netrw_list_showall=1<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))<cr>
-  nnoremap <buffer> <silent> h		:call <SID>NetHideEdit()<cr>
-  nnoremap <buffer> <silent> o		:exe g:netrw_winsize."wincmd s"<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),expand("<cWORD>")))<cr>
-  nnoremap <buffer> <silent> r		:let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),expand("<cWORD>")))<cr>
+  nnoremap <buffer> <silent> <Leader>H	:call <SID>NetHideEdit(0)<cr>
+  nnoremap <buffer> <silent> i		:call <SID>NetLongList(0)<cr>
+  nnoremap <buffer> <silent> o		:exe g:netrw_winsize."wincmd s"<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetDir()))<cr>
+  nnoremap <buffer> <silent> r		:let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetDir()))<cr>
   nnoremap <buffer> <silent> s		:let g:netrw_sort_by= (g:netrw_sort_by =~ 'n')? 'time' : (g:netrw_sort_by =~ 't')? 'size' : 'name'<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))<cr>
-  nnoremap <buffer> <silent> v		:exe g:netrw_winsize."wincmd v"<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),expand("<cWORD>")))<cr>
-  nnoremap <buffer> <silent> x		:exe "norm! 0"<bar>call <SID>NetBrowseX(<SID>NetBrowseChgDir(expand("%"),expand("<cWORD>")))<cr>
-  nnoremap <buffer> <silent> <2-leftmouse> :exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),expand("<cWORD>")))<cr>
+  nnoremap <buffer> <silent> v		:exe g:netrw_winsize."wincmd v"<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetDir()))<cr>
+  nnoremap <buffer> <silent> x		:exe "norm! 0"<bar>call <SID>NetBrowseX(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetDir()),1)<cr>
+  nnoremap <buffer> <silent> <2-leftmouse> :exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetDir()))<cr>
   exe 'nnoremap <buffer> <silent> <del>	:exe "norm! 0"<bar>call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
   exe 'vnoremap <buffer> <silent> <del>	:call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
   exe 'nnoremap <buffer> <silent> D	:exe "norm! 0"<bar>call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
   exe 'vnoremap <buffer> <silent> D	:call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
   exe 'nnoremap <buffer> <silent> R	:exe "norm! 0"<bar>call <SID>NetBrowseRename("'.user.machine.'","'.path.'")<cr>'
-  nnoremap <buffer> ?		:he netrw-dir<cr>
+  exe 'nnoremap <buffer> <silent> <Leader>M :call <SID>NetMakeDir("'.user.machine.'")<cr>'
+  nnoremap <buffer> ?			:he netrw-browse-cmds<cr>
   setlocal ma
 
   " Set up the banner
@@ -1069,7 +1109,7 @@
   keepjumps 1d
 
   " manipulate the directory listing (hide, sort)
-  set ft=netrwlist
+  setlocal ft=netrwlist
   if line("$") >= g:netrw_bannercnt
    if !exists("g:netrw_list_showall")
     if g:netrw_list_hide != ""
@@ -1078,6 +1118,13 @@
    else
     unlet g:netrw_list_showall
    endif
+   if g:netrw_longlist
+    " do a long listing; these substitutions need to be done prior to sorting
+    keepjumps silent /^total\s*\d\+$/d
+    exe 'keepjumps silent '.g:netrw_bannercnt.',$s/ -> .*$//e'
+    exe 'keepjumps silent '.g:netrw_bannercnt.',$s/\(\S\+\s\+\S\+\s\+\S\+\s\+\S\+\s\+\S\+\s\+\S\+\s\+\S\+\s\+\S\+\)\s\+\(\S\+\)$/\2\t\1/e'
+    exe g:netrw_bannercnt
+   endif
    if g:netrw_sort_by =~ "^n"
     call s:SetSort()
     exe 'keepjumps silent '.g:netrw_bannercnt.',$call s:NetSort()'
@@ -1111,7 +1158,7 @@
   elseif newdir == './'
    " refresh the directory list
 "   call Decho("refresh directory listing")
-   set ma
+   setlocal ma
    %d
 
   elseif newdir == '../'
@@ -1139,6 +1186,18 @@
 endfun
 
 " ---------------------------------------------------------------------
+"  NetGetDir: it gets the directory named under the cursor
+fun! <SID>NetGetDir()
+"  call Dfunc("NetGetDir()")
+  let dirname= getline(".")
+  if dirname =~ '\t'
+   let dirname= substitute(dirname,'\t.*$','','e')
+  endif
+"  call Dret("NetGetDir <".dirname.">")
+  return dirname
+endfun
+
+" ---------------------------------------------------------------------
 " NetBrowseRm: remove a remote file or directory {{{2
 fun! <SID>NetBrowseRm(usrhost,path) range
 "  call Dfunc("NetBrowseRm(usrhost<".a:usrhost."> path<".a:path.">)")
@@ -1215,7 +1274,7 @@
 
   " attempt to rename files/directories
   while ctr <= a:lastline
-   exe ctr
+   exe "keepjumps ".ctr
 
    norm! 0
    let oldname= a:path.expand("<cWORD>")
@@ -1234,21 +1293,52 @@
   " refresh the directory
   let curline= line(".")
   call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))
-  exe curline
+  exe "keepjumps ".curline
 "  call Dret("NetBrowseRename")
 endfun
 
 " ---------------------------------------------------------------------
 " NetBrowseX:  allows users to write custom functions to operate on {{{2
-"              files given their extension
-fun! <SID>NetBrowseX(fname)
-"  call Dfunc("NetBrowseX(".a:fname.")")
+"              files given their extension.  Passes 0=local, 1=remote
+fun! <SID>NetBrowseX(fname,remote)
+"  call Dfunc("NetBrowseX(".a:fname." remote=".a:remote.")")
 
   let exten= substitute(a:fname,'.*\.\(.\{-}\)','\1','e')
 "  call Decho("exten<".exten."> "."NetrwFileHandler_".exten."():exists=".exists("*NetrwFileHandler_".exten))
   if exten != "" && exists("*NetrwFileHandler_".exten)
-   exe "call NetrwFileHandler_".exten.'("'.a:fname.'")'
+
+   let fname= a:fname
+   if a:remote == 1
+    " create a local copy
+    let fname= tempname().".".exten
+"    call Decho("create a local copy of <".a:fname."> as <".fname.">")
+    exe "keepjumps silent bot 1new ".a:fname
+    let eikeep= &ei
+    set ei=all bh=delete
+    exe "w! ".fname
+    let &ei= eikeep
+    q
+   endif
+
+   exe "let ret= NetrwFileHandler_".exten.'("'.fname.'")'
+    redraw!
+
+   " 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 delete(fname)
+   endif
+   if ret != 0
+    let eikeep= &ei
+    set ei=all bh=delete bt=nofile
+    exe "norm! \<c-o>"
+    let &ei= eikeep
+    redraw!
+   endif
   endif
+
 "  call Dret("NetBrowseX")
 endfun
 
@@ -1276,8 +1366,8 @@
 
 " ---------------------------------------------------------------------
 " NetHideEdit: allows user to edit the file/directory hiding list
-fun! <SID>NetHideEdit()
-"  call Dfunc("NetHideEdit()")
+fun! <SID>NetHideEdit(mode)
+"  call Dfunc("NetHideEdit(mode=".a:mode.")")
 
   call inputsave()
   let newhide= input("Edit Hiding List: ",g:netrw_list_hide)
@@ -1285,12 +1375,427 @@
 
   " refresh the listing
   let g:netrw_list_hide= newhide
-  silent call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./'))
+  if a:mode == 0
+   silent call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./'))
+  else
+   silent call s:LocalBrowse(s:NetBrowseChgDir(expand("%"),'./'))
+  endif
 
 "  call Dret("NetHideEdit")
 endfun
 
-" ------------------------------------------------------------------------
+" ---------------------------------------------------------------------
+"  NetLongList: {{{2
+fun! <SID>NetLongList(mode)
+"  call Dfunc("NetLongList(mode=".a:mode.") netrw_longlist=".g:netrw_longlist)
+
+  if g:netrw_longlist != 0
+   " turn long listing off
+   let g:netrw_longlist = 0
+   let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge')
+
+  else
+   " turn long listing on
+   let g:netrw_longlist = 1
+   let g:netrw_list_cmd = g:netrw_list_cmd." -l"
+  endif
+
+  " refresh the listing
+  if a:mode == 0
+   silent call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),"./"))
+  else
+   silent call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%"),"./"))
+  endif
+
+"  call Dret("NetLongList : g:netrw_longlist=".g:netrw_longlist)
+endfun
+
+" ---------------------------------------------------------------------
+" NetMakeDir: this function makes a directory (both local and remote)
+fun! <SID>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()
+
+  if newdirname == ""
+"   call Dret("NetMakeDir : user aborted with bare <cr>")
+   return
+  endif
+
+  if a:usrhost == ""
+
+   " Local mkdir:
+   " sanity checks
+   if isdirectory(newdirname)
+    echoerr "***warning*** <".newdirname."> is already a directory!"
+"    call Dret("NetMakeDir : directory<".newdirname."> exists previously")
+    return
+   endif
+   if filereadable(newdirname)
+    echoerr "***warning*** <".newdirname."> is already a file!"
+"    call Dret("NetMakeDir : file<".newdirname."> exists previously")
+    return
+   endif
+   exe "silent! !".g:netrw_local_mkdir." ".newdirname
+   if v:shell_error == 0
+    " refresh listing
+    call s:LocalBrowse(".")
+   else
+    echoerr "***warning*** unable to make directory<".newdirname.">"
+   endif
+   redraw!
+
+  else
+   " Remote mkdir:
+   let mkdircmd  = substitute(g:netrw_mkdir_cmd,'\<HOSTNAME\>',a:usrhost,'')
+   let newdirname= substitute(expand("%"),'^\%(.\{-}/\)\{3}\(.*\)$','\1','').newdirname
+"   call Decho("exe silent! !".mkdircmd." ".newdirname)
+   exe "silent! !".mkdircmd." ".newdirname
+   if v:shell_error == 0
+    " refresh listing
+    call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./'))
+   else
+    echoerr "***warning*** unable to make directory<".newdirname.">"
+   endif
+   redraw!
+  endif
+  
+"  call Dret("NetMakeDir")
+endfun
+
+" ---------------------------------------------------------------------
+"  Browsing Support For Local Directories And Files:    {{{1
+
+" ---------------------------------------------------------------------
+" LocalBrowse: supports local file/directory browsing {{{2
+fun! <SID>LocalBrowse(dirname)
+
+"  let dirname= (a:dirname == "")? expand("%:p") : a:dirname
+  if !isdirectory(a:dirname)
+   " not a directory, ignore it
+   return
+  endif
+
+"  " unfortunate interaction -- when putting Dfunc/Dret above
+  " one can no longer enter the DBG buffer.
+"  call Dfunc("LocalBrowse(dirname<".a:dirname.">)")
+
+  exe 'cd '.escape(a:dirname,' ')
+  let dirname= getcwd()."/"
+"  call Decho("dirname<".dirname.">")
+
+  " make this buffer modifiable
+  setlocal ma
+
+  " ---------------------------------------------------------------------
+  "  Perform Directory Listing:
+"  call Decho("Perform directory listing...")
+  " set up new buffer and map
+  let dirnamenr = bufnr(dirname)
+  if dirnamenr != -1 && bufname(dirnamenr) != dirname
+   " try removing the trailing "/"
+   let dirnamenr= bufnr(substitute(dirname,'/$','','e'))
+  endif
+"  call Decho("bufnr(dirname<".dirname.">)=".dirnamenr)
+
+  if dirnamenr != -1 && bufexists(dirname)
+   " buffer already exists (hidden), so switch to it!
+   exe "b ".dirnamenr
+   exe 'cd '.escape(dirname,' ')
+"   call Decho("changed directory to<".dirname.">")
+   if a:dirname != "." && line("$") >= 5
+"    call Dret("LocalBrowse : buffer already exists with info")
+    return
+   endif
+"   call Decho("buffer already exists, but needs listing (buf#".dirnamenr.")")
+   keepjumps %d
+  else
+"   call Dredir("ls!")
+"   call Decho("generate new buffer named<".dirname.">")
+   silent! enew!
+   exe 'silent! file '.escape(dirname,' ')
+  endif
+  " set standard browser options on buffer
+  setlocal ts=32 bt=nowrite bh=hide nobl
+
+  " set up all the maps
+  nnoremap <buffer> <silent> <cr>	:exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%:p"),<SID>NetGetDir()))<cr>
+  nnoremap <buffer> <silent> <c-l>	:exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%:p"),'./'))<cr>
+  nnoremap <buffer> <silent> -		:exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%:p"),'../'))<cr>
+  nnoremap <buffer> <silent> a		:let g:netrw_list_showall=1<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%:p"),'./'))<cr>
+  nnoremap <buffer> <silent> <Leader>H	:call <SID>NetHideEdit(1)<cr>
+  nnoremap <buffer> <silent> <Leader>M	:call <SID>NetMakeDir("")<cr>
+  nnoremap <buffer> <silent> i		:call <SID>NetLongList(1)<cr>
+  nnoremap <buffer> <silent> o		:exe g:netrw_winsize."wincmd s"<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%:p"),<SID>NetGetDir()))<cr>
+  nnoremap <buffer> <silent> r		:let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%:p"),<SID>NetGetDir()))<cr>
+  nnoremap <buffer> <silent> s		:let g:netrw_sort_by= (g:netrw_sort_by =~ 'n')? 'time' : (g:netrw_sort_by =~ 't')? 'size' : 'name'<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%:p"),'./'))<cr>
+  nnoremap <buffer> <silent> v		:exe g:netrw_winsize."wincmd v"<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%:p"),<SID>NetGetDir()))<cr>
+  nnoremap <buffer> <silent> x		:exe "norm! 0"<bar>call <SID>NetBrowseX(<SID>LocalBrowseChgDir(expand("%:p"),<SID>NetGetDir()),0)<cr>
+  nnoremap <buffer> <silent> <2-leftmouse> :exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%:p"),<SID>NetGetDir()))<cr>
+  exe 'nnoremap <buffer> <silent> <del>	:exe "norm! 0"<bar>call <SID>LocalBrowseRm("'.expand("%:p").<SID>NetGetDir().'")<cr>'
+  exe 'vnoremap <buffer> <silent> <del>	:call <SID>LocalBrowseRm("'.expand("%:p").<SID>NetGetDir().'")<cr>'
+  exe 'nnoremap <buffer> <silent> D	:exe "norm! 0"<bar>call <SID>LocalBrowseRm("'.expand("%:p").<SID>NetGetDir().'")<cr>'
+  exe 'vnoremap <buffer> <silent> D	:call <SID>LocalBrowseRm("'.expand("%:p").<SID>NetGetDir().'")<cr>'
+  exe 'nnoremap <buffer> <silent> R	:exe "norm! 0"<bar>call <SID>LocalBrowseRename("'.expand("%:p").<SID>NetGetDir().'")<cr>'
+  nnoremap <buffer> ?			:he netrw-dir<cr>
+
+  " Set up the banner
+  keepjumps put ='\" ================='
+  keepjumps 1d
+  keepjumps put ='\" Directory Listing'
+  keepjumps put ='\"   '.dirname
+  let g:netrw_bannercnt= 6
+  if g:netrw_sort_by =~ "^n"
+   " sorted by name
+   let g:netrw_bannercnt= g:netrw_bannercnt + 1
+   keepjumps put ='\"   Sorted by      '.g:netrw_sort_by
+   keepjumps put ='\"   Sort sequence: '.g:netrw_sort_sequence
+  else
+   " sorted by size or date
+   keepjumps put ='\"   Sorted by '.g:netrw_sort_by
+  endif
+  if g:netrw_list_hide != "" && !exists("g:netrw_list_showall")
+   keepjumps put ='\"   Hiding: '.g:netrw_list_hide
+   let g:netrw_bannercnt= g:netrw_bannercnt + 1
+  endif
+  keepjumps put ='\" ================='
+
+  " generate the requested directory listing
+  call LocalBrowseList(dirname)
+
+  " manipulate the directory listing (hide, sort)
+  setlocal ft=netrwlist
+  if line("$") >= g:netrw_bannercnt
+   if !exists("g:netrw_list_showall")
+    if g:netrw_list_hide != ""
+     call s:NetrwListHide()
+    endif
+   else
+    unlet g:netrw_list_showall
+   endif
+   if g:netrw_sort_by =~ "^n"
+    call s:SetSort()
+    exe 'keepjumps silent '.g:netrw_bannercnt.',$call s:NetSort()'
+    exe 'keepjumps silent '.g:netrw_bannercnt.',$s/^\d\{3}\///e'
+   else
+    exe 'keepjumps silent '.g:netrw_bannercnt.',$call s:NetSort()'
+    exe 'keepjumps silent '.g:netrw_bannercnt.',$s/^\d\{-}\///e'
+   endif
+  endif
+  exe g:netrw_bannercnt
+  try
+   exe 'cd '.escape(substitute(dirname,'/$','','e'),' ')
+"   call Decho("changed directory to<".dirname.">")
+  catch
+   echoerr "Not a directory: <".dirname.">"
+  endtry
+
+  setlocal noma nomod
+
+"  call Dret("LocalBrowse")
+endfun
+
+" ---------------------------------------------------------------------
+"  LocalBrowseList: does the job of "ls" for local directories {{{2
+fun! LocalBrowseList(dirname)
+"  call Dfunc("LocalBrowseList(dirname<".a:dirname.">)")
+
+  let dirnamelen = strlen(a:dirname)
+  let filelist   = glob(a:dirname."*")."\n".glob(a:dirname.".*")
+"  call Decho("filelist<".filelist.">")
+
+  while filelist != ""
+   if filelist =~ '\n'
+    let file     = substitute(filelist,'\n.*$','','e')
+    let filelist = substitute(filelist,'^.\{-}\n\(.*\)$','\1','e')
+   else
+    let file     = filelist
+    let filelist= ""
+   endif
+   let pfile= file
+   if isdirectory(file)
+    let pfile= file."/"
+   endif
+   let pfile= strpart(pfile,dirnamelen)
+   if g:netrw_longlist
+    let pfile= pfile."\t".getfsize(file)."\t".strftime(g:netrw_timefmt,getftime(file))
+   endif
+   if     g:netrw_sort_by =~ "^t"
+    " sort by time (handles time up to 1 quintillion seconds, US)
+"    call Decho("getftime(".file.")=".getftime(file))
+    let t  = getftime(file)
+    let ft = strpart("000000000000000000",1,18-strlen(t)).t
+"    call Decho("exe keepjumps put ='".ft.'/'.file."'")
+    exe "keepjumps put ='".ft.'/'.pfile."'"
+   elseif g:netrw_sort_by =~ "^s"
+    " sort by size (handles file sizes up to 1 quintillion bytes, US)
+"    call Decho("getfsize(".file.")=".getfsize(file))
+    let sz   = getfsize(file)
+    let fsz  = strpart("000000000000000000",1,18-strlen(sz)).sz
+"    call Decho("exe keepjumps put ='".fsz.'/'.file."'")
+    exe "keepjumps put ='".fsz.'/'.pfile."'"
+   else 
+    " sort by name
+"    call Decho("exe keepjumps put ='".file."'")
+    exe "keepjumps put ='".pfile."'"
+   endif
+  endwhile
+
+"  call Dret("LocalBrowseList")
+endfun
+
+" ---------------------------------------------------------------------
+"  LocalBrowseChgDir: constructs a new directory based on the current {{{2
+"                     directory and a new directory name
+fun! <SID>LocalBrowseChgDir(dirname,newdir)
+"  call Dfunc("LocalBrowseChgDir(dirname<".a:dirname."> newdir<".a:newdir.">)")
+
+  let dirname= a:dirname
+  let newdir = a:newdir
+
+  if dirname !~ '/$'
+   " apparently vim is "recognizing" that it is in the home directory and
+   " is removing the "/".  Bad idea, so I have to put it back.
+   let dirname= dirname.'/'
+"   call Decho("adjusting dirname<".dirname.">")
+  endif
+
+  if newdir !~ '/$'
+   " handling a file
+   let dirname= dirname.newdir
+"   call Decho("handling a file: dirname<".dirname.">")
+   exe "e ".dirname
+
+  elseif newdir == './'
+   " refresh the directory list
+"   call Decho("refresh directory listing")
+   setlocal ma
+   %d
+
+  elseif newdir == '../'
+   " go up one directory
+   let dirname= substitute(dirname,'^\(.*/\)\([^/]\+/$\)','\1','e')
+"   call Decho("go up one dir: dirname<".dirname.">")
+
+  else
+   " go down one directory
+   let dirname= dirname.newdir
+"   call Decho("go down one dir: dirname<".dirname."> newdir<".newdir.">")
+  endif
+
+"  call Dret("LocalBrowseChgDir <".dirname.">")
+  return dirname
+endfun
+
+" ---------------------------------------------------------------------
+" LocalBrowseRm:
+fun! <SID>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
+
+  " remove multiple files and directories
+  while ctr <= a:lastline
+   exe ctr
+
+   norm! 0
+   let rmfile= a:path.expand("<cWORD>")
+"   call Decho("rmfile<".rmfile.">")
+
+   if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '/$')
+    " attempt to remove file
+    call inputsave()
+    let ok= input("Confirm deletion of file<".rmfile."> ","y")
+    call inputrestore()
+    if ok == "y"
+     call delete(rmfile)
+"     call Decho("errcode=".v:shell_error)
+    endif
+  
+   else
+    " attempt to remove directory
+    call inputsave()
+    let ok= input("Confirm deletion of directory<".rmfile."> ","y")
+    call inputrestore()
+    let rmfile= substitute(rmfile,'/$','','e')
+
+    if ok == "y"
+     call 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= delete(rmfile)
+"      call Decho("errcode=".errcode)
+
+      if errcode != 0
+       if has("unix")
+"        call Decho("3rd attempt to remove directory<".rmfile.">")
+	call system("rm ".rmfile)
+        if v:shell_error != 0
+         echoerr "unable to remove directory<".rmfile."> -- is it empty?"
+	endif
+       else
+        echoerr "unable to remove directory<".rmfile."> -- is it empty?"
+       endif
+      endif
+     endif
+    endif
+   endif
+
+   let ctr= ctr + 1
+  endwhile
+
+  " refresh the directory
+  let curline= line(".")-1
+"  call Decho("refresh the directory")
+  call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%"),'./'))
+  exe curline
+
+"  call Dret("LocalBrowseRm")
+endfun
+
+" ---------------------------------------------------------------------
+" LocalBrowseRename: rename a remote file or directory {{{2
+fun! <SID>LocalBrowseRename(path)
+"  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
+
+   norm! 0
+   let oldname= a:path.expand("<cWORD>")
+"   call Decho("oldname<".oldname.">")
+
+   call inputsave()
+   let newname= input("Moving ".oldname." to : ",oldname)
+   call inputrestore()
+
+   let ret= system(g:netrw_local_rename." ".oldname." ".newname)
+"   call Decho("executing system(".g:netrw_local_rename." ".oldname." ".newname)
+
+   let ctr= ctr + 1
+  endwhile
+
+  " refresh the directory
+  let curline= line(".")
+  call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%"),'./'))
+  exe "keepjumps ".curline
+"  call Dret("LocalBrowseRename")
+endfun
+
+" ---------------------------------------------------------------------
 " NetMethod:  determine method of transfer {{{1
 "  method == 1: rcp
 "	     2: ftp + <.netrc>
@@ -1531,14 +2036,14 @@
   let s:dirkeep	= getcwd()
   let s:gdkeep	= &gd
   let s:twkeep	= &tw
-  set cino =
-  set com  =
-  set cpo -=aA
-  set nocin noai
-  set tw   =0
+  setlocal cino =
+  setlocal com  =
+  setlocal cpo -=aA
+  setlocal nocin noai
+  setlocal tw   =0
   if has("win32") && !has("win95")
    let s:swfkeep= &swf
-   set noswf
+   setlocal noswf
 "  call Decho("setting s:swfkeep to <".&swf.">")
   endif
 
@@ -1595,6 +2100,8 @@
 " ---------------------------------------------------------------------
 " NetSort: Piet Delport's BISort2() function, modified to take a range {{{1
 fun! <SID>NetSort() range
+"  call Dfunc("NetSort()")
+
   let i = a:firstline + 1
   while i <= a:lastline
     " find insertion point via binary search
@@ -1629,13 +2136,29 @@
     endif
     let i = i + 1
   endwhile
+
+"  call Dret("NetSort")
 endfun
 
 " ---------------------------------------------------------------------
-" SetSort: sets up the sort based on the g:netrw_sort_sequence
+" SetSort: sets up the sort based on the g:netrw_sort_sequence {{{1
+"          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! <SID>SetSort()
 "  call Dfunc("SetSort() bannercnt=".g:netrw_bannercnt)
-  let seqlist  = g:netrw_sort_sequence
+  if g:netrw_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 =~ ','
diff --git a/runtime/print/ascii.ps b/runtime/print/ascii.ps
new file mode 100644
index 0000000..5fcffb6
--- /dev/null
+++ b/runtime/print/ascii.ps
@@ -0,0 +1,22 @@
+%!PS-Adobe-3.0 Resource-Encoding
+%%Title: VIM-ascii
+%%Version: 1.0 0
+%%EndComments
+/VIM-ascii[
+32{/.notdef}repeat
+/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle
+/parenleft /parenright /asterisk /plus /comma /minus /period /slash
+/zero /one /two /three /four /five /six /seven
+/eight /nine /colon /semicolon /less /equal /greater /question
+/at /A /B /C /D /E /F /G
+/H /I /J /K /L /M /N /O
+/P /Q /R /S /T /U /V /W
+/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore
+/grave /a /b /c /d /e /f /g
+/h /i /j /k /l /m /n /o
+/p /q /r /s /t /u /v /w
+/x /y /z /braceleft /bar /braceright /asciitilde /.notdef
+128{/.notdef}repeat]
+/Encoding defineresource pop
+% vim:ff=unix:
+%%EOF
diff --git a/runtime/print/cidfont.ps b/runtime/print/cidfont.ps
new file mode 100644
index 0000000..a06ebc8
--- /dev/null
+++ b/runtime/print/cidfont.ps
@@ -0,0 +1,26 @@
+%!PS-Adobe-3.0 Resource-ProcSet
+%%Title: VIM-CIDFont
+%%Version: 1.0 0
+%%EndComments
+% Editing of this file is NOT RECOMMENDED.  You run a very good risk of causing
+% all PostScript printing from VIM failing if you do.  PostScript is not called
+% a write-only language for nothing!
+/CP currentpacking d T setpacking
+/SB 256 string d
+/CIDN? systemdict/composefont known d /GS? systemdict/.makeoperator known d
+CIDN?{
+GS?{/vim_findresource{2 copy resourcestatus not{1 index SB cvs runlibfile}{
+pop pop}ifelse findresource}bd/vim_composefont{0 get/CIDFont vim_findresource
+exch/CMap vim_findresource exch[exch]composefont pop}bd}{/vim_findresource
+/findresource ld/vim_composefont{composefont pop}bd}ifelse
+}{
+/vim_fontname{0 get SB cvs length dup SB exch(-)putinterval 1 add dup SB exch
+dup 256 exch sub getinterval 3 -1 roll exch cvs length add SB exch 0 exch
+getinterval cvn}bd/vim_composefont{vim_fontname findfont d}bd
+} ifelse
+/cfs{exch scalefont d}bd
+/sffs{findfont 3 1 roll 1 index mul exch 2 index/FontMatrix get matrix copy
+scale makefont d}bd
+CP setpacking
+% vim:ff=unix:
+%%EOF
diff --git a/runtime/print/cns_roman.ps b/runtime/print/cns_roman.ps
new file mode 100644
index 0000000..dba385c
--- /dev/null
+++ b/runtime/print/cns_roman.ps
@@ -0,0 +1,23 @@
+%!PS-Adobe-3.0 Resource-Encoding
+%%Title: VIM-cns_roman
+%%Version: 1.0 0
+%%EndComments
+% Different to ASCII at code point 126
+/VIM-cns_roman[
+32{/.notdef}repeat
+/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle
+/parenleft /parenright /asterisk /plus /comma /minus /period /slash
+/zero /one /two /three /four /five /six /seven
+/eight /nine /colon /semicolon /less /equal /greater /question
+/at /A /B /C /D /E /F /G
+/H /I /J /K /L /M /N /O
+/P /Q /R /S /T /U /V /W
+/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore
+/grave /a /b /c /d /e /f /g
+/h /i /j /k /l /m /n /o
+/p /q /r /s /t /u /v /w
+/x /y /z /braceleft /bar /braceright /overline /.notdef
+128{/.notdef}repeat]
+/Encoding defineresource pop
+% vim:ff=unix:
+%%EOF
diff --git a/runtime/print/gb_roman.ps b/runtime/print/gb_roman.ps
new file mode 100644
index 0000000..fa78dbf
--- /dev/null
+++ b/runtime/print/gb_roman.ps
@@ -0,0 +1,23 @@
+%!PS-Adobe-3.0 Resource-Encoding
+%%Title: VIM-gb_roman
+%%Version: 1.0 0
+%%EndComments
+% Different to ASCII at code points 36 and 126
+/VIM-gb_roman[
+32{/.notdef}repeat
+/space /exclam /quotedbl /numbersign /yuan /percent /ampersand /quotesingle
+/parenleft /parenright /asterisk /plus /comma /minus /period /slash
+/zero /one /two /three /four /five /six /seven
+/eight /nine /colon /semicolon /less /equal /greater /question
+/at /A /B /C /D /E /F /G
+/H /I /J /K /L /M /N /O
+/P /Q /R /S /T /U /V /W
+/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore
+/grave /a /b /c /d /e /f /g
+/h /i /j /k /l /m /n /o
+/p /q /r /s /t /u /v /w
+/x /y /z /braceleft /bar /braceright /overline /.notdef
+128{/.notdef}repeat]
+/Encoding defineresource pop
+% vim:ff=unix:
+%%EOF
diff --git a/runtime/print/jis_roman.ps b/runtime/print/jis_roman.ps
new file mode 100644
index 0000000..f24a806
--- /dev/null
+++ b/runtime/print/jis_roman.ps
@@ -0,0 +1,23 @@
+%!PS-Adobe-3.0 Resource-Encoding
+%%Title: VIM-jis_roman
+%%Version: 1.0 0
+%%EndComments
+% Different to ASCII at code points 92 and 126
+/VIM-jis_roman[
+32{/.notdef}repeat
+/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle
+/parenleft /parenright /asterisk /plus /comma /minus /period /slash
+/zero /one /two /three /four /five /six /seven
+/eight /nine /colon /semicolon /less /equal /greater /question
+/at /A /B /C /D /E /F /G
+/H /I /J /K /L /M /N /O
+/P /Q /R /S /T /U /V /W
+/X /Y /Z /bracketleft /yen /bracketright /asciicircum /underscore
+/grave /a /b /c /d /e /f /g
+/h /i /j /k /l /m /n /o
+/p /q /r /s /t /u /v /w
+/x /y /z /braceleft /bar /braceright /overline /.notdef
+128{/.notdef}repeat]
+/Encoding defineresource pop
+% vim:ff=unix:
+%%EOF
diff --git a/runtime/print/ks_roman.ps b/runtime/print/ks_roman.ps
new file mode 100644
index 0000000..b688550
--- /dev/null
+++ b/runtime/print/ks_roman.ps
@@ -0,0 +1,23 @@
+%!PS-Adobe-3.0 Resource-Encoding
+%%Title: VIM-ks_roman
+%%Version: 1.0 0
+%%EndComments
+% Different to ASCII at code points 96 and 126
+/VIM-ks_roman[
+32{/.notdef}repeat
+/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle
+/parenleft /parenright /asterisk /plus /comma /minus /period /slash
+/zero /one /two /three /four /five /six /seven
+/eight /nine /colon /semicolon /less /equal /greater /question
+/at /A /B /C /D /E /F /G
+/H /I /J /K /L /M /N /O
+/P /Q /R /S /T /U /V /W
+/X /Y /Z /bracketleft /won /bracketright /asciicircum /underscore
+/grave /a /b /c /d /e /f /g
+/h /i /j /k /l /m /n /o
+/p /q /r /s /t /u /v /w
+/x /y /z /braceleft /bar /braceright /overline /.notdef
+128{/.notdef}repeat]
+/Encoding defineresource pop
+% vim:ff=unix:
+%%EOF
diff --git a/runtime/print/prolog.ps b/runtime/print/prolog.ps
index 8587ef2..6208569 100644
--- a/runtime/print/prolog.ps
+++ b/runtime/print/prolog.ps
@@ -5,13 +5,15 @@
 % Editing of this file is NOT RECOMMENDED.  You run a very good risk of causing
 % all PostScript printing from VIM failing if you do.  PostScript is not called
 % a write-only language for nothing!
+/packedarray where not{userdict begin/setpacking/pop load def/currentpacking
+false def end}{pop}ifelse/CP currentpacking def true setpacking
 /bd{bind def}bind def/ld{load def}bd/ed{exch def}bd/d/def ld
 /db{dict begin}bd/cde{currentdict end}bd
 /T true d/F false d
 /SO null d/sv{/SO save d}bd/re{SO restore}bd
 /L2 systemdict/languagelevel 2 copy known{get exec}{pop pop 1}ifelse 2 ge d
-/m{moveto}bd/s{show}bd/ms{m s}bd/g{setgray}bd/r{setrgbcolor}bd/sp{showpage}bd
-/gs{gsave}bd/gr{grestore}bd/cp{currentpoint}bd
+/m/moveto ld/s/show ld /ms{m s}bd /g/setgray ld/r/setrgbcolor ld/sp{showpage}bd
+/gs/gsave ld/gr/grestore ld/cp/currentpoint ld
 /ul{gs UW setlinewidth cp UO add 2 copy newpath m 3 1 roll add exch lineto
 stroke gr}bd
 /bg{gs r cp BO add 4 -2 roll rectfill gr}bd
@@ -36,6 +38,7 @@
 ifelse 2 copy known{2 copy get dup maxlength dict copy[/questiondown/space]{2
 copy known{2 copy get 2 index/.notdef 3 -1 roll put pop exit}if pop}forall put
 }{pop pop}ifelse dup NFD/FontName 3 -1 roll put NFD definefont pop end}bd
+CP setpacking
 (\004)cvn{}bd
 % vim:ff=unix:
 %%EOF
diff --git a/runtime/syntax/forth.vim b/runtime/syntax/forth.vim
index 6e737d3..2d1441c 100644
--- a/runtime/syntax/forth.vim
+++ b/runtime/syntax/forth.vim
@@ -1,9 +1,9 @@
 " Vim syntax file
 " Language:    FORTH
 " Maintainer:  Christian V. J. Brüssow <cvjb@cvjb.de>
-" Last Change: Son 22 Jun 2003 20:42:55 CEST
+" Last Change: Di 06 Jul 2004 18:40:33 CEST
 " Filenames:   *.fs,*.ft
-" URL:	       http://www.cvjb.de/comp/vim/forth.vim
+" URL:         http://www.cvjb.de/comp/vim/forth.vim
 
 " $Id$
 
@@ -13,12 +13,16 @@
 
 " Many Thanks to...
 "
+" 2004-07-06:
+" Changed "syn sync ccomment maxlines=200" line: splitted it into two separate
+" lines.
+"
 " 2003-05-10:
 " Andrew Gaul <andrew at gaul.org> send me a patch for
 " forthOperators.
 "
 " 2003-04-03:
-" Ron Aaron <ron at ronware.org> made updates for an
+" Ron Aaron <ronaharon at yahoo.com> made updates for an
 " improved Win32Forth support.
 "
 " 2002-04-22:
@@ -46,7 +50,8 @@
 endif
 
 " Synchronization method
-syn sync ccomment maxlines=200
+syn sync ccomment
+syn sync maxlines=200
 
 " I use gforth, so I set this to case ignore
 syn case ignore
@@ -189,10 +194,10 @@
 " For version 5.8 and later: only when an item doesn't have highlighting yet
 if version >= 508 || !exists("did_forth_syn_inits")
     if version < 508
-	let did_forth_syn_inits = 1
-	command -nargs=+ HiLink hi link <args>
+        let did_forth_syn_inits = 1
+        command -nargs=+ HiLink hi link <args>
     else
-	command -nargs=+ HiLink hi def link <args>
+        command -nargs=+ HiLink hi def link <args>
     endif
 
     " The default methods for highlighting. Can be overriden later.
diff --git a/runtime/syntax/iss.vim b/runtime/syntax/iss.vim
index be8901c..557cd0a 100644
--- a/runtime/syntax/iss.vim
+++ b/runtime/syntax/iss.vim
@@ -1,7 +1,7 @@
 " Vim syntax file
 " Language:	Inno Setup File (iss file) and My InnoSetup extension
 " Maintainer:	Dominique Stéphan (dominique@mggen.com)
-" Last change:	2003 May 11
+" Last change:	2004 July 5
 
 " For version 5.x: Clear all syntax items
 " For version 6.x: Quit when a syntax file was already loaded
@@ -25,16 +25,18 @@
 
 " syn match  issName		"[^: ]\+:"
 syn match  issName		"Name:"
-syn match  issName		"MinVersion:\|OnlyBelowVersion:"
+syn match  issName		"MinVersion:\|OnlyBelowVersion:\|Languages:"
 syn match  issName		"Source:\|DestDir:\|DestName:\|CopyMode:"
-syn match  issName		"Attribs:\|FontInstall:\|Flags:"
-syn match  issName		"FileName:\|Parameters:\|WorkingDir:\|Comment:"
+syn match  issName		"Attribs:\|Permissions:\|FontInstall:\|Flags:"
+syn match  issName		"FileName:\|Parameters:\|WorkingDir:\|HotKey:\|Comment:"
 syn match  issName		"IconFilename:\|IconIndex:"
 syn match  issName		"Section:\|Key:\|String:"
 syn match  issName		"Root:\|SubKey:\|ValueType:\|ValueName:\|ValueData:"
 syn match  issName		"RunOnceId:"
 syn match  issName		"Type:"
-syn match  issName		"Components:\|Description:\|GroupDescription\|Types:"
+syn match  issName		"Components:\|Description:\|GroupDescription:\|Types:\|ExtraDiskSpaceRequired:"
+syn match  issName              "StatusMsg:\|RunOnceId:\|Tasks:"
+syn match  issName              "MessagesFile:\|LicenseFile:\|InfoBeforeFile:\|InfoAfterFile:"
 
 syn match  issComment		"^;.*$"
 
@@ -48,15 +50,19 @@
 syn keyword issDirsFlags deleteafterinstall uninsalwaysuninstall uninsneveruninstall
 
 " [Files]
-syn keyword issFilesCopyMode normal onlyifdoesntexist alwaysoverwrite alwaysskipifsameorolder
+syn keyword issFilesCopyMode normal onlyifdoesntexist alwaysoverwrite alwaysskipifsameorolder dontcopy
 syn keyword issFilesAttribs readonly hidden system
-syn keyword issFilesFlags comparetimestampalso confirmoverwrite deleteafterinstall
-syn keyword issFilesFlags external fontisnttruetype isreadme overwritereadonly
-syn keyword issFilesFlags regserver regtypelib restartreplace
-syn keyword issFilesFlags sharedfile skipifsourcedoesntexist uninsneveruninstall
+syn keyword issFilesPermissions full modify readexec
+syn keyword issFilesFlags allowunsafefiles comparetimestampalso confirmoverwrite deleteafterinstall
+syn keyword issFilesFlags dontcopy dontverifychecksum external fontisnttruetype ignoreversion 
+syn keyword issFilesFlags isreadme onlyifdestfileexists onlyifdoesntexist overwritereadonly 
+syn keyword issFilesFlags promptifolder recursesubdirs regserver regtypelib restartreplace
+syn keyword issFilesFlags sharedfile skipifsourcedoesntexist sortfilesbyextension touch 
+syn keyword issFilesFlags uninsremovereadonly uninsrestartdelete uninsneveruninstall
 
 " [Icons]
-syn keyword issIconsFlags createonlyiffileexists runminimized uninsneveruninstall useapppaths
+syn keyword issIconsFlags closeonexit createonlyiffileexists dontcloseonexit 
+syn keyword issIconsFlags runmaximized runminimized uninsneveruninstall useapppaths
 
 " [INI]
 syn keyword issINIFlags createkeyifdoesntexist uninsdeleteentry uninsdeletesection uninsdeletesectionifempty
@@ -64,22 +70,27 @@
 " [Registry]
 syn keyword issRegRootKey   HKCR HKCU HKLM HKU HKCC
 syn keyword issRegValueType none string expandsz multisz dword binary
-syn keyword issRegFlags createvalueifdoesntexist deletekey deletevalue preservestringtype
-syn keyword issRegFlags uninsclearvalue uninsdeletekey uninsdeletekeyifempty uninsdeletevalue
+syn keyword issRegFlags createvalueifdoesntexist deletekey deletevalue dontcreatekey 
+syn keyword issRegFlags preservestringtype noerror uninsclearvalue 
+syn keyword issRegFlags uninsdeletekey uninsdeletekeyifempty uninsdeletevalue
 
 " [Run] and [UninstallRun]
-syn keyword issRunFlags nowait shellexec skipifdoesntexist runminimized waituntilidle
-syn keyword issRunFlags postinstall unchecked showcheckbox
+syn keyword issRunFlags hidewizard nowait postinstall runhidden runmaximized
+syn keyword issRunFlags runminimized shellexec skipifdoesntexist skipifnotsilent 
+syn keyword issRunFlags skipifsilent unchecked waituntilidle
 
 " [Types]
 syn keyword issTypesFlags iscustom
 
 " [Components]
-syn keyword issComponentsFlags fixed restart disablenouninstallwarning
+syn keyword issComponentsFlags dontinheritcheck exclusive fixed restart disablenouninstallwarning
 
 " [UninstallDelete] and [InstallDelete]
 syn keyword issInstallDeleteType files filesandordirs dirifempty
 
+" [Tasks]
+syn keyword issTasksFlags checkedonce dontinheritcheck exclusive restart unchecked 
+
 
 " Define the default highlighting.
 " For version 5.7 and earlier: only when not done already
@@ -105,6 +116,7 @@
    HiLink issDirsFlags		Keyword
    HiLink issFilesCopyMode	Keyword
    HiLink issFilesAttribs	Keyword
+   HiLink issFilesPermissions	Keyword
    HiLink issFilesFlags		Keyword
    HiLink issIconsFlags		Keyword
    HiLink issINIFlags		Keyword
@@ -115,6 +127,7 @@
    HiLink issTypesFlags		Keyword
    HiLink issComponentsFlags	Keyword
    HiLink issInstallDeleteType	Keyword
+   HiLink issTasksFlags 	Keyword
 
 
   delcommand HiLink
diff --git a/runtime/syntax/netrwlist.vim b/runtime/syntax/netrwlist.vim
index 9628ad3..8f3091d 100644
--- a/runtime/syntax/netrwlist.vim
+++ b/runtime/syntax/netrwlist.vim
@@ -1,6 +1,6 @@
 " Language   : Netrw Remote-Directory Listing Syntax
 " Maintainer : Charles E. Campbell, Jr.
-" Last change: Jun 25, 2004
+" Last change: Jul 06, 2004
 " Version    : 2
 
 " Syntax Clearing: {{{1
@@ -11,18 +11,18 @@
 endif
 
 " Directory List Syntax Highlighting: {{{1
-syn match netrwDir				"^.*/$"			contains=netrwClassify
-syn match netrwClassify 			"[*=|@/]$"
-syn match netrwSlash contained			"/"
-syn match netrwSymLink				"^.*@$"			contains=netrwClassify
-syn match netrwComment				'".*$'			contains=netrwHide,netrwSortBy,netrwSortSeq
+syn match netrwDir				"^.*/\%(\t\|$\)"	contains=netrwClassify
+syn match netrwClassify				"[*=|@/]\%(\t\|$\)"
+syn match netrwSymLink				"^.*@\%(\t\|$\)"	contains=netrwClassify
+syn match netrwComment				'".*\%(\t\|$\)'		contains=netrwHide,netrwSortBy,netrwSortSeq
 syn match netrwHide				'^"\s*Hiding:'		skipwhite nextgroup=netrwHidePat
-syn match netrwHidePat contained		"[^,]\+"		skipwhite nextgroup=netrwHideSep
-syn match netrwHideSep contained transparent	","			skipwhite nextgroup=netrwHidePat
-syn match netrwSortBy  contained transparent	"Sorted by"		skipwhite nextgroup=netrwList
-syn match netrwSortSeq contained transparent	"Sort sequence:"	skipwhite nextgroup=netrwList
-syn match netrwList    contained		".*$"	contains=netrwComma
-syn match netrwComma	contained	","
+syn match netrwSlash	contained			"/"
+syn match netrwHidePat	contained		"[^,]\+"		skipwhite nextgroup=netrwHideSep
+syn match netrwHideSep	contained transparent	","			skipwhite nextgroup=netrwHidePat
+syn match netrwSortBy	contained transparent	"Sorted by"		skipwhite nextgroup=netrwList
+syn match netrwSortSeq	contained transparent	"Sort sequence:"	skipwhite nextgroup=netrwList
+syn match netrwList	contained		".*$"			contains=netrwComma
+syn match netrwComma	contained		","
 
 " Highlighting Links: {{{1
 if !exists("did_drchip_dbg_syntax")
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 157eb56..b307c75 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -1,8 +1,8 @@
 " Vim syntax file
 " Language:	Vim 6.3 script
 " Maintainer:	Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
-" Last Change:	Jul 01, 2004
-" Version:	6.3-05
+" Last Change:	Jul 09, 2004
+" Version:	6.3-07
 " Automatically generated keyword lists: {{{1
 
 " Quit when a syntax file was already loaded {{{2
@@ -106,7 +106,7 @@
 
 " Functions : Tag is provided for those who wish to highlight tagged functions {{{2
 " =========
-syn cluster vimFuncList	contains=vimFuncKey,Tag,vimFuncSID
+syn cluster vimFuncList	contains=vimCommand,vimFuncKey,Tag,vimFuncSID
 syn cluster vimFuncBodyList	contains=vimIsCommand,vimFunction,vimFunctionError,vimFuncBody,vimLineComment,vimSpecFile,vimOper,vimNumber,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
 if !exists("g:vimsyntax_noerror")
  syn match   vimFunctionError	"\<fu\%[nction]!\=\s\+\zs\U\i\{-}\ze\s*("                	contains=vimFuncKey,vimFuncBlank nextgroup=vimFuncBody
@@ -183,11 +183,10 @@
 " In-String Specials: {{{2
 " Try to catch strings, if nothing else matches (therefore it must precede the others!)
 "  vimEscapeBrace handles ["]  []"] (ie. "s don't terminate string inside [])
-syn region vimEscapeBrace	oneline contained transparent	start="[^\\]\(\\\\\)*\[\^\=\]\=" skip="\\\\\|\\\]" end="\]"me=e-1
+syn region vimEscapeBrace	oneline   contained transparent start="[^\\]\(\\\\\)*\[\^\=\]\=" skip="\\\\\|\\\]" end="\]"me=e-1
 syn match  vimPatSepErr	contained	"\\)"
 syn match  vimPatSep	contained	"\\|"
-syn region vimPatSepZone	oneline contained transparent matchgroup=vimPatSep start="\\%\=(" skip="\\\\" end="\\)"	contains=@vimStringGroup
-syn region vimPatSepZone	oneline contained matchgroup=vimPatSep start="\\%\=(" skip="\\\\" end="\\)"	contains=@vimStringGroup
+syn region vimPatSepZone	oneline   contained   matchgroup=vimPatSep start="\\%\=(" skip="\\\\" end="\\)\|[^\]['"]"	contains=@vimStringGroup
 syn region vimPatRegion	contained transparent matchgroup=vimPatSep start="\\[z%]\=(" end="\\)"	contains=@vimSubstList oneline
 syn match  vimNotPatSep	contained	"\\\\"
 syn cluster vimStringGroup	contains=vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone
@@ -310,7 +309,7 @@
 
 " User Function Highlighting (following Gautam Iyer's suggestion) {{{2
 " ==========================
-syn match vimFunc		"\%([sS]:\|<[sS][iI][dD]>\)\=\I\i*\ze\s*("	contains=vimUserFunc,vimFuncName,vimCommand,vimNotFunc
+syn match vimFunc		"\%([sS]:\|<[sS][iI][dD]>\)\=\I\i*\ze\s*("	contains=vimFuncName,vimUserFunc,vimCommand,vimNotFunc,vimExecute
 syn match vimUserFunc contained	"\%([sS]:\|<[sS][iI][dD]>\)\i\+\|\<\u\i*\>\|\<if\>"	contains=vimNotation,vimCommand
 syn match vimNotFunc  contained	"\<[aiAIrR]("
 
@@ -504,6 +503,16 @@
  syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*$+ end=+\.$+ contains=@vimTclScript
 endif
 
+" [-- mzscheme --] {{{3
+if (has("mzscheme") || g:vimembedscript) && filereadable(expand("<sfile>:p:h")."/scheme.vim")
+ unlet! b:current_syntax
+ let iskKeep= &isk
+ syn include @vimMzSchemeScript <sfile>:p:h/scheme.vim
+ let &isk= iskKeep
+ syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimMzSchemeScript
+ syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+ contains=@vimMzSchemeScript
+endif
+
 " Synchronize (speed) {{{2
 "============
 if exists("g:vim_minlines")
@@ -531,7 +540,7 @@
  hi def link vimErrSetting	vimError
  hi def link vimFTError	vimError
  hi def link vimFunctionError	vimError
- hi def link VimFunc         	vimError
+ hi def link vimFunc         	vimError
  hi def link vimHiAttribList	vimError
  hi def link vimHiCtermError	vimError
  hi def link vimHiKeyError	vimError