changeset 794:f19994020dad

updated for version 7.0231
author vimboss
date Tue, 21 Mar 2006 21:29:36 +0000
parents 8c0b00d50acf
children 86ce35c9750f
files runtime/autoload/netrw.vim runtime/doc/eval.txt runtime/doc/getscript.txt runtime/doc/pi_netrw.txt runtime/doc/repeat.txt runtime/doc/tags runtime/doc/usr_toc.txt runtime/doc/various.txt runtime/filetype.vim src/edit.c src/ex_cmds2.c src/misc2.c src/undo.c src/version.h
diffstat 14 files changed, 502 insertions(+), 97 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -1,7 +1,7 @@
 " netrw.vim: Handles file transfer and remote directory listing across a network
 "            AUTOLOAD PORTION
-" Date:		Mar 14, 2006
-" Version:	81
+" Date:		Mar 21, 2006
+" Version:	82
 " Maintainer:	Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
 " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
 " Copyright:    Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
@@ -23,7 +23,7 @@
 if &cp || exists("g:loaded_netrw")
   finish
 endif
-let g:loaded_netrw = "v81"
+let g:loaded_netrw = "v82"
 if v:version < 700
  echohl WarningMsg | echo "***netrw*** you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw" | echohl None
  finish
@@ -1318,7 +1318,7 @@ fun! s:NetBrowse(dirname)
   exe 'vnoremap <buffer> <silent> D	:call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
   exe 'nnoremap <buffer> <silent> R	:call <SID>NetBrowseRename("'.user.machine.'","'.path.'")<cr>'
   exe 'vnoremap <buffer> <silent> R	:call <SID>NetBrowseRename("'.user.machine.'","'.path.'")<cr>'
-  nnoremap <buffer> ?			:he netrw-browse-cmds<cr>
+  nnoremap <buffer> <F1>			:he netrw-browse-cmds<cr>
   setlocal ma nonu nowrap
 
   " Set up the banner
@@ -2899,7 +2899,7 @@ fun! netrw#DirBrowse(dirname)
   exe 'nnoremap <buffer> <silent> R	:call <SID>LocalBrowseRename("'.b:netrw_curdir.'")<cr>'
   exe 'vnoremap <buffer> <silent> R	:call <SID>LocalBrowseRename("'.b:netrw_curdir.'")<cr>'
   exe 'nnoremap <buffer> <silent> <Leader>m :call <SID>NetMakeDir("")<cr>'
-  nnoremap <buffer> ?			:he netrw-dir<cr>
+  nnoremap <buffer> <F1>		:he netrw-dir<cr>
 
   " Set up the banner
 "  call Decho("set up banner")
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt*      For Vim version 7.0aa.  Last change: 2006 Mar 19
+*eval.txt*      For Vim version 7.0aa.  Last change: 2006 Mar 21
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1647,6 +1647,8 @@ range( {expr} [, {max} [, {stride}]])
 				List	items from {expr} to {max}
 readfile({fname} [, {binary} [, {max}]])
 				List	get list of lines from file {fname}
+reltime( [{start} [, {end}]])	List	get time value
+reltimestr( {time})		String	turn time value into a String
 remote_expr( {server}, {string} [, {idvar}])
 				String	send expression
 remote_foreground( {server})	Number	bring Vim server to the foreground
@@ -2462,21 +2464,23 @@ filter({expr}, {string})					*filter()*
 
 
 finddir({name}[, {path}[, {count}]])				*finddir()*
-		Find directory {name} in {path}.
+		Find directory {name} in {path}.  Returns the path of the
+		first found match.  When the found directory is below the
+		current directory a relative path is returned.  Otherwise a
+		full path is returned.
 		If {path} is omitted or empty then 'path' is used.
 		If the optional {count} is given, find {count}'s occurrence of
-		{name} in {path}.
+		{name} in {path} instead of the first one.
 		This is quite similar to the ex-command |:find|.
-		When the found directory is below the current directory a
-		relative path is returned.  Otherwise a full path is returned.
+		{only available when compiled with the +file_in_path feature}
+
+findfile({name}[, {path}[, {count}]])				*findfile()*
+		Just like |finddir()|, but find a file instead of a directory.
+		Uses 'suffixesadd'.
 		Example: >
 			:echo findfile("tags.vim", ".;")
 <		Searches from the current directory upwards until it finds
 		the file "tags.vim".
-		{only available when compiled with the +file_in_path feature}
-
-findfile({name}[, {path}[, {count}]])				*findfile()*
-		Just like |finddir()|, but find a file instead of a directory.
 
 filewritable({file})					*filewritable()*
 		The result is a Number, which is 1 when a file with the
@@ -3781,6 +3785,31 @@ readfile({fname} [, {binary} [, {max}]])
 		the result is an empty list.
 		Also see |writefile()|.
 
+reltime([{start} [, {end}]])				*reltime()*
+		Return an item that represents a time value.  The format of
+		the item depends on the system.  It can be passed to
+		|reltimestr()| to convert it to a string.
+		Without an argument it returns the current time.
+		With one argument is returns the time passed since the time
+		specified in the argument.
+		With two arguments it returns the time passed betweein {start}
+		and {end}.
+		The {start} and {end} arguments must be values returned by
+		reltime().
+		{only available when compiled with the +reltime feature}
+
+reltimestr({time})				*reltimestr()*
+		Return a String that represents the time value of {time}.
+		This is the number of seconds, a dot and the number of
+		microseconds.  Example: >
+			let start = reltime()
+			call MyFunction()
+			echo reltimestr(reltime(start))
+<		Note that overhead for the commands will be added to the time.
+		The accuracy depends on the system.
+		Also see |profiling|.
+		{only available when compiled with the +reltime feature}
+
 							*remote_expr()* *E449*
 remote_expr({server}, {string} [, {idvar}])
 		Send the {string} to {server}.  The string is sent as an
@@ -4632,6 +4661,9 @@ system({expr} [, {input}])				*system()*
 		For Unix and OS/2 braces are put around {expr} to allow for
 		concatenated commands.
 
