*version6.txt*  For Vim version 6.0ab.  Last change: 2001 Apr 16


		  VIM REFERENCE MANUAL    by Bram Moolenaar


Welcome to Vim Version 6.0!

	Vim 2001, a folding space odyssey
	Where do you want to fold today?


This document lists the differences between Vim 5.x and Vim 6.0.
See |vi_diff.txt| for an overview of differences between Vi and Vim 5.0.
See |version4.txt| for differences between Vim 3.0 and Vim 4.0.
See |version5.txt| for differences between Vim 4.0 and Vim 5.0.

INCOMPATIBLE CHANGES			|incompatible-6|

Cursor position in Visual mode		|curpos-visual|
substitute command			|substitute-CR|
'include' option local			|include-local|
global option values used		|new-global-values|
'fileencoding' changed			|fileencoding-changed|
Digraphs changed			|digraphs-changed|
Filetype detection changed		|filetypedetect-changed|
Unlisted buffers introduced		|new-unlisted-buffers|
CTRL-U in Command-line mode		|CTRL-U-changed|
Ctags gone				|ctags-gone|
Documentation				|documentation-6|
Small incompatibilities			|incomp-small-6|

NEW FEATURES

Folding					|new-folding|
Vertically split windows		|new-vertsplit|
Diff mode				|new-diff-mode|
evim: click-and-type			|new-evim|
Flexible indenting			|new-indent-flex|
Extended search patterns		|new-searchpat|
UTF-8 support				|new-utf-8|
Multi-language support			|new-multi-lang|
Plugin support				|new-plugins|
Filetype plugins			|new-filetype-plugins|
Window for command-line editing		|new-cmdwin|
Debugging mode				|new-debug-mode|
Cursor in virtual position		|new-virtedit|
Debugger interface			|new-debug-itf|
Buffer types				|new-buftype|
Ports					|ports-6|
Quickfix extended			|quickfix-6|
Operator modifiers			|new-operator-mod|
Search Path				|new-search-path|
Editing files over a network		|new-network-files|
Writing files				|new-file-writing|
Argument list				|new-argument-list|
Restore a View				|new-View|
Various new items			|new-items-6|

IMPROVEMENTS				|improvements-6|

COMPILE TIME CHANGES			|compile-changes-6|

BUG FIXES				|bug-fixes-6|

==============================================================================
INCOMPATIBLE CHANGES				*incompatible-6*

These changes are incompatible with previous releases.  Check this list if you
run into a problem when upgrading from Vim 5.x to 6.0


Cursor position in Visual mode			*curpos-visual*
------------------------------

When going from one window to another window on the same buffer while in
Visual mode, the cursor position of the other window is adjusted to keep the
same Visual area.  This can be used to set the start of the Visual area in one
window and the end in another.


substitute command				*substitute-CR*
------------------

The substitute string has been made Vi compatible.  Previously a CTRL-V had a
special meaning and could be used to prevent a <CR> to insert a line break.
This made it impossible to insert a CTRL-V before a line break.  Now a
backslash is used to prevent a <CR> to cause a line break.  Since the number
of backslashes is halved, it is still possible to insert a line break at the
end of the line.  This now works just like Vi, but it's not compatible with
Vim versions before 6.0.

When a ":s" command doesn't make any substitutions, it doesn't set the '[ and
'] marks.


'include' option local				*include-local*
----------------------

The 'include' option is now local to the buffer.  Each language may require
another 'include' option value.  This only matters if you set the 'include'
option and expect it to have the new value in other buffers too.


Global option values used			*new-global-values*
-------------------------

There are now global values for options which are local to a buffer or window.
Previously the local options were copied from one buffer to another.  When
editing another file this could cause options set in a modeline to be used for
the wrong file.  Now the global values are used when entering a buffer that
has not been used before.  Also, when editing another buffer in a window, the
local window options are reset to their global values.  The ":set" command
sets both the local and global values, this is still compatible.  But a
modeline only sets the local value, this is not backwards compatible.

":let &opt = val" now sets the local and global values, like ":set".  New
commands have been added to set the global or local value:
	:let &opt = val		like ":set"
	:let &g:opt = val	like ":setglobal"
	:let &l:opt = val	like ":setlocal"


'fileencoding' changed				*fileencoding-changed*
----------------------

'fileencoding' was used in Vim 5.x to set the encoding used inside all of Vim.
This was a bit strange, because it was local to a buffer and worked for all
buffers.  It could never be different between buffers, because it changed the
way text in all buffers was interpreted.
It is now used for the encoding of the file related to the buffer.  If you
still set 'fileencoding' it is likely to be overwritten by the detected
encoding from 'fileencodings'.
The FileEncoding autocommand now does the same as the new EncodingChanged
event.


Digraphs changed				*digraphs-changed*
----------------

The default digraphs now correspond to RFC1345.  This is different from
what was used in Vim 5.x. |digraphs|


Filetype detection changed			*filetypedetect-changed*
--------------------------

The filetype detection previously was using the "filetype" autocommand group.
This caused confusion with the FileType event name.  The group is now called
"filetypedetect".  It still works, but if the "filetype" group is used the
autocommands will not be removed by ":filetype off".
The support for 'runtimepath' has made the "myfiletypefile" and "mysyntaxfile"
mechanism obsolete.  They are still used for backwards compatibility.

The connection between the FileType event and setting the 'syntax' option was
previously in the "syntax" autocommand group.  That caused confusion with the
Syntax event name.  The group is now called "syntaxset".

The distributed syntax files no longer contain "syntax clear".  That makes it
possible to include one in the other without tricks.


Unlisted buffers introduced			*new-unlisted-buffers*
---------------------------

Introduction of unlisted buffers: Make a difference between buffers which
don't appear in the buffer list and buffers which are really not in the buffer
list.  Commands like ":ls", ":bnext", ":blast" and the Buffers menu will skip
buffers not in the buffer list. |unlisted-buffer|
The 'buflisted' option can be used to make a buffer appear in the buffer list
or not.
Several commands that previously added a buffer to the buffer list now create
an unlisted buffer.  This means that a ":bnext" or ":ball" will not find these
files until they have actually been edited.  For example, buffers used for the
alternative file by ":w file" and ":r file".
Other commands previously completely deleted a buffer and now only remove the
buffer from the buffer list.  Commands relying on a buffer not to be present
might fail.  For example A ":bdelete" command in an autocommand that relied on
something following to fail (was used in the automatic tests).
|:bwipeout| can be used for the old meaning of ":bdelete".
The BufDelete autocommand event is now triggered when a buffer is removed from
the buffer list.  The BufCreate event is only triggered when a buffer is
created that is added to the buffer list, or when an existing buffer is added
to the buffer list.  BufAdd is a new name for BufCreate.
The new BufNew event is for creating any buffer and BufWipeout for really
deleting a buffer.
When doing Insert mode completion only buffers in the buffer list are scanned.
Added the 'U' flag to 'complete' to do completion from unlisted buffers.
Unlisted buffers are not stored in a viminfo file.


CTRL-U in Command-line mode			*CTRL-U-changed*
---------------------------

CTRL-U in the command line cleared the whole line.  Most shells only delete
the characters before the cursor.  Made it like that. (Steve Wall)
You can get the old behavior with CTRL-E CTRL-U: >
	:cnoremap <C-U> <C-E><C-U>

Ctags gone					*ctags-gone*
----------

Ctags is no longer part of the Vim distribution.  It's now a grown-up program
by itself, it deserves to be distributed separately.  However, the binary
archives do include the ctags program, since it's small and useful.
Ctags can be found here: http://darren.hiebert.com/ctags/index.html.


Documentation					*documentation-6*
-------------

The documentation has been reorganized, an item may not be where you found it
in Vim 5.x.
- Split into a reference manual and a user manual.
- Put the quick reference in a separate file (so that it can be printed).

The examples in the documentation were previously marked with a ">" in the
first column.  This made it difficult to copy/paste them.  There is now a
single ">" before the example and it ends at a "<" or a non-blank in the first
column.  This also looks better without highlighting.

When syntax highlighting is not enabled, the characters in the help file which
mark examples ('>' and '<') and header lines ('~') are replaced with a space.

When closing the help window restore the layout from before opening it, if the
window layout didn't change since then.
When opening the help window, put it at the top of the Vim window if the
current window is less than 80 characters and not full width.

'helpfile' is no longer used to find the help tags file.  This allows a user
to add its own help files (e.g., for plugins).

When doing ":help tag", don't open help.txt first, jump directly to the help
tag.  It's faster and avoids an extra message.


Small incompatibilities				*incomp-small-6*
-----------------------

'backupdir', 'cdpath', 'directory', 'equalprg', 'errorfile', 'formatprg',
'grepprg', 'helpfile', 'makeef', 'makeprg', 'keywordprg', 'cscopeprg',
'viminfo' and 'runtimepath' can no longer be set from a modeline, for better
security.

Removed '_' from the 'breakat' default: It's commonly used in keywords.

The default for 'mousehide' is on, because this works well form most people.

The Amiga binary is now always compiled with "big" features.  The "big" binary
archive no longer exists.

The items "[RO]", "[+]", "[help]", "[Preview]" and "[filetype]" in
'statusline' no longer have a leading space.

Non-Unix systems: When expanding wildcards for the Vim arguments, don't use
'suffixes'.  It now works as if the shell had expanded the arguments.

The 'lisp', 'smartindent' and 'cindent' options are not switched off when
'paste' is set.  The auto-indenting is disabled when 'paste' is set, but
manual indenting with "=" still works.

When formatting with "=" uses 'cindent' or 'indentexpr' indenting, and there
is no change in indent, this is not counted as a change ('modified' isn't set
and there is nothing to undo).

Report 'modified' as changed when 'fileencoding' or 'fileformat' was set.
Thus it reflects the possibility to abandon the buffer without losing changes.

The "Save As" menu entry now edits the saved file.  Most people expect it to
work like this.

A buffer for a directory is no longer added to the Buffers menu.

Renamed <Return> to <Enter>, since that's what it's called on most keyboards.
Thus it's now the hit-enter prompt instead of the hit-return prompt.

When setting 'syntax' to a name for which there is no syntax file, the syntax
highlighting is cleared.  Previously the existing highlighting was kept.

The default for the 'viminfo' option is now '50,"50,h when 'compatible' isn't
set.  Most people will want to use it, including beginners, but it required
setting the option, which isn't that easy.

After using ":colder" the newer error lists are overwritten.  This makes it
possible to use ":grep" to browse in a tree-like way.  Must use ":cnewer 99"
to get the old behavior.

The patterns in 'errorformat' would sometimes ignore case (MS-Windows) and
sometimes not (Unix).  Now case is always ignored.  Add "\C" to the pattern to
match case.

The 16 bit MS-DOS version is now compiled without the +listcmds feature
(buffer list manipulation commands).  They are not often needed and this
executable needs to be smaller.

'sessionoptions' now includes "curdir" by default.  This means that restoring
a session will result in the current directory being restored, instead of
going to the directory where the session file is located.

A session deleted all buffers, deleting all marks.  Now keep the buffer list,
it shouldn't hurt for some existing buffers to remain present.
When the argument list is empty ":argdel *" caused an error message.

