changeset 782:d20041a02ee5

updated for version 7.0228
author vimboss
date Sat, 18 Mar 2006 21:40:56 +0000
parents afa9ef8a18a1
children e68d8541494d
files runtime/doc/eval.txt runtime/doc/options.txt runtime/doc/tags runtime/doc/todo.txt runtime/doc/version7.txt runtime/ftplugin.vim runtime/syntax/synload.vim runtime/tutor/tutor.vim src/auto/configure src/charset.c src/configure.in src/dosinst.c src/dosinst.h src/edit.c src/ex_getln.c src/gui_gtk_x11.c src/gui_w32.c src/misc2.c src/option.c src/option.h src/proto/getchar.pro src/structs.h src/version.h
diffstat 23 files changed, 271 insertions(+), 152 deletions(-) [+]
line wrap: on
line diff
--- 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 17
+*eval.txt*      For Vim version 7.0aa.  Last change: 2006 Mar 18
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -77,6 +77,10 @@ the String doesn't start with digits, th
 
 To force conversion from String to Number, add zero to it: >
 	:echo "0100" + 0
+<	64 ~
+
+To avoid a leading zero to cause octal conversion, or for using a different
+base, use |str2nr()|.
 
 For boolean operators Numbers are used.  Zero is FALSE, non-zero is TRUE.
 
@@ -1584,7 +1588,8 @@ glob( {expr})			String	expand file wildc
 globpath( {path}, {expr})	String	do glob({expr}) for all dirs in {path}
 has( {feature})			Number	TRUE if feature {feature} supported
 has_key( {dict}, {key})		Number	TRUE if {dict} has entry {key}
-hasmapto( {what} [, {mode}])	Number	TRUE if mapping to {what} exists
+hasmapto( {what} [, {mode} [, {abbr}]])
+				Number	TRUE if mapping to {what} exists
 histadd( {history},{item})	String	add an item to a history
 histdel( {history} [, {item}])	String	remove an item from a history
 histget( {history} [, {index}])	String	get the item {index} from a history
@@ -1616,8 +1621,10 @@ line2byte( {lnum})		Number	byte count of
 lispindent( {lnum})		Number	Lisp indent for line {lnum}
 localtime()			Number	current time
 map( {expr}, {string})		List/Dict  change each item in {expr} to {expr}
-maparg( {name}[, {mode}])	String	rhs of mapping {name} in mode {mode}
-mapcheck( {name}[, {mode}])	String	check for mappings matching {name}
+maparg( {name}[, {mode} [, {abbr}]])
+				String	rhs of mapping {name} in mode {mode}
+mapcheck( {name}[, {mode} [, {abbr}]])
+				String	check for mappings matching {name}
 match( {expr}, {pat}[, {start}[, {count}]])
 				Number	position where {pat} matches in {expr}
 matchend( {expr}, {pat}[, {start}[, {count}]])
