Subject: Vim 6.0u alpha available
From: Bram Moolenaar <[email-masked]>
To: [email-masked]
Date: Sun, 04 Feb 2001 21:06:01 +0100

Quite a few changes again.  All the items for Folding have now been implemented.
This is a good time to try it out and report any problems you encounter.

Major changes
-------------

Renamed "secret buffer" to "unlisted buffer".  Hopefully that's easier to
understand: this buffer doesn't show up in the buffer list.
Renamed the "BufSecret" event to "BufNew": New buffer.
Added the "BufAdd" event as an alias for "BufCreate": A buffer is added to the
buffer list.
Renamed 'bufsecret' to 'buflisted' and inverted its meaning.
Changed the 'S' flag in 'complete' to 'U' (Unlisted).
":ls!" shows "u" (unlisted) instead of "s" (secret).

Lots of Folding items:
- "zo" and "zc" accept a count: number of folds to open or close.
- "zv" command: Open closed folds to view cursor line.
- "zX" command: Undo manually opened/closed folds, re-apply 'foldlevel'.
- "zx" command: like "zX" and then "zv".  Nice way to focus on the text around
  the cursor.
- Added 'foldopen' option: Specifies when folds at the cursor will be opened.
  Many commands that jump around now open a fold by default.
- Added 'foldclose' option: Apply 'foldlevel' to folds that don't contain the
  cursor.
- In Insert mode, the whole fold the cursor is in is opened, instead of just
  the cursor line.
- When making a change which causes a new fold to be created, it is mostly
  created opened.  Avoids that a closed fold suddenly appears when changing
  text.
- "zd" now deletes only one level of folds.
- "zD" now deletes folds recursively.
- "zE" erases all folds.
- Also show line 'number' for a closed fold.
- Made all operations that end or start in a closed fold include the whole
  fold.  Thus "dw" or "x" deletes the whole fold.  ":s/pat/sub/" on a closed
  folds substitutes in the whole fold.  The range of many Ex commands is
  adjusted to include a fold as a whole.
- Evaluate 'foldtext' in the window for which the line is displayed.
- Added movement commands to the start/end of the current fold: "[z" and "]z".
- Added movement commands to the start/end of the next open fold: "zj" and
  "zk".
- Allow one-line manual folds.
- Added 'foldminlines': Only close folds that hae more than this number of
  window lines.
- Added 'foldlevelstart': specifies initial 'foldlevel' when entering a
  buffer.
- When 'foldmethod' is "marker", "zf" and "zF" add markers and "zd", "zD" and
  "zE" delete markers.
- Added 'commentstring' option: Used when 'foldmethod' is "marker" to put the
  marker in a comment.
- Using two fold markers in one line now often works.
- Added ":foldclose": close folds in a range of lines.
- Added ":folddoopen" and ":folddoclosed": Apply a command on all lines not in
  a closed fold or all lines in closed folds.

Other changes
-------------

":mkview" no longer stores global values of local options.  It's not what a
user expects.

":syn clear" now deletes the b:current_syntax variable.  That's logical, since
no syntax is defined after this command.

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

Changed searchpair() to return:
	> 0 when there is a match (returns the line number of the match)
	0   when there is no match
	-1  when there is an error (in the skip expression)
And search() to return:
	> 0 when there is a match (returns the line number of the match)
	0   when there is no match

Changed the BufReadAfter event to BufWinEnter.  It's now also used when
showing a hidden buffer in a window, so that the view can be loaded.

'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.

Syntax highlighting: Added the "contains=TOP" and "contains=CONTAINED"
arguments.  Makes it possible to define a transparent item that doesn't
contain itself.

Added 'n' flag in 'formatoptions': format a numbered list.

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

When 'viewoptions' contains "folds" but not "options", still store the 'fold*'
options in the view, otherwise folds would not be restored properly.

Added "localoptions" to 'sessionoptions': store local values for local
options, not global options or global values for local options.

Added local value for global options 'path', 'dictionary', 'thesaurus' and
'define'.

Improved configure check for iconv().  Include "iconv.h" first, iconv() is
sometimes redefied to libiconv().  Don't use iconv() when it can't be linked
in.

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