No longer put the search pattern from a tag jump in the history.

Use "SpecialKey" highlighting for unprintable characters instead of "NonText".
The idea is that unprintable text or any text that's displayed differently
from the characters in the file is using "SpecialKey", and "NonText" is used
for text that doesn't really exist in the file.

Motif and Athena now use the system default colors for the menu and scrollbar.
Used to be grey.  It's still possible to set the colors with ":highlight"
commands and resources.

Formatting text with "gq" breaks a paragraph at a non-empty blank line.
Previously the line would be removed, which wasn't very useful.

":normal" does no longer hang when the argument ends in half a command.
Previously Vim would wait for more characters to be typed, without updating
the screen.  Now it pretends an <Esc> was typed.

Bitmaps for the toolbar are no longer searched for in "$VIM/bitmaps" bit in
the "bitmaps" directories in 'runtimepath.

==============================================================================
NEW FEATURES

Folding							*new-folding*
-------

Vim can now display a buffer with text folded.  This allows overviewing the
structure of a file quickly.  It is also possible to move folded text, for
example to move a function to another position.

There is a whole bunch of new commands and options related to folding.
See |folding|.


Vertically split windows				*new-vertsplit*
------------------------

Windows can also be split vertically.  This makes it possible to have windows
side by side.  One nice use for this is to compare two similar files.  The
'scrollbind' option can be used to synchronize scrolling.

A vertical split can be created with the commands:
	:vsplit	  or  CTRL-W v  or CTRL-W CTRL-V	|:vsplit|
	:vnew						|:vnew|
	:vertical {cmd}					|:vertical|
The last one is a modifier, which has a meaning for any command that splits a
window.  For example: >
	:vertical stag main
Will vertically split the window and jump to the tag "main" in the new window.

Moving from window to window horizontally can be done with the |CTRL-W_h| and
|CTRL-W_l| commands.  The |CTRL-W_k| and |CTRL-W_j| commands have been changed
to jump to the window above or below the cursor position.

The vertical and horizontal splits can be mixed as you like.  Resizing windows
is easy when using the mouse, just position the pointer on a status line or
vertical separator and drag it.  In the GUI a special mouse pointer shape
indicates where you can drag a status or separator line.

To resize vertically split windows use the |CTRL-W_<| and |CTRL-W_>| commands.
To make a window the maximum width use the CTRL-W | command |CTRL-W_bar|.

To force a new window to use the full width or height of the Vim window,
these two modifiers are available:
	:topleft {cmd}		New window appears at the top with full
				width or at the left with full height.
	:botright {cmd}		New window appears at the bottom with full
				width or at the right with full height.
This can be combined with ":vertical" to force a vertical split: >
	:vert bot dsplit DEBUG
This will open a window at the far right, occupying the full height of the Vim
window, with the cursor on the first definition of "DEBUG".
The help window is always opened at the top, like ":topleft" was used.

A few options can be used to set the preferences for vertically split windows.
They work similar to their existing horizontal equavalents:
	horizontal	vertical ~
	'splitbelow'	'splitright'
	'winheight'	'winwidth'
	'winminheight'	'winminwidth'
It's possible to set 'winminwidth' to zero, so that temporarliy unused windows
hardly take up space without closing them.

The new 'eadirection' option tells where 'equalalways' applies:
	:set eadirection=both		both directions
	:set eadirection=ver		equalize window heights
	:set eadirection=hor		equalize windows widths
This can be used to avoid changing window sizes when you want to keep them.

Since windows can become quite narrow with vertical splits, text lines will
often not fit.  The 'sidescrolloff' has been added to keep some context left
and right of the cursor.  The 'listchars' option has been extended with the
"precedes" item, to show a "<" for example, when there is text left off the
screen. (Utz-Uwe Haus)

"-O" command line argument: open windows vertically. (Scott Urban)

Added commands to move the current window to the very top (CTRL-W K), bottom
(CTRL-W J), left (CTRL-W H) and right (CTRL-W L).  In the new position the
window uses the full width/height of the screen.

When there is not enough room in the status line for both the file name and
the ruler, use up to half the width for the ruler.  Useful for narrow windows.


Diff mode						*new-diff-mode*
---------

Added diff mode |diff-mode|
- Added the vimdiff command to start diff mode on a few files.
- Added the vimdiff manpage.
- Added the ":diffsplit" command to start diff mode with the current file and
  another file.
- Added the ":diffpatch" command to start diff mode with the current file and
  a patch file.
- The 'diff' option switches diff mode on in a window.
- The ":diffupdate" refreshes the diffs.
- The 'diffopt' option changes how diffs are displayed.
- The 'diffexpr' option can be set how a diff is to be created.
- The 'patchexpr' option can be set how patch is applied to a file.
- Added the "diff" folding method.  When opening a window for diff-mode, set
  'foldlevel' to zero and 'foldenable' on, to close the folds.
- Added the DiffAdd, DiffChange, DiffDelete and DiffText highlight groups to
  specify the highlighting for differences.  The defaults are ugly...
- Unix: make a vimdiff symbolic link for "make install".
- Added ":diffget" and "diffput" to remove differences.


evim: click-and-type					*new-evim*
--------------------

eVim stands for "Easy Vim".  This is a separate program, but can also be
started as "vim -y".

This starts Vim with 'insertmode' set to allow click-and-type editing.  This
is only for people who can't stand two modes.

eView does the same but in readonly mode.

In the GUI a CTRL-C only interrupts when busy with something, not when waiting
for a character.  Allows using CTRL-C to copy text to the clipboard.


Flexible indenting					*new-indent-flex*
------------------

Automatic indenting is now possible for any language.  It works with a Vim
script, which makes it very flexible to compute the indent.

The 'indentexpr' option is evaluated to get the indent for a line.  The
'indentkeys' option tells when to trigger re-indenting.  Normally these
options are set from an indent script.  Like Syntax files, indent scripts will
be created and maintained by many people.


Extended search patterns				*new-searchpat*
------------------------

Multi-line patterns: (partly by Loic Grenie)
\n		match end-of-line, also in []
\_[]		match characters in range and end-of-line
\_x		match character class and end-of-line
\_.		match any character or end-of-line
\_^		match start-of-line, can be used anywhere in the regexp
\_$		match end-of-line, can be used anywhere in the regexp

\c		ignore case for the whole pattern
\C		match case for the whole pattern
\m		magic on for the following
\M		magic off for the following
\v		make following characters "very magic"
\V		make following characters "very nomagic"

\@!		don't match atom before it.
		Example: "foo\(bar\)\@!" matches "foo " but not "foobar".
\@=		match atom, resulting in  zero-width match
		Example: "foo\(bar\)\@=" matches "foo" in "foobar".
\@<!		don't match atom before it before the current position
\@<=		match atom before it before current position
\@>		match preceding atom as a subexpression

\&		match only when branch before and after it match

\%[]		optionally match a list of atoms; "end\%[if]" matches "end",
		"endi" and "endif"
\%(\)		like \(\), but without creating a back-reference; there can be
		any number of these, overcomes the limit of nine \( \) pairs
\%^		match start-of-file (Chase Tingley)
\%$		match end-of-file (Chase Tingley)
\%#		Match with the cursor position. (Chase Tingley)
\?		Just like "\=" but can't be used in a "?" command.

\%23l		match in line 23
\%<23l		match before line 23
\%>23l		match after line 23
\%23c, \%<23c, \%>23c   match in/before/after column 23
\%23v, \%<23v, \%>23v	match in/before/after virtual column 23


For syntax items:
\z(...\)	external reference match set (in region start pattern)
\z1 - \z9	external reference match use (in region skip or end pattern)
	(Scott Bigham)

\zs		use position as start of match
\ze		use position as end of match

Removed limit of matching only up to 32767 times with *, \+, etc.

Added some support for double-byte characters. (Muraoka)


UTF-8 support						*new-utf-8*
-------------

Vim can now edit files in UTF-8 encoding.  Up to 31 bit characters can be
used, but only 16 bit characters are displayed.  Up to two combining
characters are supported, they overprint the preceding character.
Double-width characters are also supported.  See |UTF-8|.

UCS-2, UCS-4 and UTF-16 encodings are supported too, they are converted to
UTF-8 internally.  There is also support for editing Unicode files in a Latin1
environment.  Other encodings are converted with iconv() or an external
converter specified with 'charconvert'.

Many new items for Multi-byte support:
- Added 'encoding' option: specifies character coding used inside Vim.  It can
  be any 8-bit encoding, some double-byte encodings or Unicode.
  It is initialized from the environment when a supported value is found.
- Added 'fileencoding' and 'fileencodings': specify character coding in a
  file, similar to 'fileformat' and 'fileformats'.
  When 'encoding' is "utf-8" and 'fileencodings' is "utf-8,latin1" this will
  automatically switch to latin1 if a file does not contain valid UTF-8.
- Added 'guifontwide' for double-width font.
- Added Korean support for character class detection.  Also fix cls() in
  search.c. (Chong-Dae Park)
- Added 'bomb' option and detection of a BOM at the start of a file.  Can be
  used with "ucs-bom" in 'fileencodings' to automatically detect a Unicode
  file if it starts with a BOM.  Especially useful on MS-Windows (NT and
  2000), which uses ucs-2le files with a BOM (e.g., when exporting the
  registry).
- Win32: Typing multi-byte characters without IME. (Alexander Smishlajev)
- Win32 with Mingw: compile with iconv library. (Ron Aaron)
- Win32 with MSVC: dynamically load iconv.dll library. (Muraoka Taro)
- Added 'delcombing' option: Delete combining character separately. (Ron
  Aaron)
- When 'viminfo' contains the 'c' flag, the viminfo file is converted from the
  'encoding' it was written with to the current 'encoding'.
- Added the 'termencoding' option: Specifies the encoding used for the
  terminal.  Useful to put Vim in utf-8 mode while in a non-Unicode locale: >
    :let &termencoding = &encoding
    :set encoding=utf-8
- Added ":scriptencoding" command: convert lines in a sourced script to
  'encoding'.  Useful for menu files.
- Made "\<" and "\>" in regexp work for UTF-8. (Muraoka Taro)
- The "xfontset" feature isn't required for "xim".  These are now two
  independent features.
- XIM: enable XIM when typing a language character (Insert mode, Search
  pattern, "f" or "r" command).  Disable XIM when typing a Normal mode
  command.
- Added 'm' flag to 'formatoptions': When wrapping words, allow splitting at
  each multibyte character, not only at a space.
- Patterns should now work properly with all kinds of multi-byte characters.
- Made ":syntax keyword" work with multi-byte characters.

Allow defining digraphs for multi-byte characters.
Added RFC1345 digraphs for Unicode.
Most Normal mode commands that accept a character argument, like "r", "t" and
"f" now accept a digraph.  The 'D' flag in 'cpoptions' disables this to remain
Vi compatible.

Added Language mapping and 'keymap' to be able to type multi-byte characters:
- Added the ":lmap" command and friends: Define mappings that are used when
  typing characters in the language of the text.  Also for "r", "t", etc.  In
  Insert and Command-line mode CTRL-^ switches the use of the mappings on/off.