+		The command will be executed in "cooked" mode, so that a
+		CTRL-C will interrupt the command (on Unix at least).
+
 		The resulting error code can be found in |v:shell_error|.
 		This function will fail in |restricted-mode|.
 
@@ -5435,6 +5467,9 @@ Also note that if you have two script fi
 other and vise versa, before the used function is defined, it won't work.
 Avoid using the autoload functionality at the toplevel.
 
+Hint: If you distribute a bunch of scripts you can pack them together with the
+|vimball| utility.  Also read the user manual |distribute-script|.
+
 ==============================================================================
 6. Curly braces names					*curly-braces-names*
 
new file mode 100644
--- /dev/null
+++ b/runtime/doc/getscript.txt
@@ -0,0 +1,301 @@
+*getscript.txt*		Get the Latest VimScripts	Dec 23, 2005
+
+Authors:  Charles E. Campbell, Jr.  <NdrOchip@ScampbellPfamilyA.Mbiz>
+	  (remove NOSPAM from the email address)
+						*GetLatestVimScripts-copyright*
+Copyright: (c) 2004-2005 by Charles E. Campbell, Jr.
+           The VIM LICENSE applies to GetLatestVimScripts.vim and
+           GetLatestVimScripts.txt (see |copyright|) except use
+           "GetLatestVimScripts" instead of "Vim".
+           No warranty, express or implied.  Use At-Your-Own-Risk.
+
+
+==============================================================================
+1. Contents						*glvs-contents*
+
+	1. Contents.......................................: |glvs-contents|
+	2. GetLatestVimScripts Usage......................: |glvs|
+	3. GetLatestVimScripts Data File..................: |glvs-data|
+	4. GetLatestVimScripts Plugins....................: |glvs-plugins|
+	5. GetLatestVimScripts AutoInstall................: |glvs-autoinstall|
+	6. GetLatestVimScripts Algorithm..................: |glvs-alg|
+	7. GetLatestVimScripts History....................: |glvs-hist|
+
+
+==============================================================================
+2. GetLatestVimScripts Usage		*getlatestvimscripts* *getscript* *glvs*
+
+	While in vim, type
+>
+		:GetLatestVimScripts
+<
+	Unless its been defined elsewhere,
+>
+		:GLVS
+<
+	will also work.
+
+	The script will attempt to update and, if so directed, automatically
+	install scripts from http://vim.sourceforge.net/.  To do so it will
+	peruse a file, [.vim|vimfiles]/GetLatest/GetLatestVimScripts.dat
+	(see |glvs-data|), and examine plugins in your [.vim|vimfiles]/plugin
+	directory (see |glvs-plugins|).
+
+	Scripts which have been downloaded will appear in the .../GetLatest
+	subdirectory.
+
+	The <GetLatestVimScripts.dat> file will be automatically be updated to
+	reflect the latest version of script(s) so downloaded.
+
+
+==============================================================================
+3. GetLatestVimScripts Data File	*getlatestvimscripts-data* *glvs-data*
+
+	The Data file has a header which should appear as:
+>
+		ScriptID SourceID Filename
+		--------------------------
+<
+	Below that are three columns; the first two are numeric followed by a
+	text column.
+
+	The first number on each line gives the script's ScriptID.  When
+	you're about to use a web browser to look at scripts on
+	http://vim.sf.net/, just before you click on the script's link, you'll
+	see a line resembling
+
+	http://vim.sourceforge.net/scripts/script.php?script_id=40
+
+	The "40" happens to be a ScriptID that GetLatestVimScripts needs to
+	download the associated page.
+
+	The second number on each line gives the script's SourceID.  The
+	SourceID records the count of uploaded scripts as determined by
+	vim.sf.net; hence it serves to indicate "when" a script was uploaded.
+	Setting the SourceID to 1 insures that GetLatestVimScripts will assume
+	that the script it has is out-of-date.
+
+	The SourceID is extracted by GetLatestVimScripts from the script's
+	page on vim.sf.net; whenever its greater than the one stored in the
+	GetLatestVimScripts.dat file, the script will be downloaded.
+
+	If your script's author has included a special comment line in his/her
+	plugin, the plugin itself will be used by GetLatestVimScripts to build
+	your <GetLatestVimScripts.dat> file, including any dependencies on
+	other scripts it may have.
+
+	If your comment field begins with :AutoInstall:, GetLatestVimScripts
+	will attempt to automatically install the script.  Thus,
+	GetLatestVimScripts thus provides a comprehensive ability to keep your
+	plugins up-to-date!
+
+==============================================================================
+4. GetLatestVimScripts Plugins	*getlatestvimscripts-plugins* *glvs-plugins*
+
+
+	If a plugin author includes the following comment anywhere in their
+	plugin, GetLatestVimScripts will find it and use it to build user's
+	GetLatestVimScripts.dat files:
+>
+	                             src_id
+		                            v
+		" GetLatestVimScripts: ### ### yourscriptname
+		                        ^
+		                    scriptid
+<   
+	As an author, you should include such a line in to refer to your own
+	script plus any additional lines describing any plugin dependencies it
+	may have.  Same format, of course!
+
+	If your command is auto-installable (see |glvs-autoinstall|), and most
+	scripts are, then you may include :AutoInstall: at the start of
+	"yourscriptname".
+
+	GetLatestVimScript commands for those scripts are then appended, if
+	not already present, to the user's GetLatest/GetLatestVimScripts.dat
+	file.  Its a relatively painless way to automate the acquisition of
+	any scripts your plugins depend upon.
+
+	Now, as an author, you probably don't want GetLatestVimScripts to
+	download your own scripts for you yourself, thereby overwriting your
+	not-yet-released hard work.  GetLatestVimScripts provides a solution
+	for this:  put
+>
+		0 0 yourscriptname
+<
+	into your <GetLatestVimScripts.dat> file and GetLatestVimScripts will
+	skip examining the "yourscriptname" scripts for those
+	GetLatestVimScript comment lines.  As a result, those lines won't be
+	inadvertently installed into your <GetLatestVimScripts.dat> file and
+	subsequently used to download your own scripts.  This is especially
+	important to do if you've included the :AutoInstall: option.
+
+	Be certain to use the same "yourscriptname" in the "0 0
+	yourscriptname" line as you've used in your GetLatestVimScript
+	comment!
+
+
+==============================================================================
+5. GetLatestVimScripts AutoInstall	*getlatestvimscripts-autoinstall*
+					*glvs-autoinstall*
+
+	GetLatestVimScripts now supports "AutoInstall".  Not all scripts are
+	supportive of auto-install, as they may have special things you need
+	to do to install them (please refer to the script's "install"
+	directions).  On the other hand, most scripts will be
+	auto-installable.
+	
+	To let GetLatestVimScripts do an autoinstall, the data file's comment
+	field should begin with (surrounding blanks are ignored):
+	
+		:AutoInstall:
+	
+	Both colons are needed, and it should begin the comment
+	(yourscriptname) field.
+
+	One may prevent any autoinstalling by putting the following line
+	in your <.vimrc>:
+>
+		let g:GetLatestVimScripts_allowautoinstall= 0
+<
+	
+	With :AutoInstall: enabled, as it is by default, files which end with
+	
+	  ---.tar.bz2  : decompressed and untarred in [.vim|vimfiles] directory
+	  ---.tar.gz   : decompressed and untarred in [.vim|vimfiles] directory
+	  ---.vim.bz2  : decompressed and moved to the .vim/plugin directory
+	  ---.vim.gz   : decompressed and moved to the .vim/plugin directory
+	  ---.zip      : unzipped in [.vim|vimfiles] directory
+	  ---.vim      : moved to [.vim|vimfiles]/plugin directory
+	
+	and which merely need to have their components placed by the
+	untar/gunzip or move-to-plugin-directory process should be
+	auto-installable.
+
+	When is a script not auto-installable?  Let me give an example:
+>
+		[.vim|vimfiles]/after/syntax/blockhl.vim
+<
+	The <blockhl.vim> script provides block highlighting for C/C++
+	programs; it is available at:
+>
+		http://vim.sourceforge.net/scripts/script.php?script_id=104
+<
+	Currently, vim's after/syntax only supports by-filetype scripts (in
+	blockhl.vim's case, that's after/syntax/c.vim).  Hence, auto-install
+	would possibly overwrite the current user's after/syntax/c.vim file.
+	
+	In my own case, I use <aftersyntax.vim> (renamed to
+	after/syntax/c.vim) to allow a after/syntax/c/ directory:
+>
+		http://vim.sourceforge.net/scripts/script.php?script_id=1023
+<
+	The script allows multiple syntax files to exist separately in the
+	after/syntax/c subdirectory.  I can't bundle aftersyntax.vim in and
+	build an appropriate tarball for auto-install because of the potential
+	for the after/syntax/c.vim contained in it to overwrite a user's
+	c.vim.
+
+
+==============================================================================
+6. GetLatestVimScripts Algorithm	*getlatestvimscripts-algorithm*
+								*glvs-alg*
+
+	The Vim sourceforge page dynamically creates a page by keying off of
+	the so-called script-id.  Within the webpage of
+
+		http://vim.sourceforge.net/scripts/script.php?script_id=40
+
+	is a line specifying the latest source-id (src_id).  The source
+	identifier numbers are always increasing, hence if the src_id is
+	greater than the one recorded for the script in GetLatestVimScripts
+	then its time to download a newer copy of that script.
+
+	GetLatestVimScripts will then download the script and update its
+	internal database of script ids, source ids, and scriptnames.
+
+	The AutoInstall process will:
+
+		Move the file from GetLatest/ to the following directory
+			Unix   : $HOME/.vim
+			Windows: $HOME\vimfiles
+	
+		if the downloaded file ends with ".bz2"
+			bunzip2 it
+		else if the downloaded file ends with ".gz"
+			gunzip it
+		if the resulting file ends with ".zip"
+			unzip it
+		else if the resulting file ends with ".tar"
+			tar -oxvf it
+		else if the resulting file ends with ".vim"
+			move it to the plugin subdirectory
+
+
+==============================================================================
+7. GetLatestVimScripts History       *getlatestvimscripts-history* *glvs-hist*
+
+	v20 Dec 23, 2005 : * Eric Haarbauer found&fixed a bug with unzip use;
+	                     unzip needs the -o flag to overwrite.
+	v19 Nov 28, 2005 : * v18's GetLatestVimScript line accessed the wrong
+	                     script! Fixed.
+	v18 Mar 21, 2005 : * bugfix to automatic database construction
+	                   * bugfix - nowrapscan caused an error
+	                     (tnx to David Green for the fix)
+	    Apr 01, 2005   * if shell is bash, "mv" instead of "ren" used in
+	                     :AutoInstall:s, even though its o/s is windows
+	    Apr 01, 2005   * when downloading errors occurred, GLVS was
+	                     terminating early.  It now just goes on to trying
+	                     the next script (after trying three times to
+	                     download a script description page)
+	    Apr 20, 2005   * bugfix - when a failure to download occurred,
+	                     GetLatestVimScripts would stop early and claim that
+	                     everything was current.  Fixed.
+	v17 Aug 25, 2004 : * g:GetLatestVimScripts_allowautoinstall, which
+	                     defaults to 1, can be used to prevent all
+	                     :AutoInstall:
+	v16 Aug 25, 2004 : * made execution of bunzip2/gunzip/tar/zip silent
+	                   * fixed bug with :AutoInstall: use of helptags
+	v15 Aug 24, 2004 : * bugfix: the "0 0 comment" download prevention wasn't
+	                     always preventing downloads (just usually).  Fixed.
+	v14 Aug 24, 2004 : * bugfix -- helptags was using dotvim, rather than
+	                     s:dotvim.  Fixed.
+	v13 Aug 23, 2004 : * will skip downloading a file if its scriptid or srcid
+	                     is zero.  Useful for script authors; that way their
+	                     own GetLatestVimScripts activity won't overwrite
+	                     their scripts.
+	v12 Aug 23, 2004 : * bugfix - a "return" got left in the distribution that
+	                     was intended only for testing.  Removed, now works.
+	                   * :AutoInstall: implemented
+	v11 Aug 20, 2004 : * GetLatestVimScripts is now a plugin:
+	                   * :GetLatestVimScripts command
+	                   * (runtimepath)/GetLatest/GetLatestVimScripts.dat
+	                     now holds scripts that need updating
+	v10 Apr 19, 2004 : * moved history from script to doc
+	v9  Jan 23, 2004 :   windows (win32/win16/win95) will use
+	                     double quotes ("") whereas other systems will use
+	                     single quotes ('') around the urls in calls via wget
+	v8  Dec 01, 2003 :   makes three tries at downloading
+	v7  Sep 02, 2003 :   added error messages if "Click on..." or "src_id="
+	                     not found in downloaded webpage
+	                     Uses t_ti, t_te, and rs to make progress visible
+	v6  Aug 06, 2003 :   final status messages now display summary of work
+	                     ( "Downloaded someqty scripts" or
+	                       "Everything was current")
+	                     Now GetLatestVimScripts is careful about downloading
+	                     GetLatestVimScripts.vim itself!
+	                     (goes to <NEW_GetLatestVimScripts.vim>)
+	v5  Aug 04, 2003 :   missing an endif near bottom
+	v4  Jun 17, 2003 :   redraw! just before each "considering" message
+	v3  May 27, 2003 :   Protects downloaded files from errant shell
+	                     expansions with single quotes: '...'
+	v2  May 14, 2003 :   extracts name of item to be obtained from the
+	                     script file.  Uses it instead of comment field
+	                     for output filename; comment is used in the
+	                     "considering..." line and is now just a comment!
+	                   * Fixed a bug: a string-of-numbers is not the
+	                     same as a number, so I added zero to them
+	                     and they became numbers.  Fixes comparison.
+
+==============================================================================
+vim:tw=78:ts=8:ft=help
--- a/runtime/doc/pi_netrw.txt
+++ b/runtime/doc/pi_netrw.txt
@@ -1,4 +1,4 @@
-*pi_netrw.txt*  For Vim version 7.0.  Last change: Mar 14, 2006
+*pi_netrw.txt*  For Vim version 7.0.  Last change: Mar 21, 2006
 
 		VIM REFERENCE MANUAL    by Charles E. Campbell, Jr.
 