Use the value of $TMPDIR to set the default for 'backupskip'.

For Unix always include the +wildignore feature, otherwise 'backupskip' isn't
included in the tiny version and "crontab -e" won't work.

The command from a tags file is executed in the sandbox for better security.

exists(":Cmd") returns 2 for full match, 3 for an ambiguous match.

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

Debug: also stop at the end of a function and sourced file.

The DOS/Windows install program now generates a batch file that can start Vim
with more than 9 arguments.

Crypting: 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)

Added 'delcombing' option: Delete combining character separately. (Ron Aaron)

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

Removed the use of the stuff buffer for "*", "K", CTRL-], etc.  Avoids problem
with autocommands.

Patterns: Added "\_^": stands for start-of-line anywhere in the regexp.
Similarly, "\_$" stands for end-of-line.

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

Fixes
-----

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)

When doing ":bdel" (in the last window), it would open a secret buffer.

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.

When 'foldmethod' is "indent" and 'foldenable' reset, ">>" caused the
displayed text to jump up and down.

Made "zo" and "zc" work properly: open/close only one level.

When starting a Visual selection, all lines above the cursor were checked for
changes to be redrawn.  Also when owning/disowning the X selection.  Reduced
that to only redrawing the lines within the Visual selection.

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

Cscope interface: "cscope kill all" crashed Vim.  "cscope kill 0" killed the X
session!

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

Folding:
- When 'hidden' is set, a ":buf" or ":bprev" command doesn't refresh folds.
- When editing a file in a window that shows a help file, 'foldenable' would
  always be off.
- Folding didn't work together with 'scrollbind'.

Multi-byte: When compiling on Win32 with Cygwin, using the Unix Makefile,
accept the Windows codepage.  Use "cp932" instead of "euc-jp". (Yasushi
Higuchi)

When a buffer becomes secret, reset its option values.  Otherwise ":bdel x"
":edit x" is not backwards compatible with Vim 5.7.

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.

":mksession": All mappings were written as non-remappable.  Script-local
mappings were written, they won't work.  A mapping with a space in the lhs
wasn't written correctly.

When doing "dd" on the top line, a wrapping line at the bottom which doesn't
fit ("@" displayed) wasn't redrawn.

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().

On X11R5 compilation failed because XIM functions are not available.
Don't enable the XIM when X11/Xlib.h doesn't contain XIM defines.

searchpair() didn't work correctly when the start and end matched in the same
line.

An error message in the command-line window caused the command not to be
executed.  Reset did_emsg in the main loop.

Using a special key for a register name, e.g., after "q", would crash on
systems that can't handle a negative argument to isalnum().

exists("*s:MyFunction") didn't work.

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.

When a BufWriteCmd autocommand changed the file with a shell command, the
"file changed since editing started" error shouldn't be given.  Update the
timestamp after executing BufWriteCmd.

Multibyte: CTRL-E and CTRL-Y in Insert mode didn't work for multi-byte
characters. (Sung-Hyun Nam)

"$\n" didn't match. (Chase Tingley)

The command line was redrawn every other command when 'ruler' was set.

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

Epilogue
--------

WARNING: This is really an unstable version.  Many things have been added
without proper testing.  It does crash.  It may destroy your work.  New
features may change incompatibly in the next version.

This version is for developers, thus it comes as source code only.
If you run into something that doesn't work, please try to figure out why,
try to solve it and send me a patch.  If you can't do that, at least send me
precise information to save me time.

More info about the new 6.0 features with ":help version6".

If you don't like the syntax of a command, the name of an option or how the
new features work, let's discuss this in the vim-dev maillist.

Lots of things are not working yet.  Check ":help todo" for known items.

I NEED YOUR HELP: There is still a lot of work to be done.  If I have to do it
all by myself it will take a very long time until Vim.6.0 is ready.  Please
give a hand by implementing one of the items in the todo list.

You can find Vim 6.0 here: ftp://ftp.vim.org/pub/vim/unreleased/

unix/vim-6.0u-rt.tar.gz		runtime files
unix/vim-6.0u-src.tar.gz	sources

extra/vim-6.0u-extra.tar.gz	extra files
extra/vim-6.0u-lang.tar.gz	multi-language files

Happy Vimming!