- "<char-123>" argument to ":map", allows to specify the decimal, octal or
  hexadecimal value of a character.
- Implemented the 'keymap' option: Load a keymap file.  Uses ":lnoremap" to
  define mappings for the keymap.  The new ":loadkeymap" command is used in
  the keymap file.
- Added 'k' flag in 'statusline': Value of "b:keymap_name" or 'keymap' when
  it's being used.  Uses "<lang>" when no keymap is loaded and ":lmap"s are
  active.  Show this text in the default statusline too.
- When typing a mapping that's not finished yet, display the last character
  under the cursor in Insert mode and Command-line mode.  Looks good for dead
  characters.
- Made the 'langmap' option recognize multi-byte characters.  But mapping only
  works for 8-bit characters.  Helps when using UTF-8.
- Use a different mouse cursor for when ":lmap" mappings are active.  Can
  specify two highlight groups for an item in 'guicursor'.  By default
  "lCursor" and "Cursor" are equal, the user must set a color he likes.
- Show "(lang)" for 'showmode' when language mapping is enabled.
- UTF-8: Made "r" work with a ":lmap" that includes a composing character.
  Also works for "f", which now works to find a character that includes a
  composing character.

Other multi-byte character additions:
- Support double-byte single-width characters for euc-jp: Characters starting
  with 0x8E.  Added ScreenLines2[] to store the second byte.
- Unix: Included support for the "SJIS" locale, with "shift-jis" and "cp932"
  as aliases.


Multi-language support					*new-multi-lang*
----------------------

- Added +multi_lang feature.
- Prepared for use of gettext() by putting translatable strings in _().
  Added "po" directory with message translations. (Marcin Dalecki)
  The src/po/README.txt file explains a few things about translation.
- Added v:lang variable to be able to get current language setting.
  (Marcin Dalecki)
- Added ":language" command to set the language (locale) for messages and
  character type.
- Added ":menutrans" to be able to translate menu paths.
- Added menu translations for various languages.
- Added message translations for various languages.
- removed "broken locale" (Marcin Dalecki).
- don't user color names in icons, use RGB values.  The names could be
  translated.
- Win32: Added global IME support (Muraoka)
- ":messages" prints a message about who maintains the messages or the
  translations.  Useful to find out where to make a remark about a wrong
  translation.
- --disable-nls argument for configure: Disable use of gettext(). (Sung-Hyun
  Nam)
- Added NLS support for Win32 with the MingW compiler. (Eduardo Fernandez)
- Made it possible to have vimtutor use different languages.  Spanish and
  Italian translations are included. (Eduardo Fernandez)
- When available, call bind_textdomain_codeset() to have gettext() translate
  messages to 'encoding'.  This requires GNU gettext 0.10.36.
- Added gettext support for Win32.  This means messages will be translated
  when the locale is set and libintl.dll can be found.  (Muraoka Taro)


Plugin support					*new-plugins*
--------------

To make it really easy to load a Vim script when starting Vim, the "plugin"
runtime directory can be used.  All "*.vim" files in it will be automatically
loaded.  For Unix, the directory "~/.vim/plugin" is used by default.  The
'runtimepath' option can be set to look in other directories for plugins.
|load-plugins| |add-plugin|

The |:runtime| command has been added to load one or more files in
'runtimepath'.

Standard plugins:
netrw.vim - Edit files over a network
gzip.vim - Edit compressed files
explorer.vim - Browse directories

Added support for local help files. |add-local-help|.
When searching for help tags, all "doc/tags" files in 'runtimepath' are used.
Added the ":helptags" command: Generate a tags file for a help directory.
The first line of each help file is automagically added to the "LOCAL
ADDITIONS" section in doc/help.txt.

<unique> argument to ":map": only add a mapping when it wasn't defined before.

When displaying an option value with 'verbose' set will give a message about
where the option was last set.  Very useful to find out which script did set
the value.

The new |:scriptnames| command displays a list of all scripts that have been
sourced.

GUI: For Athena, Motif and GTK look for a toolbar bitmap in the "bitmaps"
directories in 'runtimepath'.  Allows adding your own bitmaps.


Filetype plugins				*new-filetype-plugins*
-----------------

A new group of files has been added to do settings for specific file types.
These can be options and mappings which are specifically used for one value of
'filetype'.

The files are located in "$VIMRUNTIME/ftplugin".  The 'runtimepath' option
makes it possible to use several sets of plugins: Your own, system-wide,
included in the Vim distribution, etc.

To be able to make this work, several features were added:
- Added the "s:" variables, local to a script.  Avoids name conflicts with
  global variables.  They can be used in the script and in functions,
  autocommands and user commands defined in the script.  They are kept between
  invocations of the same script.  |s:var|
- Added the global value for local options.  This value is used when opening
  a new buffer or editing another file.  The option value specified in a
  modeline or filetype setting is not carried over to another buffer.
  ":set" sets both the local and the global value.
  ":setlocal" sets the local option value only.
  ":setglobal" displays the global value for a local option.  Setting only
  the global value isn't implemented yet.
- Added the buffer-local value for some global options: 'equalprg', 'makeprg',
  'grepprg', 'path', 'dictionary', 'thesaurus', 'tags' and 'define'.  This
  allows setting a local value for these global options, without making it
  incompatible.
- Added mappings and abbreviations local to a buffer: ":map <buffer>".
- In a mapping "<Leader>" can be used to get the value of the "mapleader"
  variable.  This simplifies mappings that use "mapleader".  "<Leader>"
  defaults to "\".  "<LocalLeader>" does the same with "maplocalleader".  This
  is to be used for mappings local to a buffer.
- Added <SID> Script ID to define functions and mappings local to a script.
- Added <script> argument to ":noremap" and ":noremenu": Only remap
  script-local mappings.  Avoids that mappings from other scripts get in the
  way, but does allow using mappings defined in the script.
- User commands can be local to a buffer: ":command -buffer".

The new ":setfiletype" command is used in the filetype detection autocommands,
to avoid that 'filetype' is set twice.


Window for command-line editing				*new-cmdwin*
-------------------------------

The Command-line window can be used to edit a command-line with Normal and
Insert mode commands.  When it is opened it contains the history.  This allows
copying parts of previous command lines. |cmdwin|

The command-line window can be opened from the command-line with the key
specified by the 'cedit' option (like Nvi).  It can also be opened directly
from Normal mode with "q:", "q/" and "q?".

The 'cmdwinheight' is used to specify the initional height of the window.

In Insert mode CTRL-X CTRL-V can be used to complete an Ex command line, like
it's done on the command-line.  This is also useful for writing Vim scripts!



Debugging mode						*new-debug-mode*
--------------

In debugging mode sourced scripts and user functions can be executed line by
line.  There are commands to step over a command or step into it. |debug-mode|

Breakpoints can be set to run until a certain line in a script or user
function is executed. |:breakadd|

Debugging can be started with ":debug {cmd}" to debug what happens when a
command executes.  The |-D| argument can be used to debug while starting up.


Cursor in virtual position				*new-virtedit*
--------------------------

'virtualedit' option: Allow positioning the cursor where there is no actual
character in Insert mode, Visual mode or allways. (Matthias Kramm)
This is especially useful in Visual-block mode.  It allows positioning a
corner of the area where there is no text character.


Debugger interface					*new-debug-itf*
------------------

This was originally made to work with Sun Visual Workshop. (Gordon Prieur)
- ":glyph", ":unglyph", ":glyphdef" and ":glyphs" commands: Add a small image
  in front of a line.
- ":sense" set menu sensitive on/off
- ":wsverb"
- Documentation: |debugger.txt|, |sign.txt|, |workshop.txt|
- Balloon stuff: 'balloondelay' and 'ballooneval' options.


Buffer types						*new-buftype*
------------

The 'buftype' and 'bufhidden' options have been added.  They can be set to
have different kinds of buffers.  For example:
- 'buftype' = "quickfix": buffer with error list
- 'buftype' = "nofile" and 'bufhidden' = "delete": scratch buffer that will be
  deleted as soon as there is no window displaying it.

'bufhidden' can be used to overrule the 'hidden' option for one buffer.


Ports							*ports-6*
-----

Port to OS/390 Unix (Ralf Schandl)
- A lot of changes to handle EBCDIC encoding.
- Changed Ctrl('x') to Ctrl_x define.

Included jsbmouse support. (Darren Garth)
Support for dec mouse in Unix. (Steve Wall)

Port to 16-bit MS Windows (Windows 3.1x) (Vince Negri)

Port to QNX.  Supports the Photon GUI, mouse, etc. (Julian Kinraid)

Allow cross-compiling the Win32 version with Make_ming.mak. (Ron Aaron)
Added Python support for compiling with Mingw. (Ron Aaron)

Win32: Dynamically load Perl and Python.  Allows compiling Vim with these
interfaces and will try to find the DLLs at runtime. (Muraoka Taro)

Compiling the Win32 GUI with Cygwin.  Also compile vimrun, dosinst and
uninstall.  (gerfried)

Mac: Make Vim compile with the free MPW compiler supplied by Apple.  And
updates for CodeWarrior. (Axel Kielhorn)


Quickfix extended					*quickfix-6*
-----------------

- ":cwindow": open window to show list of quickfix errors.  Can be used to
  scroll through the errors, and quickly jump to each of them.
- Quickfix also knows "info", next to "warning" and "error" types. "%I" can be
  used for the start of a multi-line informational message. (Tony Leneis)
- The "%p" argument can be used in 'errorformat' to get the column number from
  a line where "^" points to the column. (Stefan Roemer)
- When using "%f" in 'errorformat' on a DOS/Windows system, also include "c:"
  in the filename, even when using "%f:".


Operator modifiers					*new-operator-mod*
------------------

Insert "v", "V" or CTRL-V between an operator and a motion command to force
the operator to work characterwise, linewise or blockwise. |o_v|


Search Path						*new-search-path*
-----------

- Support upward search for 'path', 'cdpath' and 'tags' options.  Also use
  "**" for 'tags' option. (Ralf Schandl)
- Added 'includeexpr', can be used to modify file name found by 'include'
  option.
- Also use 'includeexpr' for "gf" and "<cfile>" when the file can't be found
  without modification.  Useful for doing "gf" on the name after an include or
  import statement.
- 'cdpath' option: Locations to find a ":cd" argument. (Raf)
- Added 'suffixesadd', suffixes to be added to a file name when searching for
  a file for the "gf", "[I", etc. commands.


Editing files over a network				*new-network-files*
----------------------------

Files starting with scp://, rcp://, ftp:// and http:// are recognized as
remote files.  An attempt is made to access these files with the indicated
method.  For http:// only reading is possible, for the others writing is also
supported.  Uses the netrw.vim script as a standard "plugin". |netrw|