@@ -10,7 +10,7 @@
 ==============================================================================
 0. Contents						*netrw-contents*
 
-1.  Starting With Netrw.................................|netrw-start|
+1.  Starting With Netrw..................................|netrw-start|
 2.  Netrw Reference......................................|netrw-ref|
       CONTROLLING EXTERNAL APPLICATIONS..................|netrw-externapp|
       READING............................................|netrw-read|
@@ -162,7 +162,7 @@ READING						*netrw-read* *netrw-nread*
 	:Nread "sftp://[user@]machine/path"		uses sftp
 
 WRITING						*netrw-write* *netrw-nwrite*
-	:Nwrite ?    					give help
+	:Nwrite ?					give help
 	:Nwrite "machine:path"				uses rcp
 	:Nwrite "machine path"				uses ftp w/ <.netrc>
 	:Nwrite "machine id password path"		uses ftp
@@ -208,7 +208,7 @@ VARIABLES						*netrw-variables*
 			="ascii"
 
  *g:netrw_ignorenetrc*	=0 (default)
- 			=1 If you have a <.netrc> file but it doesn't work and
+			=1 If you have a <.netrc> file but it doesn't work and
 			   you want it ignored, then set this variable as shown.
 
  *g:netrw_uid*		(ftp) user-id,      retained on a per-session basis