@@ -1682,6 +1689,7 @@ spellsuggest( {word} [, {max} [, {capita
 				List	spelling suggestions
 split( {expr} [, {pat} [, {keepempty}]])
 				List	make |List| from {pat} separated {expr}
+str2nr( {expr} [, {base}])	Number	convert string to number
 strftime( {format}[, {time}])	String	time in specified format
 stridx( {haystack}, {needle}[, {start}])
 				Number	index of {needle} in {haystack}
@@ -2896,11 +2904,13 @@ has_key({dict}, {key})					*has_key()*
 		an entry with key {key}.  Zero otherwise.
 
 
-hasmapto({what} [, {mode}])				*hasmapto()*
+hasmapto({what} [, {mode} [, {abbr}]])			*hasmapto()*
 		The result is a Number, which is 1 if there is a mapping that
 		contains {what} in somewhere in the rhs (what it is mapped to)
 		and this mapping exists in one of the modes indicated by
 		{mode}.
+		When {abbr} is there and it is non-zero use abbreviations
+		instead of mappings.
 		Both the global mappings and the mappings local to the current
 		buffer are checked for a match.
 		If no matching mapping is found 0 is returned.
@@ -3348,7 +3358,7 @@ map({expr}, {string})					*map()*
 		further items in {expr} are processed.
 
 
-maparg({name}[, {mode}])				*maparg()*
+maparg({name}[, {mode} [, {abbr}]])			*maparg()*
 		Return the rhs of mapping {name} in mode {mode}.  When there
 		is no mapping for {name}, an empty String is returned.
 		{mode} can be one of these strings:
@@ -3360,6 +3370,8 @@ maparg({name}[, {mode}])				*maparg()*
 			"l"	langmap |language-mapping|
 			""	Normal, Visual and Operator-pending
 		When {mode} is omitted, the modes for "" are used.
+		When {abbr} is there and it is non-zero use abbreviations
+		instead of mappings.
 		The {name} can have special key names, like in the ":map"
 		command.  The returned String has special characters
 		translated like in the output of the ":map" command listing.
@@ -3370,10 +3382,12 @@ maparg({name}[, {mode}])				*maparg()*
 			exe 'nnoremap <Tab> ==' . maparg('<Tab>', 'n')
 
 
-mapcheck({name}[, {mode}])				*mapcheck()*
+mapcheck({name}[, {mode} [, {abbr}]])			*mapcheck()*
 		Check if there is a mapping that matches with {name} in mode
 		{mode}.  See |maparg()| for {mode} and special names in
 		{name}.
+		When {abbr} is there and it is non-zero use abbreviations
+		instead of mappings.
 		A match happens with a mapping that starts with {name} and
 		with a mapping which is equal to the start of {name}.
 
@@ -4393,6 +4407,17 @@ split({expr} [, {pattern} [, {keepempty}
 <		The opposite function is |join()|.
 
 
+str2nr( {expr} [, {base}])				*str2nr()*
+		Convert string {expr} to a number.
+		{base} is the conversion base, it can be 8, 10 or 16.
+		When {base} is omitted base 10 is used.  This also means that
+		a leading zero doesn't cause octal conversion to be used, as
+		with the default String to Number conversion.
+		When {base} is 16 a leading "0x" or "0X" is ignored.  With a
+		different base the result will be zero.
+		Text after the number is silently ignored.
+	
+
 strftime({format} [, {time}])				*strftime()*
 		The result is a String, which is a formatted date and time, as
 		specified by the {format} string.  The given {time} is used,
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt*	For Vim version 7.0aa.  Last change: 2006 Mar 17
+*options.txt*	For Vim version 7.0aa.  Last change: 2006 Mar 18
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -447,8 +447,8 @@ There are two forms of modelines.  The f
 		where each part between ':' is the argument for a ":set"
 		command
 
-Example: >
-   vi:noai:sw=3 ts=6
+Example:
+   vi:noai:sw=3 ts=6 ~
 
 The second form (this is compatible with some versions of Vi):
 
@@ -464,8 +464,8 @@ se[t]		the string "set " or "se " (note 
 :		a colon
 [text]		any text or empty
 
-Example: >
-   /* vim: set ai tw=75: */
+Example:
+   /* vim: set ai tw=75: */ ~
 
 The white space before {vi:|vim:|ex:} is required.  This minimizes the chance
 that a normal word like "lex:" is caught.  There is one exception: "vi:" and
@@ -493,10 +493,10 @@ number can be specified where "vim:" is 
 	vim={vers}:	version {vers}
 	vim>{vers}:	version after {vers}
 {vers} is 600 for Vim 6.0 (hundred times the major version plus minor).
-For example, to use a modeline only for Vim 6.0 and later: >
-	/* vim600: set foldmethod=marker: */
-To use a modeline for Vim before version 5.7: >
-	/* vim<570: set sw=4: */
+For example, to use a modeline only for Vim 6.0 and later:
+	/* vim600: set foldmethod=marker: */ ~
+To use a modeline for Vim before version 5.7:
+	/* vim<570: set sw=4: */ ~
 There can be no blanks between "vim" and the ":".
 
 
@@ -504,16 +504,16 @@ The number of lines that are checked can
 If 'modeline' is off or 'modelines' is 0 no lines are checked.
 
 Note that for the first form all of the rest of the line is used, thus a line
-like: >
-   /* vi:ts=4: */
-will give an error message for the trailing "*/".  This line is OK: >
-   /* vi:set ts=4: */
+like:
+   /* vi:ts=4: */ ~
+will give an error message for the trailing "*/".  This line is OK:
+   /* vi:set ts=4: */ ~
 
 If an error is detected the rest of the line is skipped.
 
 If you want to include a ':' in a set command precede it with a '\'.  The
-backslash in front of the ':' will be removed.  Example: >
-   /* vi:set dir=c\:\tmp: */
+backslash in front of the ':' will be removed.  Example:
+   /* vi:set dir=c\:\tmp: */ ~
 This sets the 'dir' option to "c:\tmp".  Only a single backslash before the
 ':' is removed.  Thus to include "\:" you have to specify "\\:".
 
@@ -1017,8 +1017,8 @@ A jump table for the options with a shor
 			{not in Vi}
 			{only available when compiled with the |+balloon_eval|
 			feature}
-	Expression to show in evaluation balloon.  It is only used when
-	'ballooneval' is on.  These variables can be used:
+	Expression for text to show in evaluation balloon.  It is only used
+	when 'ballooneval' is on.  These variables can be used:
 
 	v:beval_bufnr	number of the buffer in which balloon is going to show
 	v:beval_winnr	number of the window
@@ -2665,9 +2665,15 @@ A jump table for the options with a shor
 	this use the ":filetype on" command. |:filetype|
 	Setting this option to a different value is most useful in a modeline,
 	for a file for which the file type is not automatically recognized.
-	Example, for in an IDL file: >
-		/* vim: set filetype=idl : */
-<	|FileType| |filetypes|
+	Example, for in an IDL file:
+		/* vim: set filetype=idl : */ ~
+	|FileType| |filetypes|
+	When a dot appears in the value then this separates two filetype
+	names.  Example:
+		/* vim: set filetype=c.doxygen : */ ~
+	This will use the "c" filetype first, then the "doxygen" filetype.
+	This works both for filetype plugins and for syntax files.  More than
+	one dot may appear.
 	Do not confuse this option with 'osfiletype', which is for the file
 	type that is actually stored with the file.
 	This option is not copied to another buffer, independent of the 's' or
@@ -2760,7 +2766,7 @@ A jump table for the options with a shor
 			or |+eval| feature}
 	The expression used for when 'foldmethod' is "expr".  It is evaluated
 	for each line to obtain its fold level.  See |fold-expr|.
-	
+
 	The expression may be evaluated in the |sandbox|, see
 	|sandbox-option|.
 
@@ -6362,9 +6368,15 @@ A jump table for the options with a shor
 	Otherwise this option does not always reflect the current syntax (the
 	b:current_syntax variable does).
 	This option is most useful in a modeline, for a file which syntax is
-	not automatically recognized.  Example, in an IDL file: >
-		/* vim: set syntax=idl : */
-<	To switch off syntax highlighting for the current file, use: >
+	not automatically recognized.  Example, in an IDL file:
+		/* vim: set syntax=idl : */ ~
+	When a dot appears in the value then this separates two filetype
+	names.  Example:
+		/* vim: set syntax=c.doxygen : */ ~
+	This will use the "c" syntax first, then the "doxygen" syntax.
+	Note that the second one must be prepared to be loaded as an addition,
+	otherwise it will be skipped.  More than one dot may appear.
+	To switch off syntax highlighting for the current file, use: >
 		:set syntax=OFF
 <	To switch syntax highlighting on according to the current value of the
 	'filetype' option: >
@@ -7190,6 +7202,7 @@ A jump table for the options with a shor
 	    insert	Allow virtual editing in Insert mode.
 	    all		Allow virtual editing in all modes.
 	    onemore	Allow the cursor to move just past the end of the line
+
 	Virtual editing means that the cursor can be positioned where there is
 	no actual character.  This can be halfway into a Tab or beyond the end
 	of the line.  Useful for selecting a rectangle in Visual mode and
@@ -7198,8 +7211,10 @@ A jump table for the options with a shor
 	after the last character of the line.  This makes some commands more
 	consistent.  Previously the cursor was always past the end of the line
 	if the line was empty.  But it is far from Vi compatible.  It may also
-	break some plugins or Vim scripts.  For example because |$| moves to a
-	different position.  Use with care!
+	break some plugins or Vim scripts.  For example because |l| can move
+	the cursor after the last character.  Use with care!
+	Using the |$| command will move to the last character in the line, not
+	past it.  This may actually move the cursor to the left!
 	It doesn't make sense to combine "all" with "onemore", but you will
 	not get a warning for it.
 
@@ -7466,6 +7481,16 @@ A jump table for the options with a shor
 	|quickfix-window|.
 	The height may be changed anyway when running out of room.
 
+			*'winfixwidth'* *'wfw'* *'nowinfixwidth'* *'nowfw'*
+'winfixwidth' 'wfw'	boolean	(default off)
+			local to window
+			{not in Vi}
+			{not available when compiled without the +windows
+			feature}
+	Keep the window width when windows are opened or closed and
+	'equalalways' is set.
+	The width may be changed anyway when running out of room.
+
 						*'winminheight'* *'wmh'*
 'winminheight' 'wmh'	number	(default 1)
 			global
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -608,8 +608,10 @@
 'nowb'	options.txt	/*'nowb'*
 'noweirdinvert'	options.txt	/*'noweirdinvert'*
 'nowfh'	options.txt	/*'nowfh'*
+'nowfw'	options.txt	/*'nowfw'*
 'nowildmenu'	options.txt	/*'nowildmenu'*
 'nowinfixheight'	options.txt	/*'nowinfixheight'*
+'nowinfixwidth'	options.txt	/*'nowinfixwidth'*
 'nowiv'	options.txt	/*'nowiv'*
 'nowmnu'	options.txt	/*'nowmnu'*
 'nowrap'	options.txt	/*'nowrap'*
@@ -996,6 +998,7 @@
 'wd'	options.txt	/*'wd'*
 'weirdinvert'	options.txt	/*'weirdinvert'*
 'wfh'	options.txt	/*'wfh'*
+'wfw'	options.txt	/*'wfw'*
 'wh'	options.txt	/*'wh'*
 'whichwrap'	options.txt	/*'whichwrap'*
 'wi'	options.txt	/*'wi'*
@@ -1010,6 +1013,7 @@
 'winaltkeys'	options.txt	/*'winaltkeys'*
 'window'	options.txt	/*'window'*
 'winfixheight'	options.txt	/*'winfixheight'*
+'winfixwidth'	options.txt	/*'winfixwidth'*
 'winheight'	options.txt	/*'winheight'*
 'winminheight'	options.txt	/*'winminheight'*
 'winminwidth'	options.txt	/*'winminwidth'*
@@ -5524,7 +5528,6 @@ hebrew	hebrew.txt	/*hebrew*
 hebrew.txt	hebrew.txt	/*hebrew.txt*
 help	various.txt	/*help*
 help-context	help.txt	/*help-context*
-help-tags	tags	1
 help-translated	various.txt	/*help-translated*
 help-xterm-window	various.txt	/*help-xterm-window*
 help.txt	help.txt	/*help.txt*
@@ -6857,6 +6860,7 @@ startup-terminal	term.txt	/*startup-term
 static-tag	tagsrch.txt	/*static-tag*
 status-line	windows.txt	/*status-line*
 statusmsg-variable	eval.txt	/*statusmsg-variable*
+str2nr()	eval.txt	/*str2nr()*
 strcasestr()	eval.txt	/*strcasestr()*
 strchr()	eval.txt	/*strchr()*
 strcspn()	eval.txt	/*strcspn()*
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt*      For Vim version 7.0aa.  Last change: 2006 Mar 17
+*todo.txt*      For Vim version 7.0aa.  Last change: 2006 Mar 18
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -30,6 +30,12 @@ be worked on, but only if you sponsor Vi
 							*known-bugs*
 -------------------- Known bugs and current work -----------------------
 
+'cindent' isn't remove when Esc is typed.
+
+Gnome GUI: lots of error messages during startup.  These go away when not
+using the notebook for tab labels.  Still similar error messages when moving
+the toolbar to another location.
+
 Win32: Describe how to do debugging. (George Reilly)
 
 Mac unicode patch (Da Woon Jung, Eckehard Berns):
@@ -44,22 +50,6 @@ 8   Add patch from Muraoka Taro (Mar 16)
 EMBEDDING: Make it possible to run Vim inside a window of another program.
 For GTK Neil Bird has a patch to use Vim like a widget.
 
-Support ":set syntax=cpp.doxygen"?  Suggested patch by Michael Geddes (9 Aug
-2004).  Should also work for 'filetype'.
-
-Add strtol() to avoid the problems with leading zero causing octal conversion.
-
-Add a 'tool' window: behaves like a preview window but there can be several.
-Don't count it in only_one_window(). (Alexei Alexandrov)
-
-Adjust src/main.aap for installing manpages like in Makefile.
-    And for generating Vim.app for the Mac.
-    Install spell files with src/main.aap.
-
-Win32: In the generated batch files, use $VIMRUNTIME if it's set.  Examples by
-Mathias Michaelis (2004 Sep 6)
-Also place vimtutor.bat in %windir%?
-
 Ctags still hasn't included the patch.  Darren is looking for someone to do
 maintanance.  Is there another solution?
 
@@ -78,6 +68,10 @@ Jan 6)
 Add a flag to check for a match with the next item first?  Helps for
 continuation lines that may contain just about anything.
 
+Adjust src/main.aap for installing manpages like in Makefile.
+    And for generating Vim.app for the Mac.
+    Install spell files with src/main.aap.
+
 Add ":smap", Select mode mapping?  Otherwise: ":sunmap", so that Visual mode
 mappings for normal keys can be removed from Select mode.
 
@@ -2913,7 +2907,8 @@ 8   Add CTRL-W T: go to the top window i
 7   Use CTRL-W <Tab>, like alt-tab, to switch between buffers.  Repeat <Tab>
     to select another buffer (only loaded ones?), <BS> to go back, <Enter> to
     select buffer, <Esc> to go back to original buffer.
-7   Add a 'winfixwidth' option, similar to 'winfixheight'.
+7   Add a 'tool' window: behaves like a preview window but there can be
+    several.  Don't count it in only_one_window(). (Alexei Alexandrov)
 6   Add an option to resize the shell when splitting and/or closing a window.
     ":vsp" would make the shell wider by as many columns as needed for the new
     window.  Specify a maximum size (or use the screen size).  ":close" would
--- a/runtime/doc/version7.txt
+++ b/runtime/doc/version7.txt
@@ -1,4 +1,4 @@
-*version7.txt*  For Vim version 7.0aa.  Last change: 2006 Mar 17
+*version7.txt*  For Vim version 7.0aa.  Last change: 2006 Mar 18
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -562,6 +562,7 @@ Options: ~
 'synmaxcol'		maximum column to look for syntax items; avoids very
 			slow redrawing when there are very long lines
 'verbosefile'		Log messages in a file.
+'winfixwidth'		window with fixed width, similar to 'winfixheight'
 
 
 Ex commands: ~
@@ -714,6 +715,7 @@ New and extended functions: ~
 |split()|		split a String into a List
 |spellbadword()|	get a badly spelled word
 |spellsuggest()|	get suggestions for correct spelling
+|str2nr()|		convert a string to a number, base 8, 10 or 16
 |string()|		string representation of a List or Dictionary
 |system()|		filters {input} through a shell command
 |taglist()|		get list of matching tags (Yegappan Lakshmanan)
@@ -899,6 +901,8 @@ When editing a search pattern for a "/" 
 CTRL-L can be used to add a character from the current match.  CTRL-R CTRL-W
 will add a word, but exclude the part of the word that was already typed.
 
+Ruby interface: add line number methods. (Ryan Paul)
+
 ==============================================================================
 IMPROVEMENTS						*improvements-7*
 
@@ -972,9 +976,11 @@ delete the raw text.  Helps if the file 
 actually compressed. (Andrew Pimlott)
 
 When C, C++ or IDL syntax is used, may additionally load doxygen syntax.
-Also support setting the filetype to "cdoxygen" for C plus doxygen syntax.
 (Michael Geddes)
 
+Support setting 'filetype' and 'syntax' to "aaa.bbb" for "aaa" plus "bbb"
+filetype or syntax.
+
 The ":registers" command now displays multi-byte characters properly.
 
 VMS: In the usage message mention that a slash can be used to make a flag
@@ -1223,6 +1229,9 @@ was set in an error handler.
 When there are several matching tags, the ":tag <name>" and CTRL-] commands
 jump to the [count] matching tag. (Yegappan Lakshmanan)
 
+Win32: In the batch files generated by the install program, use $VIMRUNTIME or
+$VIM if it's set.  Example provided by Mathias Michaelis.
+Also create a vimtutor.bat batch file.
 
 ==============================================================================
 COMPILE TIME CHANGES					*compile-changes-7*
@@ -2012,5 +2021,7 @@ redrawing.
 Win32: When using Korean IME making it active didn't work properly. (Moon,
 Yu-sung, 2005 March 21)
 
+Ruby interface: when inserting/deleting lines display wasn't updated. (Ryan
+Paul)
 
  vim:tw=78:ts=8:ft=help:norl:
--- a/runtime/ftplugin.vim
+++ b/runtime/ftplugin.vim
@@ -1,7 +1,7 @@
 " Vim support file to switch on loading plugins for file types
 "
 " Maintainer:	Bram Moolenaar <Bram@vim.org>
-" Last change:	2005 Mar 25
+" Last change:	2006 Mar 18
 
 if exists("did_load_ftplugin")
   finish
@@ -10,18 +10,26 @@ let did_load_ftplugin = 1
 
 augroup filetypeplugin
   au FileType * call s:LoadFTPlugin()
+ 
   func! s:LoadFTPlugin()
     if exists("b:undo_ftplugin")
       exe b:undo_ftplugin
       unlet! b:undo_ftplugin b:did_ftplugin
     endif
-    if expand("<amatch>") != ""
+   
+    let s = expand("<amatch>")
+    if s != ""
       if &cpo =~# "S" && exists("b:did_ftplugin")
 	" In compatible mode options are reset to the global values, need to
 	" set the local values also when a plugin was already used.
 	unlet b:did_ftplugin
       endif
-      runtime! ftplugin/<amatch>.vim ftplugin/<amatch>_*.vim ftplugin/<amatch>/*.vim
+
+      " When there is a dot it is used to separate filetype names.  Thus for
+      " "aaa.bbb" load "aaa" and then "bbb".
+      for name in split(s, '\.')
+	exe 'runtime! ftplugin/' . name . '.vim ftplugin/' . name . '_*.vim ftplugin/' . name . '/*.vim'
+      endfor
     endif
   endfunc
 augroup END
--- a/runtime/syntax/synload.vim
+++ b/runtime/syntax/synload.vim
@@ -1,6 +1,6 @@
 " Vim syntax support file
 " Maintainer:	Bram Moolenaar <Bram@vim.org>
-" Last Change:	2005 Feb 08
+" Last Change:	2006 Mar 18
 
 " This file sets up for syntax highlighting.
 " It is loaded from "syntax.vim" and "manual.vim".
@@ -49,8 +49,11 @@ fun! s:SynSet()
   endif
 
   if s != ""
-    " Load the syntax file(s)
-    exe "runtime! syntax/" . s . ".vim syntax/" . s . "/*.vim"
+    " Load the syntax file(s).  When there are several, separated by dots,
+    " load each in sequence.
+    for name in split(s, '\.')
+      exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim"
+    endfor
   endif
 endfun
 
@@ -59,15 +62,9 @@ endfun
 au Syntax cpp,c,idl 
 	\ if (exists('b:load_doxygen_syntax') && b:load_doxygen_syntax)
 	\	|| (exists('g:load_doxygen_syntax') && g:load_doxygen_syntax)
-	\   | runtime syntax/doxygen.vim 
+	\   | runtime! syntax/doxygen.vim 
 	\ | endif
 
-au Syntax *doxygen
-	\ if exists("b:current_syntax") | finish | endif
-	\ | let syn = substitute(expand("<amatch>"), 'doxygen$', '', '')
-	\ | if syn != '' | exe 'runtime syntax/'.syn.'.vim' | endif
-	\ | if b:current_syntax !~ 'doxygen' | runtime syntax/doxygen.vim | endif
-
 
 " Source the user-specified syntax highlighting file
 if exists("mysyntaxfile") && filereadable(expand(mysyntaxfile))
--- a/runtime/tutor/tutor.vim
+++ b/runtime/tutor/tutor.vim
@@ -1,6 +1,6 @@
 " Vim tutor support file
 " Author: Eduardo F. Amatria <eferna1@platea.pntic.mec.es>
-" Last Change:	2005 Oct 16
+" Last Change:	2006 Mar 18
 
 " This small source file is used for detecting if a translation of the
 " tutor file exist, i.e., a tutor.xx file, where xx is the language.
@@ -15,16 +15,15 @@ if strlen($xx) > 1
   let s:ext = "." . $xx
 else
   let s:lang = ""
-  if exists("v:lang")
+  " Check that a potential value has at least two letters.
+  " Ignore "1043" and "C".
+  if exists("v:lang") && v:lang =~ '\a\a'
     let s:lang = v:lang
-  elseif strlen($LC_ALL) > 0
+  elseif $LC_ALL =~ '\a\a'
     let s:lang = $LC_ALL
-  elseif strlen($LANG) > 0
+  elseif $LANG =~ '\a\a'
     let s:lang = $LANG
   endif
-  if s:lang == "C"
-    let s:lang = ""
-  endif
   if s:lang != ""
     " Remove "@euro" (ignoring case), it may be at the end
     let s:lang = substitute(s:lang, '\c@euro', '', '')
@@ -36,6 +35,8 @@ else
       let s:ext = ".pl"
     elseif s:lang =~ "Slovak"
       let s:ext = ".sk"
+    elseif s:lang =~ "Dutch"
+      let s:ext = ".nl"
     else
       let s:ext = "." . strpart(s:lang, 0, 2)
     endif
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -7837,6 +7837,18 @@ echo "${ECHO_T}yes" >&6
       GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
       GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
       GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
+
+                  echo "$as_me:$LINENO: checking for FreeBSD" >&5
+echo $ECHO_N "checking for FreeBSD... $ECHO_C" >&6
+      if test "`(uname) 2>/dev/null`" = FreeBSD; then
+	echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+        GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR -D_THREAD_SAFE"
+	GNOME_LIBS="$GNOME_LIBS -pthread"
+      else
+	echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+      fi
       have_gnome=yes
     else
       echo "$as_me:$LINENO: result: not found" >&5
--- a/src/charset.c
+++ b/src/charset.c
@@ -1722,9 +1722,10 @@ vim_isblankline(lbuf)
  * If "len" is not NULL, the length of the number in characters is returned.
  * If "nptr" is not NULL, the signed result is returned in it.
  * If "unptr" is not NULL, the unsigned result is returned in it.
+ * If "unptr" is not NULL, the unsigned result is returned in it.
  * If "dooct" is non-zero recognize octal numbers, when > 1 always assume
  * octal number.
- * If "dohext" is non-zero recognize hex numbers, when > 1 always assume
+ * If "dohex" is non-zero recognize hex numbers, when > 1 always assume
  * hex number.
  */
     void
--- a/src/configure.in
+++ b/src/configure.in
@@ -1478,6 +1478,17 @@ AC_DEFUN([GNOME_INIT_HOOK],
       GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
       GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
       GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
+     
+      dnl On FreeBSD we need -pthread but pkg-config doesn't include it.
+      dnl This might not be the right way but it works for me...
+      AC_MSG_CHECKING(for FreeBSD)
+      if test "`(uname) 2>/dev/null`" = FreeBSD; then
+	AC_MSG_RESULT(yes, adding -pthread)
+        GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR -D_THREAD_SAFE"
+	GNOME_LIBS="$GNOME_LIBS -pthread"
+      else
+	AC_MSG_RESULT(no)
+      fi
       $1
     else
       AC_MSG_RESULT(not found)
--- a/src/dosinst.c
+++ b/src/dosinst.c
@@ -751,7 +751,6 @@ install_bat_choice(int idx)
     char	*exename = targets[choices[idx].arg].exenamearg;
     char	*vimarg = targets[choices[idx].arg].exearg;
     FILE	*fd;
-    char	buf[BUFSIZE];
 
     if (*batpath != NUL)
     {
@@ -763,23 +762,29 @@ install_bat_choice(int idx)
 	    need_uninstall_entry = 1;
 
 	    fprintf(fd, "@echo off\n");
-	    fprintf(fd, "rem -- Run Vim --\n\n");
+	    fprintf(fd, "rem -- Run Vim --\n");
+	    fprintf(fd, "\n");
 
-	    strcpy(buf, installdir);
-	    buf[runtimeidx - 1] = NUL;
-	    /* Don't use double quotes for the value here, also when buf
+	    /* Don't use double quotes for the "set" argument, also when it
 	     * contains a space.  The quotes would be included in the value
-	     * for MSDOS and NT. */
-	    fprintf(fd, "set VIM=%s\n\n", buf);
-
-	    strcpy(buf, installdir + runtimeidx);
-	    add_pathsep(buf);
-	    strcat(buf, exename);
+	     * for MSDOS and NT.
+	     * The order of preference is:
+	     * 1. $VIMRUNTIME/vim.exe	    (user preference)
+	     * 2. $VIM/vim70/vim.exe	    (hard coded version)
+	     * 3. installdir/vim.exe	    (hard coded install directory)
+	     */
+	    fprintf(fd, "set VIM_EXE_DIR=%s\n", installdir);
+	    fprintf(fd, "if exist \"%%VIM%%\\%s\\%s\" set VIM_EXE_DIR=%%VIM%%\\%s\n",
+			       VIM_VERSION_NODOT, exename, VIM_VERSION_NODOT);
+	    fprintf(fd, "if exist \"%%VIMRUNTIME%%\\%s\" set VIM_EXE_DIR=%%VIMRUNTIME%%\n", exename);
+	    fprintf(fd, "\n");
 
 	    /* Give an error message when the executable could not be found. */
-	    fprintf(fd, "if exist \"%%VIM%%\\%s\" goto havevim\n", buf);
-	    fprintf(fd, "echo \"%%VIM%%\\%s\" not found\n", buf);
-	    fprintf(fd, "goto eof\n\n");
+	    fprintf(fd, "if exist \"%%VIM_EXE_DIR%%\\%s\" goto havevim\n",
+								     exename);
+	    fprintf(fd, "echo \"%%VIM_EXE_DIR%%\\%s\" not found\n", exename);
+	    fprintf(fd, "goto eof\n");
+	    fprintf(fd, "\n");
 	    fprintf(fd, ":havevim\n");
 
 	    fprintf(fd, "rem collect the arguments in VIMARGS for Win95\n");
@@ -796,10 +801,12 @@ install_bat_choice(int idx)
 	    }
 	    fprintf(fd, "set VIMARGS=%%VIMARGS%% %%1\n");
 	    fprintf(fd, "shift\n");
-	    fprintf(fd, "goto loopstart\n\n");
+	    fprintf(fd, "goto loopstart\n");
 	    fprintf(fd, ":loopend\n");
+	    fprintf(fd, "\n");
 
-	    fprintf(fd, "if .%%OS%%==.Windows_NT goto ntaction\n\n");
+	    fprintf(fd, "if .%%OS%%==.Windows_NT goto ntaction\n");
+	    fprintf(fd, "\n");
 
 	    /* For gvim.exe use "start" to avoid that the console window stays
 	     * open. */
@@ -809,24 +816,21 @@ install_bat_choice(int idx)
 		fprintf(fd, "start ");
 	    }
 
-	    /* Do use quotes here if the path includes a space. */
-	    if (strchr(installdir, ' ') != NULL)
-		fprintf(fd, "\"%%VIM%%\\%s\" %s %%VIMARGS%%\n", buf, vimarg);
-	    else
-		fprintf(fd, "%%VIM%%\\%s %s %%VIMARGS%%\n", buf, vimarg);
-	    fprintf(fd, "goto eof\n\n");
+	    /* Always use quotes, $VIM or $VIMRUNTIME might have a space. */
+	    fprintf(fd, "\"%%VIM_EXE_DIR%%\\%s\" %s %%VIMARGS%%\n",
+							     exename, vimarg);
+	    fprintf(fd, "goto eof\n");
+	    fprintf(fd, "\n");
 
 	    if (*exename == 'g')
 	    {
 		fprintf(fd, ":nofork\n");
 		fprintf(fd, "start /w ");
-		/* Do use quotes here if the path includes a space. */
-		if (strchr(installdir, ' ') != NULL)
-		    fprintf(fd, "\"%%VIM%%\\%s\" %s %%VIMARGS%%\n", buf,
-								      vimarg);
-		else
-		    fprintf(fd, "%%VIM%%\\%s %s %%VIMARGS%%\n", buf, vimarg);
-		fprintf(fd, "goto eof\n\n");
+		/* Always use quotes, $VIM or $VIMRUNTIME might have a space. */
+		fprintf(fd, "\"%%VIM_EXE_DIR%%\\%s\" %s %%VIMARGS%%\n",
+							     exename, vimarg);
+		fprintf(fd, "goto eof\n");
+		fprintf(fd, "\n");
 	    }
 
 	    fprintf(fd, ":ntaction\n");
@@ -840,22 +844,18 @@ install_bat_choice(int idx)
 		fprintf(fd, "start \"dummy\" /b ");
 	    }
 
-	    /* Do use quotes here if the path includes a space. */
-	    if (strchr(installdir, ' ') != NULL)
-		fprintf(fd, "\"%%VIM%%\\%s\" %s %%*\n", buf, vimarg);
-	    else
-		fprintf(fd, "%%VIM%%\\%s %s %%*\n", buf, vimarg);
-	    fprintf(fd, "goto eof\n\n");
+	    /* Always use quotes, $VIM or $VIMRUNTIME might have a space. */
+	    fprintf(fd, "\"%%VIM_EXE_DIR%%\\%s\" %s %%*\n", exename, vimarg);
+	    fprintf(fd, "goto eof\n");
+	    fprintf(fd, "\n");
 
 	    if (*exename == 'g')
 	    {
 		fprintf(fd, ":noforknt\n");
 		fprintf(fd, "start \"dummy\" /b /wait ");
-		/* Do use quotes here if the path includes a space. */
-		if (strchr(installdir, ' ') != NULL)
-		    fprintf(fd, "\"%%VIM%%\\%s\" %s %%*\n", buf, vimarg);
-		else
-		    fprintf(fd, "%%VIM%%\\%s %s %%*\n", buf, vimarg);
+		/* Always use quotes, $VIM or $VIMRUNTIME might have a space. */
+		fprintf(fd, "\"%%VIM_EXE_DIR%%\\%s\" %s %%*\n",
+							     exename, vimarg);
 	    }
 
 	    fprintf(fd, "\n:eof\n");
--- a/src/dosinst.h
+++ b/src/dosinst.h
@@ -350,7 +350,7 @@ retry:
  * List of targets.  The first one (index zero) is used for the default path
  * for the batch files.
  */
-#define TARGET_COUNT  8
+#define TARGET_COUNT  9
 
 struct
 {
@@ -381,6 +381,8 @@ struct
 					"vimdiff.exe","vim.exe",  "-d"},
     {"gvimdiff","gvimdiff.bat",	"gVim Diff.lnk",
 					"gvimdiff.exe","gvim.exe", "-d"},
+    {"vimtutor","vimtutor.bat", "Vim tutor.lnk",
+					"vimtutor.bat",  "vimtutor.bat", ""},
 };
 
 #define ICON_COUNT 3
--- a/src/edit.c
+++ b/src/edit.c
@@ -7251,7 +7251,7 @@ ins_ctrl_g()
     static void
 ins_ctrl_hat()
 {
-    if (map_to_exists_mode((char_u *)"", LANGMAP))
+    if (map_to_exists_mode((char_u *)"", LANGMAP, FALSE))
     {
 	/* ":lmap" mappings exists, Toggle use of ":lmap" mappings. */
 	if (State & LANGMAP)
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -985,7 +985,7 @@ getcmdline(firstc, count, indent)
 		goto cmdline_not_changed;
 
 	case Ctrl_HAT:
-		if (map_to_exists_mode((char_u *)"", LANGMAP))
+		if (map_to_exists_mode((char_u *)"", LANGMAP, FALSE))
 		{
 		    /* ":lmap" mappings exists, toggle use of mappings. */
 		    State ^= LANGMAP;
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -2884,7 +2884,8 @@ get_menu_tool_width(void)
     width += get_item_dimensions(gui.toolbar, GTK_ORIENTATION_VERTICAL);
 # endif
 # ifdef FEAT_GUI_TABLINE
-    width += get_item_dimensions(gui.tabline, GTK_ORIENTATION_VERTICAL);
+    if (gui.tabline != NULL)
+	width += get_item_dimensions(gui.tabline, GTK_ORIENTATION_VERTICAL);
 # endif
 #endif
 
@@ -2903,7 +2904,8 @@ get_menu_tool_height(void)
     height += get_item_dimensions(gui.toolbar, GTK_ORIENTATION_HORIZONTAL);
 #endif
 #ifdef FEAT_GUI_TABLINE
-    height += get_item_dimensions(gui.tabline, GTK_ORIENTATION_HORIZONTAL);
+    if (gui.tabline != NULL)
+	height += get_item_dimensions(gui.tabline, GTK_ORIENTATION_HORIZONTAL);
 #endif
 
     return height;
@@ -3578,32 +3580,38 @@ gui_mch_init(void)
 #endif /* FEAT_TOOLBAR */
 
 #ifdef FEAT_GUI_TABLINE
-    /* Use a Notebook for the tab pages labels.  The labels are hidden by
-     * default. */
-    gui.tabline = gtk_notebook_new();
-    gtk_widget_show(gui.tabline);
-    gtk_box_pack_start(GTK_BOX(vbox), gui.tabline, FALSE, FALSE, 0);
-    gtk_notebook_set_show_border(GTK_NOTEBOOK(gui.tabline), FALSE);
-    gtk_notebook_set_show_tabs(GTK_NOTEBOOK(gui.tabline), FALSE);
-
-    {
-	GtkWidget *page, *label;
-
-	/* Add the first tab. */
-	page = gtk_vbox_new(FALSE, 0);
-	gtk_widget_show(page);
-	gtk_container_add(GTK_CONTAINER(gui.tabline), page);
-	label = gtk_label_new("-Empty-");
-	gtk_widget_show(label);
-	gtk_notebook_set_tab_label(GTK_NOTEBOOK(gui.tabline), page, label);
-    }
-    gtk_signal_connect(GTK_OBJECT(gui.tabline), "switch_page",
-		       GTK_SIGNAL_FUNC(on_select_tab), NULL);
-
-    /* Create a popup menu for the tab line and connect it. */
-    tabline_menu = create_tabline_menu();
-    gtk_signal_connect_object(GTK_OBJECT(gui.tabline), "button_press_event",
+    /*
+     * Use a Notebook for the tab pages labels.  The labels are hidden by
+     * default.
+     * TODO: currently doesn't work for Gnome.
+     */
+    if (!using_gnome)
+    {
+	gui.tabline = gtk_notebook_new();
+	gtk_widget_show(gui.tabline);
+	gtk_box_pack_start(GTK_BOX(vbox), gui.tabline, FALSE, FALSE, 0);
+	gtk_notebook_set_show_border(GTK_NOTEBOOK(gui.tabline), FALSE);
+	gtk_notebook_set_show_tabs(GTK_NOTEBOOK(gui.tabline), FALSE);
+
+	{
+	    GtkWidget *page, *label;
+
+	    /* Add the first tab. */
+	    page = gtk_vbox_new(FALSE, 0);
+	    gtk_widget_show(page);
+	    gtk_container_add(GTK_CONTAINER(gui.tabline), page);
+	    label = gtk_label_new("-Empty-");
+	    gtk_widget_show(label);
+	    gtk_notebook_set_tab_label(GTK_NOTEBOOK(gui.tabline), page, label);
+	}
+	gtk_signal_connect(GTK_OBJECT(gui.tabline), "switch_page",
+			   GTK_SIGNAL_FUNC(on_select_tab), NULL);
+
+	/* Create a popup menu for the tab line and connect it. */
+	tabline_menu = create_tabline_menu();
+	gtk_signal_connect_object(GTK_OBJECT(gui.tabline), "button_press_event",
 		  GTK_SIGNAL_FUNC(on_tabline_menu), GTK_OBJECT(tabline_menu));
+    }
 #endif
 
     gui.formwin = gtk_form_new();
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -2063,7 +2063,7 @@ gui_mch_draw_string(
 	int		cw;	/* width of current cell */
 	int		c;
 
-	wlen = 0
+	wlen = 0;
 	clen = 0;
 	cells = 0;
 	for (i = 0; i < len; )
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -157,7 +157,7 @@ coladvance2(pos, addspaces, finetune, wc
 		    || (VIsual_active && *p_sel != 'o')
 #endif
 #ifdef FEAT_VIRTUALEDIT
-		    || (ve_flags & VE_ONEMORE)
+		    || ((ve_flags & VE_ONEMORE) && wcol < MAXCOL)
 #endif
 		    ;
     line = ml_get_curline();
--- a/src/option.c
+++ b/src/option.c
@@ -231,6 +231,9 @@
 #ifdef FEAT_WINDOWS
 # define PV_WFH		OPT_WIN(WV_WFH)
 #endif
+#ifdef FEAT_VERTSPLIT
+# define PV_WFW		OPT_WIN(WV_WFW)
+#endif
 #define PV_WRAP		OPT_WIN(WV_WRAP)
 
 
@@ -2640,6 +2643,13 @@ static struct vimoption
 			    (char_u *)NULL, PV_NONE,
 #endif
 			    {(char_u *)FALSE, (char_u *)0L}},
+    {"winfixwidth", "wfw", P_BOOL|P_VI_DEF|P_RSTAT,
+#ifdef FEAT_VERTSPLIT
+			    (char_u *)VAR_WIN, PV_WFW,
+#else
+			    (char_u *)NULL, PV_NONE,
+#endif
+			    {(char_u *)FALSE, (char_u *)0L}},
     {"winminheight", "wmh", P_NUM|P_VI_DEF,
 #ifdef FEAT_WINDOWS
 			    (char_u *)&p_wmh, PV_NONE,
@@ -8869,6 +8879,9 @@ get_varp(p)
 #ifdef FEAT_WINDOWS
 	case PV_WFH:	return (char_u *)&(curwin->w_p_wfh);
 #endif
+#ifdef FEAT_VERTSPLIT
+	case PV_WFW:	return (char_u *)&(curwin->w_p_wfw);
+#endif
 #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
 	case PV_PVW:	return (char_u *)&(curwin->w_p_pvw);
 #endif
--- a/src/option.h
+++ b/src/option.h
@@ -1044,6 +1044,9 @@ enum
 #ifdef FEAT_WINDOWS
     , WV_WFH
 #endif
+#ifdef FEAT_VERTSPLIT
+    , WV_WFW
+#endif
     , WV_WRAP
     , WV_COUNT	    /* must be the last one */
 };
--- a/src/proto/getchar.pro
+++ b/src/proto/getchar.pro
@@ -49,15 +49,15 @@ int do_map __ARGS((int maptype, char_u *
 int get_map_mode __ARGS((char_u **cmdp, int forceit));
 void map_clear __ARGS((char_u *cmdp, char_u *arg, int forceit, int abbr));
 void map_clear_int __ARGS((buf_T *buf, int mode, int local, int abbr));
-int map_to_exists __ARGS((char_u *str, char_u *modechars));
-int map_to_exists_mode __ARGS((char_u *rhs, int mode));
+int map_to_exists __ARGS((char_u *str, char_u *modechars, int abbr));
+int map_to_exists_mode __ARGS((char_u *rhs, int mode, int abbr));
 char_u *set_context_in_map_cmd __ARGS((expand_T *xp, char_u *cmd, char_u *arg, int forceit, int isabbrev, int isunmap, cmdidx_T cmdidx));
 int ExpandMappings __ARGS((regmatch_T *regmatch, int *num_file, char_u ***file));
 int check_abbr __ARGS((int c, char_u *ptr, int col, int mincol));
 int makemap __ARGS((FILE *fd, buf_T *buf));
 int put_escstr __ARGS((FILE *fd, char_u *strstart, int what));
 void check_map_keycodes __ARGS((void));
-char_u *check_map __ARGS((char_u *keys, int mode, int exact, int ign_mod));
+char_u *check_map __ARGS((char_u *keys, int mode, int exact, int ign_mod, int abbr));
 void init_mappings __ARGS((void));
 void add_map __ARGS((char_u *map, int mode));
 /* vim: set ft=c : */
--- a/src/structs.h
+++ b/src/structs.h
@@ -176,6 +176,8 @@ typedef struct
 #if defined(FEAT_WINDOWS)
     int		wo_wfh;
 # define w_p_wfh w_onebuf_opt.wo_wfh	/* 'winfixheight' */
+    int		wo_wfw;
+# define w_p_wfw w_onebuf_opt.wo_wfw	/* 'winfixwidth' */
 #endif
 #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
     int		wo_pvw;
@@ -1656,6 +1658,7 @@ struct frame_S
     char	fr_layout;	/* FR_LEAF, FR_COL or FR_ROW */
 #ifdef FEAT_VERTSPLIT
     int		fr_width;
+    int		fr_newwidth;	/* new width used in win_equal_rec() */
 #endif
     int		fr_height;
     int		fr_newheight;	/* new height used in win_equal_rec() */
--- 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 17)"
-#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 17, compiled "
+#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 18)"
+#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 18, compiled "