Made "gf" work on a URL.  It no longer assumes the file is local on the
computer (mostly didn't work anyway, because the full path was required).
Adjusted test2 for this.

Allow using a URL in 'path'.  Makes ":find index.html" work.


Writing files						*new-file-writing*
-------------

Added the 'backupcopy' option: Select whether a file is copied or renamed to
make a backup file.  Useful on Unix to speed up writing an ordinary file.
Useful on other systems to preserve file attributes and when editing a file on
a Unix filesystem.

Added the 'autowriteall' option.  Works like 'autowrite' but for more
commands.

Added the 'backupskip' option: A list of file patterns to skip making a backup
file when it matches.  The default is "/tmp/*", this makes "crontab -e" work.

Added support for Access Control Lists (ACL) for FreeBSD and Win32.  The ACL
is copied from the original file to the new file (or the backup if it's
copied).


Argument list						*new-argument-list*
-------------

The support for the argument list has been extended.  It can now be
manipulated to contain the files you want it to contain.

The argument list can now be local to a window.  It is created with the
|:arglocal| command.  The |:argglobal| command can be used to go back to the
global argument list.

The |:argdo| command executes a command on all files in the argument list.

File names can be added to the argument list with |:argadd|.  File names can
be removed with |:argdelete|.

"##" can be used like "#", it is replaced by all the names in the argument
list concatenated.  Useful for ":grep foo ##".

The |:argedit| adds a file to the argument list and edits it.  Like ":argadd"
and then ":edit".


Restore a View						*new-View*
--------------

The ":mkview" command writes a Vim script with the settings and mappings for
one window.  When the created file is sourced, the view of the window is
restored.  It's like ":mksession" for one window.
The View also contains the local argument list and manually created, opened
and closed folds.

Added the ":loadview" command and the 'viewdir' option: Allows for saving and
restoring views of a file with simple commands. ":mkview 1" saves view 1 for
the current file, ":loadview 1" loads it again.  Also allows quickly switching
between two views on one file.  And saving and restoring manual folds and the
folding state.

Added 'viewoptions' to specify how ":mkview" works.

":mksession" now also works fine with vertical splits.  It has been further
improved and restores the view of each window.  It also works properly with
preview and quickfix windows.

'sessionoptions' is used for ":mkview" as well.
Added "curdir" and "sesdir" to 'sessionoptions'.  Allows selection of what
the current directory will be restored to.

The session file now also contains the argument list(s).


Various new items					*new-items-6*
-----------------

Interface to Ruby. (Shugo Maeda)
Support dynamic loading of the Ruby interface on MS-Windows. (Muraoka Taro)
Support this for Mingw too. (Benoit Cerrina)

Normal mode commands: ~

"gi"		Jump to the ^ mark and start Insert mode.  Also works when the
		mark is just after the line. |gi|

"g'm" and "g`m"
		Jump to a mark without changing the jumplist.  Now you can use
		g`" to jump to the last known position in a file without side
		effects.  Also useful in mappings.

Options: ~

'autoread'	When detected that a file changed outside of Vim,
		automatically read a buffer again when it's not changed.
'debug'		When set to "msg" it will print error messages that would
		otherwise be omitted.  Useful for debugging 'indentexpr' and
		'foldexpr'.
'fold...'	Many new options for folding.
'modifiable'	When off, it is impossible to make changes to a buffer.
		The %m and %M items in 'statusline' show a '-'.

'previewwindow' Set in the preview window.  Used in a session file to mark a
		window as the preview window.
'buflisted'	Makes a buffer appear in the buffer list or not.

Use "vim{version}:" for modelines, only to be executed when the version is
>= {version}.  Also "vim>{version}", "vim<{version}" and "vim={version}".


Ex commands: ~

:sav[eas][!] {file}
		Works like ":w file" and ":e #", but without loading the file
		again and avoiding other side effects. |:saveas|

:silent[!] {cmd}
		Execute a command silently.  Also don't use a delay that would
		come after the message.  And don't do 'showmatch'.
		RISCOS: Removed that "!~cmd" didn't output anything, and
		didn't wait for <Enter> afterwards.  Can use ":silent !cmd"
		now.

:verbose {cmd}  Set 'verbose' for one command.

:echomsg {expr}
:echoerr {expr} Like ":echo" but store the message in the history. (Mark
		Waggoner)

:grepadd	Works just like ":grep" but adds to the current error list
		instead of defining a new list. |:grepadd|

:finish		Finish sourcing a file.  Can be used to skip the rest of a Vim
		script. |:finish|

:first, :bfirst, :ptfirst, etc.
		Alias for ":rewind".  It's more logical compared to ":last".

:enew		Edit a new, unnamed buffer.  This is needed, because ":edit"
		re-edits the same file. (Wall)

:quitall	Same as ":qall".

:match		Define match highlighting local to a window.  Allows
		highlighting an item in the current window without interfering
		with syntax highlighting.

:menu enable
:menu disable	Commands to enable/disable menu entries without removing them.
		(Monish Shah)

:windo		Execute a command in all windows.
:bufdo		Execute a command in all buffers.

:wincmd		Window (CTRL-W) command.  Useful when a Normal mode command
		can't be used (e.g., for a CursorHold autocommand).  See
		|CursorHold-example| for a nice application with it.

:lcd and :lchdir
		Set local directory for a window. (Benjie Chen)

:hide {command}
		Execute {command} with 'hidden' set.

:emenu		in Visual mode to execute a ":vmenu" entry.

:popup		pop up a popup menu.

[', [`, ]' and ]`
		move the cursor to the next/previous lowercase mark.

g_		Go to last non-blank in line. (Steve Wall)

New marks: ~

'( and ')	Begin or end of current sentence.  Useful in Ex commands.
'{ and '}	Begin or end of current paragraph.  Useful in Ex commands.
'.		Position of the last change in the current buffer.
'^		Position where Insert mode was stopped.

Store the ^ and . marks in the viminfo file.  Makes it possible to jump to the
last insert position or changed text.


New functions: ~
buflisted()	Checks if the buffer exists and has 'buflisted' set.
eventhandler()	Returns 1 when inside an event handler and interactive
		commands can't be used.
executable()	Checks if a program or batch script can be executed.
filewritable()	Checks if a file can be written. (Ron Aaron)
foldclosed()	Find out if there is a closed fold. (Johannes Zellner).
foldcloseend()	Find the end of a closed fold.
foldlevel()	Find out the foldlevel. (Johannes Zellner)
getchar()	Get one character from the user.  Can be used to define a
		mapping that takes an argument.
getcharmod()	Get last used key modifier.
getbufvar()	gets the value of an option or local variable in a buffer (Ron
		Aaron)
getfsize()	Return the size of a file.
getwinvar()	gets the value of an option or local variable in a window (Ron
		Aaron)
globpath()	Find matching files in a list of directories.
hasmapto()	Detect if a mapping to a string is already present.
iconv()		Convert a string from one encoding to another.
indent()	gets the indent of a line (Ron Aaron)
inputsecret()	Ask the user to type a string without showing the typed keys.
		(Charles Campbell)
libcall()	for Unix (Neil Bird, Johannes Zellner, Stephen Wall)
libcallnr()	for Win32 and Unix
mode()		Return a string that indicates the current mode.
nextnonblank()	Skip blank lines forwards.
prevnonblank()	Skip blank lines backwards.  Useful to for indent scripts.
search()	Search for a pattern.
searchpair()	Search for matching pair.  Can be used in indent files to find
		the "if" matching an endif.
setbufvar()	sets an option or variable local to a buffer (Ron Aaron)
setwinvar()	sets an option or variable local to a window (Ron Aaron)
stridx()	Search for first occurrence of one string in another.
strridx()	Search for last occurrence of one string in another.
tolower()	Convert string to all-lower case.
toupper()	Convert string to all-upper case.
type()		Check the type of an expression.
winwidth()	Width of a window. (Johannes Zellner)

Added expansion of curly braces in variable and function names.  This can be
used for variable names that include the value of the an option.  Or a
primitive form of arrays. (Vince Negri)


New autocommand events: ~
BufWinEnter	Triggered when a buffer is displayed in a window, after using
		the modelines.  Can be used to load a view.
BufWinLeave	Triggered when a buffer is no longer in a window.  Also
		triggered when exiting Vim.  Can be used to save views.
FileChangedRO	Triggered before making the first change to a read-only file.
		Can be used to check-out the file. (Scott Graham)
TermResponse	Triggered when the terminal replies to the version-request.
		The v:termresponse internal variable holds the result.  Can be
		used to react to the version of the terminal.  (Ronald Schild)
FileReadCmd	Triggered before reading a file.
BufReadCmd	Triggered before reading a file into a buffer.
FileWriteCmd	Triggered before writing a file.
BufWriteCmd	Triggered before writing a buffer into a file.
FileAppendCmd	Triggered before appending to a file.
FuncUndefined	Triggered when a user function is not defined. (Ron Aaron)

The autocommands for the *Cmd events read or write the file instead of normal
file read/write.  Use this in netrw.vim to be able to edit files on a remote
system. (Charles Campbell)


New Syntax files: ~
Debian Control file and Debian Changelog syntax files. (Wichert Akkerman)
catalog.vim (Johannes Zellner)
DSSSL syntax (Johannes Zellner)


The ":command" command now accepts a "-bar" argument.  This allows the user
command to be followed by "| command".

The preview window is now also used by these commands:
|:pedit| edits the specified file in the preview window
|:psearch| searches for a word in included files, like |:ijump|, and
displays the found text in the preview window.
Added the CTRL-W P command: go to preview window.

MS-DOS and MS-Windows also read the system-wide vimrc file $VIM/vimrc.  Mostly
for NT systems with multiple users.

A double-click of the mouse on a character that has a "%" match selects from
that character to the match.  Similar to "v%".

"-S session.vim" argument: Source a script file when starting up.  Convenient
way to start Vim with a session file.

Added runtime/delmenu.vim.  Source this to remove all menus and prepare for
loading new menus.  Useful when changing 'langmenu'.

Perl script to filter Perl error messages to quickfix usable format. (Joerg
Ziefle)

==============================================================================
IMPROVEMENTS						*improvements-6*

'n' flag for 'cpoptions': When omitted text of wrapped lines is not put
between line numbers from 'number' option.

When there is a format error in a tags file, the byte position is reported so
that the error can be located.

Allow a tags file to have CR, CR-LF or LF line separator.  Useful on the
Macintosh.

"gf" works in Visual mode: Use the selected text as the file name. (Chase
Tingley)

Allow ambiguous mappings.  Thus "aa" and "aaa" can both be mapped, the longest
matching one is used.  Especially useful for ":lmap" and 'keymap'.

Encryption: Ask the key to be typed twice when crypting the first time.
Otherwise a typo might cause the text to be lost forever. (Chase Tingley)

The DOS/Windows install program has been enhanced.  The Vim executable is
never moved or $PATH changed.  A small batch file is created in a directory in
$PATH.  Less choices to be made.

The window title now has "VIM" on the end.  The file name comes first, useful
in the taskbar.  A "+" is added when the file is modified.  "=" is added for
a read-only file.  "-" is added for a file with 'modifiable' off.

In Visual mode, mention size of the selected area in 'showcmd'.

Added "b:changedtick" variable.  Incremented at each change, also for undo.
Can be used to take action only if the buffer has been changed.

In the replacement string of a ":s" command "\=" can be used to replace with
an expression.  The submatch() function can be used to access submatches.

When dragging the status line or the vertical separator, mouse codes are
skipped to avoid that the redrawing lags behind too much.

When doing ":qall" and there is a change in a buffer that is being edited in
another window, jump to that window, instead of editing that buffer in the
current window.