@@ -267,10 +267,12 @@ series of commands (typically ftp) which
 from/written to a temporary file (under Unix/Linux, /tmp/...) which the
 <netrw.vim> script will clean up.
 
+						*netrw-putty* *netrw-pscp*
 One may modify any protocol's implementing external application by setting a
 variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to
-"scp -q").
-
+"scp -q").  As an example, consider using PuTTY: >
+	let g:netrw_scp_cmd= '"c:\Program Files\PuTTY\pscp.exe" -q -batch'
+<
 Ftp, an old protocol, seems to be blessed by numerous implementations.
 Unfortunately, some implementations are noisy (ie., add junk to the end of the
 file).  Thus, concerned users may decide to write a NetReadFixup() function
@@ -457,7 +459,7 @@ additional commands available.
 
 
 ==============================================================================
-7. Variables and Options       			*netrw-options* *netrw-var*
+7. Variables and Options			*netrw-options* *netrw-var*
 
 The script <netrw.vim> uses several variables which can affect <netrw.vim>'s
 behavior.  These variables typically may be set in the user's <.vimrc> file:
@@ -589,7 +591,7 @@ To handle the SSL certificate dialog for
 down the certificate and place it into /usr/ssl/cert.pem.  This operation
 renders the server treatment as "trusted".
 
-					 	*netrw-fixup* *netreadfixup*
+						*netrw-fixup* *netreadfixup*
 If your ftp for whatever reason generates unwanted lines (such as AUTH
 messages) you may write a NetReadFixup(tmpfile) function:
 >
@@ -629,8 +631,8 @@ itself:
 ==============================================================================
 8. Directory Browsing	*netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
 
-MAPS   								*netrw-maps*
-     ?................Help.......................................|netrw-help|
+MAPS								*netrw-maps*
+     <F1>.............Help.......................................|netrw-help|
      <cr>.............Browsing...................................|netrw-cr|
      <del>............Deleting Files or Directories..............|netrw-delete|
      -................Going Up...................................|netrw--|
@@ -664,12 +666,12 @@ MAPS   								*netrw-maps*
      :Nexplore[!] [dir] Vertical Split & Explore.................|netrw-explore|
      :NetrwSettings.............................................|netrw-settings|
 