Added the "++enc=" and "++ff=" arguments to file read/write commands to force
using the given 'encoding' or 'fileformat'.  And the "v:cmdarg" variable, to
be used for FileReadCmd autocommands that read/write the file themselves.

When reading stdin, first read the text in binary mode and then re-read it
with automatic selection of 'fileformat' and 'fileencoding'.  This avoids
problems with not being able to rewind the file (e.g., when a line near the
end of the file ends in LF instead of CR-LF).

Insert mode:
- "CTRL-G j" and "CTRL-G k" can be used to insert in another line in the same
  column.  Useful for editing a table.
- Adde Thesaurus completion with CTRL-X CTRL-T. (Vince Negri)
- Added the 'thesaurus' option, to use instead of 'dictionary' for thesaurus
  completion.  Added 's' flag in 'complete'.
- Made CTRL-X CTRL-L in Insert mode use the 'complete' option.  It now also
  scans other loaded buffers for matching lines.

Performance:
- Made display updating more efficient.  Insert/delete lines may be used for
  all changes, also for undo/redo.
- Display is not redrawn when there is typeahead in Insert mode.  Speeds up
  CTRL-R a lot.
- Improved speed of screen output for 32 bit DOS version. (Vince Negri)
- When dragging with the mouse, there is a lookahead to skip mouse codes when
  there is another one next.  Makes dragging with the mouse a lot faster.
- Also a memory usage improvement: When calling u_save with a single line,
  don't save it if the line was recently saved for the same undo already.
- When using a script that appends one character at a time, the amount of
  allocated memory was growing steadily.  Also when 'undolevels' is -1.
  Caused by the line saved for "U" never to be freed.  Now free an undo block
  when it becomes empty.
- GUI: Use a vertical scroll region, to make scrolling in a vertically split
  window faster.  No need to redraw the whole window.
- When scrolling isn't possible with terminal codes (e.g., for a vertically
  split window) redraw from ScreenLines[].  That should be faster than going
  through the lines with win_line(), especially when using syntax
  highlighting.

Robustness:
- Unix: Check for running out of stack space when executing a regexp.  Avoids
  a nasty crash.  Only works when the system supports running the signal
  function on another stack.
- Unix: Added check for running out of stack space when matching a regexp.
  Now it aborts with an error message.  Needs to be checked on many different
  systems.
- Disallow ":source <dirname>".  On unix it's possible to read a directory.

Security:
- When reading from or writing to a temporary file, check that it isn't a
  symbolic link.  Gives some protection against symlink attacks.
- When creating a backup file copy or a swap file, check for it already
  existing to avoid a symlink attack. (Colin Phipps)
- Evaluating options which are an expression is done in a |sandbox|.  If the
  option was set by a modeline, it cannot cause damage.
- Use a secure way to generate temp file names: Create a private directory for
  temp files.  Used for Unix, MS-DOS and OS/2.
- 'makeef' can be empty, which means that an internally generated file name is
  used.  The old default was "/tmp/file", which is a security risk.
- The command from a tags file is executed in the sandbox for better security.

Reduced the amount of stack space used by regmatch() to allow it to handle
complicated patterns on a longer text.

Syntax highlighting:
- Optimized by caching the state stack all over the file, not just the part
  being displayed.  Required for folding.
- Added ":syntax sync fromstart": Always parse from the start of the file.
- Added "display" argument: use this item only when displaying the result.
  Can make parsing faster for text that isn't going to be displayed.
- When using CTRL-L, the cached states are deleted, to force parsing the text
  again.
- Use elfhash algorithm for table of keywords.  This should give a better
  distribution and speedup keyword lookup. (Campbell)
- Also allow the "lc" leading context for skip and end patterns. (Scott
  Bigham)
- Syntax items can have the "extend" argument to undo the effect of a
  "keepend" argument of an item it is contained in.  Makes it possible to have
  some contained items extend a region while others don't.
- ":syntax clear" now deletes the b:current_syntax variable.  That's logical,
  since no syntax is defined after this command.
- Added ":syntax enable": switch on syntax highlighting without changing the
  colors.  This allows specifying the colors in the .vimrc file without the
  need for a mysyntaxfile.
- Added ":syntax reset": reset the colors to their defaults.
- Added the "contains=TOP" and "contains=CONTAINED" arguments.  Makes it
  possible to define a transparent item that doesn't contain itself.
- Added a "containedin" argument to syntax items.  Allows adding a contained
  item to an existing item (e.g., to highlight a name in a comment).

Modeless selection:
- When in the command-line window, use modeless selection in the other
  windows.  Makes it possible to copy visible text to the command-line window.
- Support modeless selection on the cmdline in a terminal.  Previously it was
  only possible for the GUI.
- Make double-right-click in modeless selection select a whole word.  Single
  right click doesn't use the word selection started by a double-left-click.
  Makes it work like in Visual mode.

Win32 console version:
- Includes the user and system name in the ":version" message, when available.
  It generates a pathdef.c file for this.  (Jon Miner)
- Set the window icon to Vim's icon (only for Windows 2000).  While executing
  a shell command, modify the window title to show this.  When exiting,
  restore the cursor position too.  (Craig Barkhouse)

Win32: When 'shell' is "cmd" or "cmd.exe", set 'shellredir' to redirect stderr
too.  Also check for the Unix shell names.

Win32: When $HOMEDRIVE and $HOMEPATH are defined, use them to define $HOME.
(Craig Barkhouse)

'isfname' now includes '%' and '#'.  Makes "vim dir\#file" work for MS-DOS.

Added keypad special keys <kEnter>, <k0> - <k9>.  When not mapped they behave
like the ASCII equivalent. (Ivan Wellesz and Vince Negri)

Also trigger the BufUnload event when Vim is going to exit.  Perhaps some
cleaning up is required.

Expand expression in backticks: `={expr}`.  Can be used where backtick
expansion is done. (Vince Negri)

GUI:
- X11: When a color can't be allocated, use the nearest match from the
  colormap.  This avoids that black is used for many things. (Monish Shah)
  Also do this for the menu and scrollbar, to avoid that they become black.
- Win32 and X11: Added 'mouseshape' option: Adjust the mouse pointer shape to
  the current mode. (Vince Negri)
- 'linespace' option: Insert a pixel line between lines. (Nam)
- Allow modeless selection (without moving the cursor) by keeping CTRL and
  SHIFT pressed. (Ivan Wellesz)
- Motif: added toolbar. (Gordon Prieur)  Also added tooltips.
- Athena: added toolbar and tooltips. (David Harrison -- based on Gordon
  Prieur's work)
- Support menu separator lines for Athena.  (David Harrison)
- Win32: Added "c" flag to 'guifont' to be able to specify the charset. (Artem
  Khodush)
- When no --enable-xim argument is given, automatically enable it when a X GUI
  is used.  Required for dead key support (and multi-byte input).
- After a file selection dialog, check that the edited files were not changed
  or deleted.  The Win32 dialog allows deleting and renaming files.
- Motif and Athena: Added support for "editres". (Martin Dalecki)
- Motif and Athena: Added "menuFont" to be able to specify a font or fontset
  for the menus.  Useful when the locale is different from 'encoding'. (David
  Harrison)

X11:
- Support for the clipboard selection as register "+.  When exiting or
  suspending copy the selection to cut buffer 0.  Should allow copy/paste with
  more applications in a X11-standard way.  (Neil Bird)
- Use the X clipboard in any terminal, not just in an xterm.
  Added "exclude:" in 'clipboard': Specify a pattern to match against terminal
  names for which no connection should be made to the X server.  The default
  currently work for FreeBSD and Linux consoles.
- Added a few messages for when 'verbose' is non-zero to show what happens
  when trying to connect to the X server.  Should help when trying to find out
  why startup is slow.

GTK GUI: (partly by Marcin Dalecki)
-   With some fonts the characters can be taller than ascent + descent.  E.g.,
    "-misc-fixed-*-*-*-*-18-*-*-*-*-*-iso10646-1".  Add one to the character
    cell height?
-   Implement "no" value for 'winaltkeys': don't use Alt-Key as a menu
    shortcut, when 'wak' changed after creating the menus.
- recycle text GC's to reduce communication.
- Adjust icon size to window manager.
- Cleanup in font handling.
- Setting 'wak' after the GUI started works.
- replace XQueryColor with GDK calls.
- Gnome support.  Detects Gnome in configure and uses different widgets.
  Otherwise it's much like GTK. (Kahn)
- Removed the special code to fork first and then start the GUI.  Now use
  _exit() instead of exit() and works fine without other tricks.
- Dialogs sometimes appeared a bit far away.  Position the dialogs inside
  the gvim window. (Brent Verner)

Command line completion:
Complete environment variable names. (Mike Steed)
For ":command", added a few completion methods: "mapping", "function",
"expression" and "environment".

For MS-DOS, MS-Windows and OS/2: Expand %VAR% environment variables like $VAR.
(Walter Briscoe)

Added "improved Ex mode".  Entered when Vim is started as "exim" or "vim -E",
and with the "gQ" command.  Works like repeated use of ":", with full
command-line editing and completion. (Ulf Carlsson)

Redirect messages to the clipboard ":redir @*" and to the unnamed register
":redir @"". (Wall)

":let @/ = ''" clears the search pattern, instead of setting it to an empty
string.

In a ":highlight" listing, show "xxx" with the highlight color.

Expression evaluation:
"? :" can be used like in C.
col("$") returns the length of the cursor line plus one. (Stephen P. Wall)

Optional extra argument for match(), matchend() and matchstr(): Offset to
start looking for a match.
Made third argument to strpart() optional.  (Paul Moore, Zdenek Sekera)

Cscope: (kahn)
- cscope_connection() function.
- ":cscope kill -1" kills all cscope connections.
- Added the 'cscopepathcomp' option. (Scott Hauck)

exists() can also be used to check for Ex commands and defined autocommands.

Added extra argument to input(): Default text.

VMS:
- Command line arguments are always uppercase.  Interpret a "-X" argument as
  "-x" and "-/X" as "-X".
- Set 'makeprg' and 'grepprg' to meaningful defaults. (Zoltan Arpadffy)

Options:
- When using set += or ^= , check for strings used twice.  Duplicates are
  removed.  (Vince Negri)
- When setting an option that is a list of flags, remove duplicate flags.
- If possible, use getrlimit() to set 'maxmemtot' and 'maxmem'. (Pina)
- Added "alpha" to 'nrformats': increment or decrement an alphabetic character
  with CTRL-A and CTRL-X.
- ":set opt&vi" sets an option to its Vi default, ":set opt&vim" to its Vim
  default.  Useful to set 'cpo' to its Vim default without knowing what flags
  that includes.
- 'scrolloff' now also applies to a long, wrapped line that doesn't fit in the
  window.

Internal changes:
- Split line pointers in text part and attributes part.  Allows for future
  change to make attribute more than one byte.
- Provide a qsort() function for systems that don't have it.
- Changed the big switch for Normal mode commands into a table.  This cleans
  up the code considerably and avoids trouble for some optimizing compilers.
- Support for editing Unicode and UTF-8 files.
- Assigned a negative value to special keys, to avoid them being mixed up with
  Unicode characters.
- Global variables expand_context and expand_pattern were not supposed to be
  global.  Pass them to ExpandOne() and all functions called by it.
- No longer use the global reg_ic flag.  It caused trouble and in a few places
  it was not set.
- Removed the use of the stuff buffer for "*", "K", CTRL-], etc.  Avoids
  problem with autocommands.
- Moved some code from ex_docmd.c to ex_cmds2.c.  The file was getting too
  big.  Also moved some code from screen.c to move.c.
- Don't include the CRC table for encryption, generate it.  Saves quite a bit
  of space in the source code. (Matthias Kramm)
- Renamed multibyte.c to mbyte.c to avoid a problem with 8.3 filesystems.

Support for xterm with 88 or 256 colors.  The right color numbers will be used
for the name used in a ":highlight" command. (Steve Wall)

Adjusted colortest.vim: Included colors on normal background and reduced the
size by using a while loop. (Rafael Garcia-Suarez)

When an xterm is in 8-bit mode this is detected by the code returned for
|t_RV|.  All key codes are automatically converted to their 8-bit versions.

The OPT_TCAP_QUERY in xterm patch level 141 and later is used to obtain the
actual key codes used and the number of colors for t_Co.  Only when |t_RV| is
also used.

":browse set" now also works in the console mode.  ":browse edit" will give an
error message.

":bdelete" and ":bunload" only report the number of deleted/unloaded buffers
when more than 'report'.  The message was annoying when deleting a buffer in a
script.

Jump list:
- The number of marks kept in the jumplist has been increased from 50 to 100.
- The jumplist is now stored in the viminfo file.  CTRL-O can be used to jump
  to positions from a previous edit session.
- When doing ":split" copy the jumplist to the new window.

Also set the '[ and '] marks for the "~" and "r" commands.  These marks are
now always set when making a change with a Normal mode command.

Python interface: Allow setting the width of a vertically split window. (John
Cook)

Added "=word" and "=~word" to 'cinkeys' (also used in 'indentkeys').

When doing Insert mode completion, when completion is finished check for a
match with words from 'cinkeys' or 'indentkeys'.

Added "j1" argument in 'cinoptions': indent {} inside () for Java. (Johannes
Zellner)

When doing ":wall" or ":wqall" and a modified buffer doesn't have a name,
mention its buffer number in the error message.

":function Name" lists the function with line numbers.  Makes it easier to
find out where an error happened.

In non-blockwise Visual mode, "r" replaces all selected characters with the
typed one, like in blockwise Visual mode.

"default" argument for ":highlight".  When included, the command is ignored if
highlighting for the group was already defined.
All syntax files now use ":hi default ..." to allow the user to specify colors
in his vimrc file.  Also, the "if did_xxx_syntax_inits" is not needed anymore.
This greatly simplifies using non-default colors for a specific language.

Also set "v:errmsg" when using ":silent! cmd".

Added the v:prevcount variable: v:count for the previous command.

When editing the last file in the argument list in any way, allow exiting.
Previously this was only possible when getting to that file with ":next" or
":last".

Added the '1' flag to 'formatoptions'. (Vit Stradal)
Added 'n' flag in 'formatoptions': format a numbered list.

In the verbose message about returning from a function, also show the return
value.

When a swap file already exists, and the user selects "Delete" at the
ATTENTION prompt, use the same ".swp" swapfile, to avoid creating a ".swo"
file which won't always be found.

The g CTRL-G command also works in Visual mode and counts the number of words.
(Chase Tingley)

Give an error message when using 'shell' and it's empty.

Added "uhex" value for 'display': show non-printable characters as <xx>.
Show unprintable characters with NonText highlighting, also in the command
line.

Added a number of Lisp names after which the indent isn't increased that much.

Added a default 'errorformat' value for VMS. (Jim Bush)

When asked to display the value of a hidden option, tell it's not supported.

GTK GUI: When dropping a file on Vim, remove extra slashes from the start of
the path.  Also shorten the file name if possible.

Let "%p" in 'errorformat' (column of error indicated by a row of characters)
also accept a line of dots.

The "p" command can now be used in Visual mode.  It overwrites the selected
text with the contents of a register.

Highlight the <> items in the intro message to make clear they are special.

When using the "c" flag for ":substitute", allow typing "l" for replacing this
item and then stop: "last".

When printing a verbose message about sourcing another file, print the line
number.

Added the "DarkYellow" color name.  Just to make the list of standard colors
consistent, it's not really a nice color to use.

When resizing the Vim window, don't use 'equalalways'.  Avoids that making the
Vim window smaller makes split windows bigger.  And it's what the docs say.

When typing CTRL-D in Insert mode, just after an autoindent, then hitting CR
kept the remaining white space.  Now made it work like BS: delete the
autoindent to avoid a blank non-empty line results.

Added a GetHwnd() call to the OLE interface.  (Vince Negri)

Made ":normal" work in an event handler.  Useful when dropping a file on Vim
and for CursorHold autocommands.

For the MS-Windows version, don't change to the directory of the file when a
slash is used instead of a backslash.  Explorer should always use a backslash,
the user can use a slash when typing the command.

When a buffer was changed outside of Vim and regaining focus, give a dialog to
allow the user to reload the file.  Now also for other GUIs than MS-Windows.
And also used in the console, when compiled with dialog support.

Mapping <M-A> when 'encoding' is "latin1" and then setting 'encoding' to
"utf-8" causes the first byte of a multi-byte to be mapped.  Can cause very
hard to find problems.  Disallow mapping part of a multi-byte character.

==============================================================================
COMPILE TIME CHANGES					*compile-changes-6*

All generated files have been moved out of the "src" directory.  This makes it
easy to see which files are not edited by hand.  The files generated by
configure are now in the "src/auto" directory.  For Unix, compiled object
files go in the objects directory.

The source archive was over the 1.4M floppy limit.  Now also provide bzip2
compressed versions of the sources and runtime archives.

Added "reconfig" as a target for make.  Useful when changing some of the
arguments that require flushing the cache, such as switching from GTK to
Motif.  Adjusted the meaning of GUI_INC_LOC and GUI_LIB_LOC to be consistent
over different GUIs.

Added src/README.txt to give an overview of the main parts of the source code.

Added the possibility for a maintainer of a binary version to include his
e-mail address with the --with-compiledby configure argument.

Included features are now grouped in "tiny", "small", "normal", "big" and
"huge".  This replaces "min-features" and "max-features".  Using "tiny"
disables multiple window for a really small Vim.