-QUICK REFERENCE COMMANDS TABLE     			*netrw-browse-cmds*
+QUICK REFERENCE COMMANDS TABLE				*netrw-browse-cmds*
 >
         -------	-----------
 	Command	Explanation
         -------	-----------
-<          ?	Causes Netrw to issue help
+<	<F1>	Causes Netrw to issue help
 	 <cr>	Netrw will enter the directory or read the file |netrw-cr|
 	 <del>	Netrw will attempt to remove the file/directory |netrw-del|
 	   -	Makes Netrw go up one directory |netrw--|
@@ -713,7 +715,7 @@ NETRW BROWSER VARIABLES					*netrw-brows
 				 default: =0
 
   *g:netrw_altv*		change from left splitting to right splitting
- 				by setting this variable (see |netrw-v|)
+				by setting this variable (see |netrw-v|)
 				 default: =0
 
   *g:netrw_browse_split*	when browsing, <cr> will open the file by:
@@ -731,7 +733,7 @@ NETRW BROWSER VARIABLES					*netrw-brows
 				extension.  (see |netrw_filehandler|).
 
   *g:netrw_fastbrowse*		=0: slow speed browsing, never re-use
-  				    directory listings; always obtain
+				    directory listings; always obtain
 				    directory listings.
 				=1: medium speed browsing, re-use directory
 				    listings only when remote browsing.
@@ -824,7 +826,7 @@ NETRW BROWSER VARIABLES					*netrw-brows
 				           \.info$,\.swp$,\.obj$'
 
   *g:netrw_ssh_cmd*		One may specify an executable command
-  				to use instead of ssh for remote actions
+				to use instead of ssh for remote actions
 				such as listing, file removal, etc.
 				 default: ssh
 
@@ -833,7 +835,7 @@ NETRW BROWSER VARIABLES					*netrw-brows
 				want masquerading as "directories" and "files".
 				Use this pattern to remove such embedded
 				messages.  By default its value is:
- 					 '^total\s\+\d\+$'
+					 '^total\s\+\d\+$'
 
   *g:netrw_timefmt*		specify format string to strftime() (%c)
 				 default: "%c"
@@ -842,7 +844,7 @@ NETRW BROWSER VARIABLES					*netrw-brows
 				 default: ""
 
   *g:DrChipTopLvlMenu*		This variable specifies the top level
-  				submenu name; by default, its "DrChip.".
+				submenu name; by default, its "DrChip.".
 				If you wish to change this, do so in your
 				.vimrc.  It affects all of my plugins which
 				have menus.
@@ -971,7 +973,7 @@ preferred.  The NetList function which i
 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.
@@ -1311,6 +1313,9 @@ For Linux/Unix systems, I suggest lookin
 It gives a tip for setting up password-less use of ssh and scp, and discusses
 the associated security issues.
 
+For Windows, the vim mailing list has mentioned that Pageant helps with
+avoiding the constant need to enter the password.
+
 
 NETRW SETTINGS						*netrw-settings*
 
@@ -1384,7 +1389,7 @@ 9. Problems and Fixes						*netrw-proble
 	P6. I want my current directory to track my browsing.
 	    How do I do that?
 
-	    	let g:netrw_keepdir= 0
+		let g:netrw_keepdir= 0
 
 
 ==============================================================================
--- a/runtime/doc/repeat.txt
+++ b/runtime/doc/repeat.txt
@@ -1,4 +1,4 @@
-*repeat.txt*    For Vim version 7.0aa.  Last change: 2006 Mar 20
+*repeat.txt*    For Vim version 7.0aa.  Last change: 2006 Mar 21
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -561,6 +561,9 @@ functions and/or scripts.  The |+profile
 It is only included when Vim was compiled with "huge" features.
 {Vi does not have profiling}
 
+You can also use the |reltime()| function to measure time.  This only requires
+the |+reltime| feature, which is present more often.
+
 :prof[ile] start {fname}			*:prof* *:profile* *E750*
 		Start profiling, write the output in {fname} upon exit.
 		If {fname} already exists it will be silently overwritten.
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -1128,6 +1128,7 @@
 +python	various.txt	/*+python*
 +python/dyn	various.txt	/*+python\/dyn*
 +quickfix	various.txt	/*+quickfix*
++reltime	various.txt	/*+reltime*
 +rightleft	various.txt	/*+rightleft*
 +ruby	various.txt	/*+ruby*
 +ruby/dyn	various.txt	/*+ruby\/dyn*
@@ -1618,6 +1619,7 @@ 41.12	usr_41.txt	/*41.12*
 41.13	usr_41.txt	/*41.13*
 41.14	usr_41.txt	/*41.14*
 41.15	usr_41.txt	/*41.15*
+41.16	usr_41.txt	/*41.16*
 41.2	usr_41.txt	/*41.2*
 41.3	usr_41.txt	/*41.3*
 41.4	usr_41.txt	/*41.4*
@@ -1700,6 +1702,7 @@ 90.5	usr_90.txt	/*90.5*
 :Explore	pi_netrw.txt	/*:Explore*
 :Hexplore	pi_netrw.txt	/*:Hexplore*
 :Man	filetype.txt	/*:Man*
+:MkVimball	vimball.txt	/*:MkVimball*
 :N	editing.txt	/*:N*
 :Nexplore	pi_netrw.txt	/*:Nexplore*
 :Next	editing.txt	/*:Next*
@@ -4043,6 +4046,7 @@ GTK+	gui_x11.txt	/*GTK+*
 GUI	gui.txt	/*GUI*
 GUI-X11	gui_x11.txt	/*GUI-X11*
 GUIEnter	autocmd.txt	/*GUIEnter*
+GetLatestVimScripts-copyright	getscript.txt	/*GetLatestVimScripts-copyright*
 Gnome	gui_x11.txt	/*Gnome*
 H	motion.txt	/*H*
 I	insert.txt	/*I*
@@ -4222,6 +4226,7 @@ VimEnter	autocmd.txt	/*VimEnter*
 VimLeave	autocmd.txt	/*VimLeave*
 VimLeavePre	autocmd.txt	/*VimLeavePre*
 VimResized	autocmd.txt	/*VimResized*
+Vimball-copyright	vimball.txt	/*Vimball-copyright*
 Virtual-Replace-mode	insert.txt	/*Virtual-Replace-mode*
 VisVim	if_ole.txt	/*VisVim*
 Visual	visual.txt	/*Visual*
@@ -4919,6 +4924,7 @@ dip	motion.txt	/*dip*
 dircolors.vim	syntax.txt	/*dircolors.vim*
 dis	motion.txt	/*dis*
 disable-menus	gui.txt	/*disable-menus*
+distribute-script	usr_41.txt	/*distribute-script*
 distribution	intro.txt	/*distribution*
 diw	motion.txt	/*diw*
 dl	change.txt	/*dl*
@@ -5430,12 +5436,20 @@ getfperm()	eval.txt	/*getfperm()*
 getfsize()	eval.txt	/*getfsize()*
 getftime()	eval.txt	/*getftime()*
 getftype()	eval.txt	/*getftype()*
+getlatestvimscripts	getscript.txt	/*getlatestvimscripts*
+getlatestvimscripts-algorithm	getscript.txt	/*getlatestvimscripts-algorithm*
+getlatestvimscripts-autoinstall	getscript.txt	/*getlatestvimscripts-autoinstall*
+getlatestvimscripts-data	getscript.txt	/*getlatestvimscripts-data*
+getlatestvimscripts-history	getscript.txt	/*getlatestvimscripts-history*
+getlatestvimscripts-plugins	getscript.txt	/*getlatestvimscripts-plugins*
 getline()	eval.txt	/*getline()*
 getloclist()	eval.txt	/*getloclist()*
 getpos()	eval.txt	/*getpos()*
 getqflist()	eval.txt	/*getqflist()*
 getreg()	eval.txt	/*getreg()*
 getregtype()	eval.txt	/*getregtype()*
+getscript	getscript.txt	/*getscript*
+getscript.txt	getscript.txt	/*getscript.txt*
 getwinposx()	eval.txt	/*getwinposx()*
 getwinposy()	eval.txt	/*getwinposy()*
 getwinvar()	eval.txt	/*getwinvar()*
@@ -5451,6 +5465,13 @@ global-ime	mbyte.txt	/*global-ime*
 global-local	options.txt	/*global-local*
 global-variable	eval.txt	/*global-variable*
 globpath()	eval.txt	/*globpath()*
+glvs	getscript.txt	/*glvs*
+glvs-alg	getscript.txt	/*glvs-alg*
+glvs-autoinstall	getscript.txt	/*glvs-autoinstall*
+glvs-contents	getscript.txt	/*glvs-contents*
+glvs-data	getscript.txt	/*glvs-data*
+glvs-hist	getscript.txt	/*glvs-hist*
+glvs-plugins	getscript.txt	/*glvs-plugins*
 gm	motion.txt	/*gm*
 gnome-session	gui_x11.txt	/*gnome-session*
 go	motion.txt	/*go*
@@ -6214,6 +6235,8 @@ netrw-preview	pi_netrw.txt	/*netrw-previ
 netrw-problems	pi_netrw.txt	/*netrw-problems*
 netrw-protocol	pi_netrw.txt	/*netrw-protocol*
 netrw-prvwin	pi_netrw.txt	/*netrw-prvwin*
+netrw-pscp	pi_netrw.txt	/*netrw-pscp*
+netrw-putty	pi_netrw.txt	/*netrw-putty*
 netrw-q	pi_netrw.txt	/*netrw-q*
 netrw-r	pi_netrw.txt	/*netrw-r*
 netrw-read	pi_netrw.txt	/*netrw-read*
@@ -6440,6 +6463,7 @@ popt-option	print.txt	/*popt-option*
 popup-menu	gui.txt	/*popup-menu*
 popup-menu-added	version5.txt	/*popup-menu-added*
 popupmenu-completion	insert.txt	/*popupmenu-completion*
+popupmenu-keys	insert.txt	/*popupmenu-keys*
 ports-5.2	version5.txt	/*ports-5.2*
 ports-6	version6.txt	/*ports-6*
 posix	vi_diff.txt	/*posix*
@@ -6571,6 +6595,8 @@ register-faq	sponsor.txt	/*register-faq*
 register-variable	eval.txt	/*register-variable*
 registers	change.txt	/*registers*
 regular-expression	pattern.txt	/*regular-expression*
+reltime()	eval.txt	/*reltime()*
+reltimestr()	eval.txt	/*reltimestr()*
 remote.txt	remote.txt	/*remote.txt*
 remote_expr()	eval.txt	/*remote_expr()*
 remote_foreground()	eval.txt	/*remote_foreground()*
@@ -7529,6 +7555,13 @@ vim-script-intro	usr_41.txt	/*vim-script
 vim-variable	eval.txt	/*vim-variable*
 vim.vim	syntax.txt	/*vim.vim*
 vim:	options.txt	/*vim:*
+vimball	vimball.txt	/*vimball*
+vimball-contents	vimball.txt	/*vimball-contents*
+vimball-extract	vimball.txt	/*vimball-extract*
+vimball-history	vimball.txt	/*vimball-history*
+vimball-manual	vimball.txt	/*vimball-manual*
+vimball-vimballlist	vimball.txt	/*vimball-vimballlist*
+vimball.txt	vimball.txt	/*vimball.txt*
 vimdev	intro.txt	/*vimdev*
 vimdiff	diff.txt	/*vimdiff*
 vimfiles	options.txt	/*vimfiles*
--- a/runtime/doc/usr_toc.txt
+++ b/runtime/doc/usr_toc.txt
@@ -1,4 +1,4 @@
-*usr_toc.txt*	For Vim version 7.0aa.  Last change: 2006 Mar 17
+*usr_toc.txt*	For Vim version 7.0aa.  Last change: 2006 Mar 21
 
 		     VIM USER MANUAL - by Bram Moolenaar
 
@@ -296,6 +296,7 @@ Make Vim work as you like it.
 		|41.13|	Writing a compiler plugin
 		|41.14|	Writing a plugin that loads quickly
 		|41.15|	Writing library scripts
+		|41.16|	Distributing Vim scripts
 
 |usr_42.txt|  Add new menus
 		|42.1|	Introduction
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -1,4 +1,4 @@
-*various.txt*   For Vim version 7.0aa.  Last change: 2006 Mar 17
+*various.txt*   For Vim version 7.0aa.  Last change: 2006 Mar 21
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -355,6 +355,7 @@ H  *+profile*		|:profile| command
 m  *+python*		Python interface |python|
 m  *+python/dyn*	Python interface |python-dynamic| |/dyn|
 N  *+quickfix*		|:make| and |quickfix| commands
+N  *+reltime*		|reltime()| function
 B  *+rightleft*		Right to left typing |'rightleft'|
 m  *+ruby*		Ruby interface |ruby|
 m  *+ruby/dyn*		Ruby interface |ruby-dynamic| |/dyn|
--- 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:	2006 Mar 13
+" Last Change:	2006 Mar 21
 
 " Listen very carefully, I will say this only once
 if exists("did_load_filetypes")
@@ -1748,7 +1748,7 @@ au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl
 au BufNewFile,BufRead *.vhdl_[0-9]*		call s:StarSetf('vhdl')
 
 " Vim script
-au BufNewFile,BufRead *.vim,.exrc,_exrc		setf vim
+au BufNewFile,BufRead *.vim,*.vba,.exrc,_exrc	setf vim
 
 " Viminfo file
 au BufNewFile,BufRead .viminfo,_viminfo		setf viminfo
@@ -1925,6 +1925,7 @@ au StdinReadPost * if !did_filetype() | 
 
 " Asterisk config file
 au BufNewFile,BufRead *asterisk/*.conf*         call s:StarSetf('asterisk')
+au BufNewFile,BufRead *asterisk*/*voicemail.conf* call s:StarSetf('asteriskvm')
 
 " BIND zone
 au BufNewFile,BufRead /var/named/*		call s:StarSetf('bindzone')
--- a/src/edit.c
+++ b/src/edit.c
@@ -1390,9 +1390,14 @@ ins_redraw(ready)
     if (!char_avail())
     {
 #ifdef FEAT_AUTOCMD
-	/* Trigger CursorMoved if the cursor moved. */
+	/* Trigger CursorMoved if the cursor moved.  Not when the popup menu is
+	 * visible, the command might delete it. */
 	if (ready && has_cursormovedI()
-			     && !equalpos(last_cursormoved, curwin->w_cursor))
+			     && !equalpos(last_cursormoved, curwin->w_cursor)
+# ifdef FEAT_INS_EXPAND
+			     && !pum_visible()
+# endif
+			     )
 	{
 	    apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf);
 	    last_cursormoved = curwin->w_cursor;
@@ -2460,6 +2465,11 @@ ins_compl_show_pum()
     if (!pum_wanted() || !pum_enough_matches())
 	return;
 
+#if defined(FEAT_EVAL)
+    /* Dirty hard-coded hack: remove any matchparen highlighting. */
+    do_cmdline_cmd((char_u *)"if exists('g:loaded_matchparen')|3match none|endif");
+#endif
+
     /* Update the screen before drawing the popup menu over it. */
     update_screen(0);
 
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -809,29 +809,7 @@ dbg_breakpoint(name, lnum)
 }
 
 
-# if defined(FEAT_PROFILE) || defined(PROTO)
-/*
- * Functions for profiling.
- */
-static void script_do_profile __ARGS((scriptitem_T *si));
-static void script_dump_profile __ARGS((FILE *fd));
-static proftime_T prof_wait_time;
-
-/*
- * Set the time in "tm" to zero.
- */
-    void
-profile_zero(tm)
-    proftime_T *tm;
-{
-# ifdef WIN3264
-    tm->QuadPart = 0;
-# else
-    tm->tv_usec = 0;
-    tm->tv_sec = 0;
-# endif
-}
-
+# if defined(FEAT_PROFILE) || defined(FEAT_RELTIME) || defined(PROTO)
 /*
  * Store the current time in "tm".
  */
@@ -891,6 +869,52 @@ profile_sub(tm, tm2)
 }
 
 /*
+ * Return a string that represents the time in "tm".
+ * Uses a static buffer!
+ */
+    char *
+profile_msg(tm)
+    proftime_T *tm;
+{
+    static char buf[50];
+
+# ifdef WIN3264
+    LARGE_INTEGER   fr;
+
+    QueryPerformanceFrequency(&fr);
+    sprintf(buf, "%10.6lf", (double)tm->QuadPart / (double)fr.QuadPart);
+# else
+    sprintf(buf, "%3ld.%06ld", (long)tm->tv_sec, (long)tm->tv_usec);
+#endif
+    return buf;
+}
+
+# endif  /* FEAT_PROFILE || FEAT_RELTIME */
+
+# if defined(FEAT_PROFILE) || defined(PROTO)
+/*
+ * Functions for profiling.
+ */
+static void script_do_profile __ARGS((scriptitem_T *si));
+static void script_dump_profile __ARGS((FILE *fd));
+static proftime_T prof_wait_time;
+
+/*
+ * Set the time in "tm" to zero.
+ */
+    void
+profile_zero(tm)
+    proftime_T *tm;
+{
+# ifdef WIN3264
+    tm->QuadPart = 0;
+# else
+    tm->tv_usec = 0;
+    tm->tv_sec = 0;
+# endif
+}
+
+/*
  * Add the time "tm2" to "tm".
  */
     void
@@ -985,27 +1009,6 @@ profile_cmp(tm1, tm2)
 # endif
 }
 
-/*
- * Return a string that represents a time.
- * Uses a static buffer!
- */
-    char *
-profile_msg(tm)
-    proftime_T *tm;
-{
-    static char buf[50];
-
-# ifdef WIN3264
-    LARGE_INTEGER   fr;
-
-    QueryPerformanceFrequency(&fr);
-    sprintf(buf, "%10.6lf", (double)tm->QuadPart / (double)fr.QuadPart);
-# else
-    sprintf(buf, "%3ld.%06ld", (long)tm->tv_sec, (long)tm->tv_usec);
-#endif
-    return buf;
-}
-
 static char_u	*profile_fname = NULL;
 static proftime_T pause_time;
 
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -5152,7 +5152,7 @@ find_file_in_path(ptr, len, options, fir
 {
     return find_file_in_path_option(ptr, len, options, first,
 	    *curbuf->b_p_path == NUL ? p_path : curbuf->b_p_path,
-	    FALSE, rel_fname);
+	    FALSE, rel_fname, curbuf->b_p_sua);
 }
 
 static char_u	*ff_file_to_find = NULL;
@@ -5185,11 +5185,11 @@ find_directory_in_path(ptr, len, options
     char_u	*rel_fname;	/* file name searching relative to */
 {
     return find_file_in_path_option(ptr, len, options, TRUE, p_cdpath,
-							     TRUE, rel_fname);
+					       TRUE, rel_fname, (char_u *)"");
 }
 
     char_u *
-find_file_in_path_option(ptr, len, options, first, path_option, need_dir, rel_fname)
+find_file_in_path_option(ptr, len, options, first, path_option, need_dir, rel_fname, suffixes)
     char_u	*ptr;		/* file name */
     int		len;		/* length of file name */
     int		options;
@@ -5197,6 +5197,7 @@ find_file_in_path_option(ptr, len, optio
     char_u	*path_option;	/* p_path or p_cdpath */
     int		need_dir;	/* looking for directory name */
     char_u	*rel_fname;	/* file name we are looking relative to. */
+    char_u	*suffixes;	/* list of suffixes, 'suffixesadd' option */
 {
     static char_u	*dir;
     static int		did_findfile_init = FALSE;
@@ -5289,7 +5290,7 @@ find_file_in_path_option(ptr, len, optio
 
 		/* When the file doesn't exist, try adding parts of
 		 * 'suffixesadd'. */
-		buf = curbuf->b_p_sua;
+		buf = suffixes;
 		for (;;)
 		{
 		    if (
--- a/src/undo.c
+++ b/src/undo.c
@@ -88,7 +88,7 @@ static int undo_allowed __ARGS((void));
 static int u_savecommon __ARGS((linenr_T, linenr_T, linenr_T));
 static void u_doit __ARGS((int count));
 static void u_undoredo __ARGS((int undo));
-static void u_undo_end __ARGS((void));
+static void u_undo_end __ARGS((int did_undo));
 static void u_add_time __ARGS((char_u *buf, size_t buflen, time_t tt));
 static void u_freeheader __ARGS((buf_T *buf, u_header_T *uhp, u_header_T **uhpp));
 static void u_freebranch __ARGS((buf_T *buf, u_header_T *uhp, u_header_T **uhpp));
@@ -638,7 +638,7 @@ u_doit(startcount)
 	    curbuf->b_u_curhead = curbuf->b_u_curhead->uh_prev;
 	}
     }
-    u_undo_end();
+    u_undo_end(undo_undoes);
 }
 
 static int lastmark = 0;
@@ -669,6 +669,7 @@ undo_time(step, sec, absolute)
     int		    round;
     int		    dosec = sec;
     int		    above = FALSE;
+    int		    did_undo = TRUE;
 
     /* First make sure the current undoable change is synced. */
     if (curbuf->b_u_synced == FALSE)
@@ -888,6 +889,7 @@ undo_time(step, sec, absolute)
 	    if (uhp->uh_prev == NULL)
 		curbuf->b_u_newhead = uhp;
 	    curbuf->b_u_curhead = uhp->uh_prev;
+	    did_undo = FALSE;
 
 	    if (uhp->uh_seq == target)	/* found it! */
 		break;
@@ -901,7 +903,7 @@ undo_time(step, sec, absolute)
 	    }
 	}
     }
-    u_undo_end();
+    u_undo_end(did_undo);
 }
 
 /*
@@ -1174,7 +1176,8 @@ u_undoredo(undo)
  * in some cases, but it's better than nothing).
  */
     static void
-u_undo_end()
+u_undo_end(did_undo)
+    int		did_undo;	/* just did an undo */
 {
     char	*msg;
     u_header_T	*uhp;
@@ -1211,7 +1214,12 @@ u_undo_end()
     }
 
     if (curbuf->b_u_curhead != NULL)
-	uhp = curbuf->b_u_curhead;
+    {
+	if (did_undo)
+	    uhp = curbuf->b_u_curhead;
+	else
+	    uhp = curbuf->b_u_curhead->uh_next;
+    }
     else
 	uhp = curbuf->b_u_newhead;
 
@@ -1220,9 +1228,12 @@ u_undo_end()
     else
 	u_add_time(msgbuf, sizeof(msgbuf), uhp->uh_time);
 
-    smsg((char_u *)_("%ld %s; #%ld  %s"),
+    smsg((char_u *)_("%ld %s; %s #%ld  %s"),
 	    u_oldcount < 0 ? -u_oldcount : u_oldcount,
-	    _(msg), uhp == NULL ? 0L : uhp->uh_seq, msgbuf);
+	    _(msg),
+	    did_undo ? _("before") : _("after"),
+	    uhp == NULL ? 0L : uhp->uh_seq,
+	    msgbuf);
 }
 
 /*
--- a/src/version.h
+++ b/src/version.h
@@ -36,5 +36,5 @@
 #define VIM_VERSION_NODOT	"vim70aa"
 #define VIM_VERSION_SHORT	"7.0aa"
 #define VIM_VERSION_MEDIUM	"7.0aa ALPHA"
-#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 20)"
-#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 20, compiled "
+#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 21)"
+#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 21, compiled "