Added the +listcmds feature.  Can be used to compile without the Vim commands
that manipulate the buffer list and argument list (the buffer list itself is
still there, can't do without it).

Removed GTK+ support for versions older than 1.1.16.

The configure checks for using PTYs have been improved.  Code taken from a
recent version of screen.

Added configure options to install Vim, Ex and View under another name (e.g.,
vim6, ex6 and view6).

Made enabling the SNiFF+ interface possible with a Configure argument.

Configure now always checks /usr/local/lib for libraries and
/usr/local/include for include files.  Helps finding the stuff for iconv() and
gettext().

For the tiny version or when FEAT_WINDOWS is not defined: Firstwin and lastwin
are equal to curwin and don't use w_next and w_prev.

Moved the command line history stuff into the +cmdline_hist feature, to
exclude the command line history from the tiny version.

MS-Windows: Moved common functions from Win16 and Win32 to os_mswin.c.  Avoids
having to change two files for one problem.  (Vince Negri)

Moved common code from gui_w16.c and gui_w32.c to gui_w48.c (Vince Negri)

The jumplist is now a separate feature.  It is disabled for the "small"
version (16 bit MS-DOS).

Renamed all types ending in _t to end in _T.  Avoids potential problems with
system types.

Added a configure check for X11 header files that implicitly define the return
type to int. (Steve Wall)

==============================================================================
BUG FIXES						*bug-fixes-6*

When checking the command name for "gvim", "ex", etc. ignore case.  Required
for systems where case is ignored in command names.

Search pattern "[a-c-e]" also matched a 'd' and didn't match a '-'.

When double-clicking in another window, wasn't recognized as double click,
because topline is different.  Added set_mouse_topline().

The BROKEN_LOCALE check was broken.  (Marcin Dalecki)

When "t_Co" is set, the default colors remain the same, thus wrong.  Reset the
colors after changing "t_Co". (Steve Wall)

When exiting with ":wqall" the messages about writing files could overwrite
eachother and be lost forever.

When starting Vim with an extremely long file name (around 1024 characters) it
would crash.  Added a few checks to avoid buffer overflows.

CTRL-E could get stuck in a file with very long lines.

":au syntax<Tab>" expanded event names while it should expand groups starting
with "syntax".

When expanding a file name caused an error (e.g., for <amatch>) it was
produced even when inside an "if 0".

'cindent' formatted C comments differently from what the 'comments' option
specified. (Steve Wall)

Default for 'grepprg' didn't include the file name when only grepping in one
file.  Now /dev/null has been added for Unix.

Opening the option window twice caused trouble.  Now the cursor goes to the
existing option window.

":sview" and ":view" didn't set 'readonly' for an existing buffer.  Now do set
'readonly', unless the buffer is also edited in another window.

GTK GUI: When 'guioptions' excluded 'g', the more prompt caused the toolbar
and menubar to disappear and resize the window (which clears the text).
Now always grey-out the toplevel menus to avoid that the menubar changes size
or disappears.

When re-using the current buffer for a new buffer, buffer-local variables were
not deleted.

GUI: when 'scrolloff' is 0 dragging the mouse above the window didn't cause a
down scroll.  Now pass on a mouse event with mouse_row set to -1.

Win32: Console version didn't work on telnet, because of switching between two
console screens.  Now use one console screen and save/restore the contents
when needed.  (Craig Barkhouse)

When reading a file the magic number for encryption was included in the file
length. (Antonio Colombo)

The quickfix window contained leading whitespace and NULs for multi-line
messages. (David Harrison)

When using cscope, redundant tags were removed.  This caused a numbering
problem, because they were all listed.  Don't remove redundant cscope tags.
(David Bustos).

Cscope: Test for which matches are in the current buffer sometimes failed,
causing a jump to another match than selected. (David Bustos)

Win32: Buffer overflow when adding a charset name in a font.

'titlestring' and 'iconstring' were evaluating an expression in the current
context, which could be a user function, which is a problem for local
variables vs global variables.

Win32 GUI: Mapping <M-F> didn't work.  Now handle SHIFT and CTRL in
_OnSysChar().

Win32 GUI: (on no file), :vs<CR>:q<CR> left a trail of pixels down the middle.
Could also happen for the ruler.  screen_puts() didn't clear the right char in
ScreenLines[] for the bold trick.

Win32: ":%!sort|uniq" didn't work, because the input file name touches the
"|".  Insert a space before the "|".

OS/2: Expanding wildcards included non-existing files.  Caused ":runtime" to
fail, which caused syntax highlighting to fail.

Mac: Also accept tags files in DOS format. (Axel Kielhorn)

Pasting a register containing CTRL-R on the command line could cause an
endless loop that can't be interrupted.  Now it can be stopped with CTRL-C.

When 'verbose' is set, a message for file read/write could overwrite the
previous message.
When 'verbose' is set, the header from ":select" was put after the last
message.  Now start a new line.

The hit-enter prompt reacted to the response of the t_RV string, causing
messages at startup to disappear.

When t_Co was set to 1, colors were still used.  Now only use color when t_Co
> 1.

Listing functions with ":function" didn't quit when 'q' or ':' was typed at
the more prompt.

Use mkstemp() instead of mktemp() when it's available, avoids a warning for
linking on FreeBSD.

When doing Insert mode completion it's possible that b_sfname is NULL.  Don't
give it to printf() for the "Scanning" message.

":set runtimepath-=$VIMRUNTIME" didn't work, because expansion of wildcards
was done after trying to remove the string.  Now for ":set opt+=val" and ":set
opt-=val" the expansion of wildcards is done before adding or removing "val".

Using CTRL-V with the "r" command with a blockwise Visual selection inserted a
CTRL-V instead of getting a special character.

Unix: Changed the order of libraries: Put -lXdmcp after -lX11 and -lSM -lICE
after -lXdmcp.  Should fix link problem on HP-UX 10.20.

Don't remove the last "-lm" from the link line.  Vim may link but fail later
when the GUI starts.

When the shell returns with an error when trying to expand wildcards, do
include the pattern when the "EW_NOTFOUND" flag was set.
When expanding wildcards with the shell fails, give a clear error message
instead of just "1 returned".

Selecting a Visual block, with the start partly on a Tab, deleting it leaves
the cursor too far to the left.  Causes "s" to work in the wrong position.

Pound sign in normal.c caused trouble on some compilers.  Use 0xA3 instead.

Warning for changing a read-only file wasn't given when 'insertmode' was set.

Win32: When 'shellxquote' is set to a double quote (e.g., using csh), ":!start
notepad file" doesn't work.  Remove the double quotes added by 'shellxquote'
when using ":!start". (Pavol Juhas)

The "<f-args>" argument of ":command" didn't accept Tabs for white space.
Also, don't add an empty argument when there are trailing blanks.

":e test\\je" edited "test\je", but ":next test\\je" edited "testje".
Backslashes were removed one time too many for ":next".

VMS: "gf" didn't work properly.  Use vms_fixfilename() to translate the file
name. (Zoltan Arpadffy)

After ":hi Normal ctermbg=black ctermfg=white" and suspending Vim not all
characters are redrawn with the right background.

When doing "make test" without +eval or +windows feature, many tests failed.
Now have test1 generate a script to copy the correct output, so that a test
that doesn't work is skipped.

On FreeBSD the Perl interface added "-lc" to the link command and Python added
"-pthread".  These two don't work together, because the libc_r library should
be used.  Removed "-lc" from Perl, it should not be needed.
Also: Add "-pthread" to $LIBS, so that the checks for functions is done with
libc_r.  Sigaltstack() appears to be missing from libc_r.

The Syntax sub-menus were getting too long, reorganized them and added another
level for some langauges.

Visual block "r"eplace didn't work well when a Tab is partly included.
(Matthias Kramm)

When yanking a Visual block, where some lines end halfway the block, putting
the text somewhere else doesn't insert a block.  Padd with spaces for missing
characters.  Added "y_width" to struct yankreg. (Matthias Kramm)

If a substitute string has a multibyte character after a backslash only the
first byte of it was skipped. (Muraoka Taro)

Win32: Numeric keypad keys were missing from the builtin termcap entry.

When a file was read-only ":wa!" didn't force it to be written. (Vince Negri)

Amiga: A file name starting with a colon was considered absolute but it isn't.
Amiga: ":pwd" added a slash when in the root of a drive.

Don't let 'ttymouse' default to "dec" when compiled with dec mouse support.
It breaks the gpm mouse (Linux console).

The prototypes for the Perl interface didn't work for threaded Perl.  Added a
sed command to remove the prototypes from proto/if_perl.pro and added them
manually to if_perl.xs.

When ":w!" resets the 'readonly' option the title and status lines were not
updated.

":args" showed the current file when the argument list was empty.  Made this
work like Vi: display nothing.

"99:<C-U>echo v:count" echoed "99" in Normal mode, but 0 in Visual mode.
Don't set v:count when executing a stuffed command.

Amiga: Got a requester for "home:" because it's in the default runtime path.
Don't bring up a requester when searching for a file in 'path', sourcing the
.vimrc file or using ":runtime".

Win16 and Win32: Considered a file "\path\file" absolute.  Can cause the same
file to appear as two different buffers.

Win32: Renaming a file to an empty string crashed Vim.  Happened when using
explorer.vim and hitting ESC at the rename prompt.

Win32: strftime() crashed when called with a "-1" value for the time.

Win32 with Borland compiler: mch_FullName() didn't work, caused tag file not
to be found.

Cscope sometimes jumped to the wrong tag. (David Bustos)

OS/2: Could not find the tags file.  mch_expand_wildcards() added another
slash to a directory name.

When using ">>" the `] mark was not in the last column.

When Vim was compiled without menu support, filetype.vim was still trying to
source the menu.vim script. (Rafael Garcia-Suarez)

":ptag" added an item to the tag stack.

Win32 IME: "gr" didn't use IME mode.

In the "vim --help" message the term "options" was used for arguments.  That's
confusing, call them "arguments".

When there are two windows, and a BufUnload autocommand for closing window #1
closed window #2, Vim would crash.

When there is a preview window and only one other window, ":q" wouldn't exit.

In Insert mode, when cancelling a digraph with ESC, the '?' wasn't removed.

On Unix glob(".*") returned "." and "..", on Windows it didn't.  On Windows
glob("*") also returned files starting with a dot.  Made this work like Unix
on all systems.

Win32: Removed old code to open a console.  Vimrun is now used and works fine.

Compute the room needed by the intro message accurately, so that it also fits
on a 25 line console. (Craig Barkhouse)

":ptnext" was broken.  Now remember the last tag used in the preview window
separately from the tagstack.

Didn't check for "-display" being the last argument. (Wichert Akkerman)

GTK GUI: When starting "gvim" under some conditions there would be an X error.
Don't replace the error handler when creating the xterm clipboard. (Wichert
Akkerman)

Adding a space after a help tag caused the tag not to be found.  E.g., ":he
autoindent ".

Was trying to expand a URL into a full path name.  On Windows this resulted in
the current directory to be prepended to the URL.  Added vim_isAbsName() and
vim_FullName() to avoid that various machine specific functions do it
differently.

":n *.c" ":cd .." ":n" didn't use the original directory of the file.  Vi only
does it for the current file (looks like a bug).  Now remember the buffer used
for the entry in the argument list and use it's name (adjusted when doing
":cd"), unless it's deleted.

When inserting a special key as its name ("<F8>" as four characters) after
moving around in Insert mode, undo didn't work properly.

Motif GUI: When using the right mouse button, for some people gvim freezed for
a couple of seconds (Motif 1.2?).  This doesn't happen when there is no Popup
menu.  Solved by only creating a popup menu when 'mousemodel' is "popup" or
"popup_setpos". (David Harrison)

Motif: When adding many menu items, the "Help" menu disappeared but the
menubar didn't wrap.  Now manually set the menubar height.

When using <BS> in Insert mode to remove a line break, or using "J" to join
lines, the cursor could end up halfway a multi-byte character. (Muraoka Taro)

Removed defining SVR4 in configure.  It causes problems for some X header
files and doesn't appear to be used anywhere.

When 'wildignore' is used, 'ignorecase' for a tag match was not working.

Disabled the mouse code for OS/2.  It was not really used.

":mksession" always used the full path name for a buffer, also when the short
name could be used.
":mkvimrc" and ":mksession" didn't save 'wildchar' and 'pastetoggle' in such a
way that they would be restored.  Now use the key name if possible, this is
portable.

After recovering a file and abandoning it, an ":edit" command didn't give the
ATTENTION prompt again.  Would be useful to be able to delete the file in an
easy way.  Reset the BF_RECOVERED flag when unloading the buffer.

histdel() could match or ignore case, depending on what happened before it.
Now always match case.

When a window size was specified when splitting a window, it would still get
the size from 'winheight' or 'winwidth' if it's larger.

When using "append" or "insert" inside a function definition, a line starting
with "function" or "endfunction" caused confusion.  Now recognize the commands
and skip lines until a ".".

At the end of any function or sourced file need_wait_return could be reset,
causing messages to disappear when redrawing.

When in a while loop the line number for error messages stayed fixed.  Now the
line number is remembered in the while loop.

"cd c:/" didn't work on MS-DOS.  mch_isdir() removed a trailing slash.

MS-Windows: getftime() didn't work when a directory had a trailing slash or
backslash.  Didn't show the time in the explorer because of this.

When doing wildcard completion, a directory "a/" sorted after "a-b".  Now
recognize path separators when sorting files.

Non-Unix systems: When editing "c:/dir/../file" and "c:/file" they were
created as different buffers, although it's the same file.  Expand to a full
file name also when an absolute name contains "..".

"g&" didn't repeat the last substitute properly.

When 'clipboard' was set to "unnamed", a "Y" command would not write to "0.
Now make a copy of register 0 to the clipboard register.

When the search pattern matches in many ways, it could not always be
interrupted with a CTRL-C.  And CTRL-C would have to be hit once for every
line when 'hlsearch' is on.
When 'incsearch' is on and interrupting the search for a match, don't abandon
the command line.

When turning a directory name into a full path, e.g., with fnamemodify(),
sometimes a slash was added.  Make this consistent: Don't add a slash.

When a file name contains a "!", using it in a shell command will cause
trouble: ":!cat %".  Escape the "!" to avoid that.  Escape it another time
when 'shell' contains "sh".

Completing a file name that has a tail that starts with a "~" didn't work:
":e view/~<Tab>".

Using a ":command" argument that contains < and > but not for a special
argument was not skipped properly.

The DOS install program: On Win2000 the check for a vim.exe or gvim.exe in
$PATH didn't work, it always found it in the current directory.
Rename the vim.exe in the current dir to avoid this. (Walter Briscoe)

In the MS-DOS/Windows install program, use %VIM% instead of an absolute path,
so that moving Vim requires only one change in the batch file.

Mac: mch_FullName() changed the "fname" argument and didn't always initialize
the buffer.

MS-DOS: mch_FullName() didn't fix forward/backward slashes in an absolute file
name.

"echo expand("%:p:h")" with an empty file name removed one directory name on
MS-DOS.  For Unix, when the file name is a directory, the directory name was
removed.  Now make it consistent: "%:p" adds a path separator for all systems,
but no path separator is added in other situations.

Unix: When checking for a CTRL-C (could happen any time) and there is an X
event (e.g., clipboard updated) and there is typeahead, Vim would hang until a
character was typed.

MS-DOS, MS-Windows and Amiga: expanding "$ENV/foo" when $ENV ends in a colon,
had the slash removed.

":he \^=" gave an error for using \_.  ":he ^=" didn't find tag :set^=.  Even
"he :set^=" didn't find it.

A tags file name "D:/tags" was used as file "tags" in "D:".  That doesn't work
when the current path for D: isn't the root of the drive.

Removed calls to XtInitializeWidgetClass(), they shouldn't be necessary.

When using a dtterm or various other color terminals, and the Normal group has
been set to use a different background color, the background wouldn't always
be displayed with that color.  Added check for "ut" termcap entry: If it's
missing, clearing the screen won't give us the current background color.  Need
to draw each character instead.  Vim now also works when the "cl" (clear
screen) termcap entry is missing.

When repeating a "/" search command with a line offset, the "n" did use the
offset but didn't make the motion linewise.  Made "d/pat/+2" and "dn" do the
same.

Win32: Trying to use ":tearoff" for a menu that doesn't exist caused a crash.

OpenPTY() didn't work on Sequent.  Add a configure check for getpseudotty().

C-indenting: Indented a line starting with ")" with the matching "(", but not
a line starting with "x)" looks strange.  Also compute the indent for aligning
with items inside the () and use the lowest indent.

MS-DOS and Windows: ":n *.vim" also matched files ending in "~".
Moved mch_expandpath() from os_win16.c and os_msdos.c to misc1.c, they are
equal.

Mac: In Vi-compatible mode didn't read files with CR line separators. (Dany
St-Amant)

Multibyte GDK XIM: While composing a multibyte-word, if user presses a
mouse button, then the word is removed.  It should remain and composing end.
(Sung-Hyun Nam)

MS-DOS, MS-Windows and OS/2: When reading from stdin, automatic CR-LF
conversion by the C library got in the way of detecting a "dos" 'fileformat'.

When 'smartcase' is set, patterns with "\S" would also make 'ignorecase'
reset.

When clicking the mouse in a column larger than 222, it moved to the first
column.  Can't encode a larger number in a character.  Now limit the number to
222, don't jump back to the first column.

GUI: In some versions CSI would cause trouble, either when typed directly or
when part of a multi-byte sequence.

When using multibyte characters in a ":normal" command, a trailing byte that
is CSI or K_SPECIAL caused problems.

Wildmenu didn't handle multi-byte characters.

":sleep 10" could not be interrupted on Windows, while "gs" could.  Made them
both work the same.

Unix: When waiting for a character is interrupted by an X-windows event (e.g.,
to obtain the contents of the selection), the wait time would not be honored.
A message could be overwritten quickly.  Now compute the remaining waiting
time.

Windows: Completing "\\share\c$\S" inserted a backslash before the $ and then
the name is invalid.  Don't insert the backslash.

When doing an auto-write before ":make", IObuff was overwritten and the wrong
text displayed later.

On the Mac the directories "c:/tmp" and "c:/temp" were used in the defaults
for 'backupdir' and 'directory, they don't exist.

The check for a new file not to be on an MS-DOS filesystem created the file
temporarily, which can be slow.  Don't do this if there is another check for
the swap file being on an MS-DOS filesystem.

Don't give the "Changing a readonly file" warning when reading from stdin.

When using the "Save As" menu entry and not entering a file name, would get an
error message for the trailing ":edit #".  Now only do that when the
alternate file name was changed.

When Vim owns the X11 selection and is being suspended, an application that
tries to use the selection hangs.  When Vim continues it could no longer
obtain the selection.  Now give up the selection when suspending.

option.h and globals.h were included in some files, while they were already
included in vim.h.  Moved the definition of EXTERN to vim.h to avoid doing it
twice.

When repeating an operator that used a search pattern and the search pattern
contained characters that have a special meaning on the cmdline (e.g., CTRL-U)
it didn't work.

Fixed various problems with using K_SPECIAL (0x80) and CSI (0x9b) as a byte in
a (multibyte) character.  For example, the "r" command could not be repeated.

The DOS/Windows install program didn't always work from a directory with a
long filename, because $VIM and the executable name would not have the same
path.

Multi-byte:
- Using an any-but character range [^x] in a regexp didn't work for UTF-8.
  (Muraoka Taro)
- When backspacing over inserted characters in Replace mode multi-byte
  characters were not handled correctly. (Muraoka Taro)
- Search commands "#" and "*" didn't work with multibyte characters. (Muraoka
  Taro)
- Word completion in Insert mode didn't work with multibyte characters.
  (Muraoka Taro)
- Athena/Motif GUI: when 'linespace' is non-zero the cursor would be drawn too
  wide (number of bytes instead of cell width).
- When changing 'encoding' to "euc-jp" and inserting a character Vim would
  crash.
- For euc-jp characters positioning the cursor would sometimes be wrong.
  Also, with two characters with 0x8e leading byte only the first one would be
  displayed.
- When using DYNAMIC_ICONV on Win32 conversion might fail because of using the
  wrong error number. (Muraoka Taro)
- Using Alt-x in the GUI while 'encoding' was set to "utf-8" didn't produce
  the right character.
- When using Visual block selection and only the left halve of a double-wide
  character is selected, the highlighting continued to the end of the line.
- Visual-block delete didn't work properly when deleting the right halve of a
  double-wide character.
- Overstrike mode for the cmdline replaced only the first byte of a multibyte
  character.
- The cursor in Replace mode (also in the cmdline) was to small on a
  double-wide character.
- When a multibyte character contained a 0x80 byte, it didn't work (was using
  a CSI byte instead). (Muraoka Taro)
- Wordwise selection with the mouse didn't work.
- Yanking a modeless selection of multi-byte characters didn't work.
- When 'selection' is "exclusive", selecting a word that ends in a multi-byte
  character used wrong highlighting for the following character.

Win32 with Make_mvc.mak: Didn't compile for debugging. (Craig Barkhouse)

Win32 GUI: When "vimrun.exe" is used to execute an external command, don't
give a message box with the return value, it was already printed by vimrun.
Also avoid printing the return value of the shell when ":silent!" is used.

Win32: selecting a lot of text and using the "find/replace" dialog caused a
crash.

X11 GUI: When typing a character with the 8th bit set and the Meta/Alt
modifier, the modifier was removed without changing the character.

Truncating a message to make it fit on the command line, using "..." for the
middle, didn't always compute the space correctly.

Could not imap <C-@>.  Now it works like <Nul>.

VMS: Fixed a few things for VAXC.  os_vms_fix.com had some strange CTRL-M
characters. (Zoltan Arpadffy and John W. Hamill)

The gzip plugin used a ":normal" command, this doesn't work when dropping a
compressed file on Vim.

In very rare situations a binary search for a tag would fail, because an
uninitialzed value happens to be half the size of the tag file. (Narendran)

When using BufEnter and BufLeave autocommands to enable/disable a menu, it
wasn't updated right away.

When doing a replace with the "c"onfirm flag, the cursor was positioned after
the ruler, instead of after the question.  With a long replacement string the
screen could scroll up and cause a "more" prompt.  Now the message is
truncated to make it fit.

Motif: The autoconf check for the Xp library didn't work.

When 'verbose' is set to list lines of a sourced file, defining a function
would reset the counter used for the "more" prompt.

In the Win32 find/replace dialog, a '/' character caused problems.  Escape it
with a backslash.

VMS: added VMS-specific defaults for the 'isfname' and 'isprint' options.
(Zoltan Arpadffy)

Starting a shell with ":sh" was different from starting a shell for CTRL-Z
when suspending doesn't work.  They now work the same way.

Jumping to a file mark while in a changed buffer gave a "mark not set" error.

":execute histget("cmd")" causes an endless loop and crashed Vim.  Now catch
all commands that cause too much recursiveness.

Removed "Failed to open input method" error message, too many people got this
when they didn't want to use a XIM.

GUI: When compiled without the +windows feature, the scrollbar would start
below line one.

Removed the trick with redefining character class functions from regexp.c.

Win32 GUI: Find dialog gives focus back to main window, when typing a
character mouse pointer is blanked, it didn't reappear when moving it in the
dialog window. (Vince Negri)

When recording and typing a CTRL-C, no character was recorded.  When in Insert
mode or cancelling half a command, playing back the recorded sequence wouldn't
work.  Now record the CTRL-C.

When the GUI was started, mouse codes for DEC and netterm were still checked
for.

GUI: When scrolling and 'writedelay' is non-zero, the character under the
cursor was displayed in the wrong position (one line above/below with
CTRL-E/CTRL-Y).

A ":normal" command would reset the 'scrollbind' info.  Causes problems when
using a ":normal" command in an autocommand for opening a file.

Windows GUI: a point size with a dot, like "7.5", wasn't recognized. (Muraoka
Taro)

When 'scrollbind' wasn't set would still remember the current position,
wasting time.

GTK: Crash when 'shell' doesn't exist and doing":!ls".  Use _exit() instead of
exit() when the child couldn't execute the shell.

Multi-byte:
- GUI with double-byte encoding: a mouse click in left halve of double-wide
  character put the cursor in previous char.
- Using double-byte encoding and 'selection' is "exclusive": "vey" and "^Vey"
  included the character after the word.
- When using a double-byte encoding and there is a lead byte at the end of the
  line, the preceding line would be displayed.  "ga" also showed wrong info.

GUI: The cursor was sometimes not removed when scrolling.  Changed the policy
from redrawing the cursor after each call to gui_write() to only update it at
the end of update_screen() or when setting the cursor position.  Also only
update the scrollbars at the end of update_screen(), that's the only place
where the window text may have been scrolled.

Formatting "/*<Tab>long text", produced "* <Tab>" in the next line.  Now
remove the space before the Tab.
Formatting "/*<Tab>  long text", produced "* <Tab> long text" in the next
line.  Now keep the space after the Tab.

In some places non-ASCII alphabetical characters were accepted, which could
cause problems.  For example, ":X" (X being such a character).

When a pattern matches the end of the line, the last character in the line was
highlighted for 'hlsearch'.  That looks wrong for "/\%3c".  Now highlight the
character just after the line.

Motif: If a dialog was closed by clicking on the "X" of the window frame Vim
would no longer respond.

When using CTRL-X or CTRL-A on a number with many leading zeros, Vim would
crash. (Matsumoto)

When 'insertmode' is set, the mapping in mswin.vim for CTRL-V didn't work in
Select mode.  Insert mode wasn't restarted after overwriting the text.
Now allow nesting Insert mode with insert and change commands.  CTRL-O
cwfoo<Esc> now also works.

Clicking with the right mouse button in another window started Visual mode,
but used the start position of the current window.  Caused ml_get errors when
the line number was invalid.  Now stay in the same window.

When 'selection' is "exclusive", "gv" sometimes selected one character less.

When 'comments' contains more than one start/middle/end triplet, the optional
flags could be mixed up.  Also didn't align the end with the middle part.

Double-right-click in Visual mode didn't update the shown mode.

When the Normal group has a font name, it was never used when starting up.
Now use it when 'guifont' and 'guifontset' are empty.
Setting a font name to a highlight group before the GUI was started didn't
work.

"make test" didn't use the name of the generated Vim executable.

'cindent' problem: Aligned with an "else" inside a do-while loop for a line
below that loop. (Meikel Brandmeyer)

Win32 GUI: mouseshape didn't return to normal after a ":set" command.
It stayed at "no entry".  Was only visible with ":set nomousehide".

When 'list' is set, 'hlsearch' didn't highlight a match at the end of the
line.  Now highlight the '$'.

 vim:tw=78:
