Softpanorama
(slightly skeptical) Open Source Software Educational Society

May the source be with you, but remember the KISS principle ;-)

Google   


Vimorama 2001

[Oct. 10, 2001] vim-6.0 -- VIM 6 released !!!!  Vim 6.0 is a huge step from Vim 5.x. Many, many new features and improvements have been included. For an overview, with a few screendumps, look here: http://vim.sf.net/whyvim.php

[ 29 Jul 2001] Vim-6.0 beta Bram Moolenaar

Major changes
-------------
... ... ...

Unix: remote server commands: (Flemming Madsen)
- Added the --remote-wait argument: Edit the file in another Vim and wait for
  it to finish.
- Added functions to evaluate an expression in another Vim.
- Added functions to send a message from the server back to the client.
- Removed the ":serversend" and ":serverlist" commands, they have been
  replaced with functions.


Other changes
-------------
... ... ...


When a ":cd" command was typed, echo the new current directory. (Dan Sharp)

Writing 'makeef' in the current directory fails in a read-only directory and
causes trouble when using ":grep" on all files.  Made the default empty for
all systems, so that a temp file is used.

Win32: Added possibility to load TCL dynamically. (Muraoka Taro)
Also for Borland 5.5. (Dan Sharp)

Dr Chip's Vim Page   Check out the Real Short Vim Normal-Mode List of Commands.

Spell Checking

The English spelling checker (under Scripts in the Links) uses Vim's highlighting ability to make misspelled (English) words show up as "Error" (usually white on a red background). The Vim-based English spell checker also supports entering words that the cursor is on into a temporary or permanent dictionary and allows one to skip to the previous or subsequent spelling error (if any). It co-exists quite well with TeX, LaTeX, and other such variants, too!

To enable english spell checking, put the following line in your <.vimrc>:

map <F3> :so $CVIMSYN/engspchk.vim

where CVIMSYN is an environment variable pointing to wherever you have <engspchk.vim> installed. Note that hitting the function key F3 will then invoke the English spelling checker by sourcing it in! Feel free to change that function key name to whatever you find appropriate. For PCs, note that to set up the CVIMSYN environment variable you'll be putting "set CVIMSYN=..path.." into your <autoexec.bat>.

For Vim versions 5.04 and later, the <engspchk.vim> file also provides two maps (\en and \ep) to move to the next and preceding spelling error, if any. I suggest you upgrade if you haven't already, because Vim's functions are powerful!

For Vim version 6.0 and later, <engspchk.vim> provides the (\ea) map which brings up a one-line alternatives window for the word under the cursor. Move left and right with the full power of Vim, and when the cursor lies on the desired substitute word, a simple carriage return will cause replacement. You'll also need to have the agrep program to do this.

Tag Generation

I have written my own tag generating program (see Links); although exuberant ctags is good, I know how to modify hdrtag to suit me. It contains tagging generation for c/c++, c/c++ header files, lex, yacc, TeX (cites and labels), vim scripts (functions and syntax), and Maple V.

Exuberant Ctags will no longer be distributed with vim as of v6.0i. I've provided a link to its homesite in the source code-related links below.

Text Alignment

The alignment maps (ttalign.vim) use the textab filter (program). You'll need to download and compile a copy for your machine if you want to use the alignment maps. See my Textab page for examples, source code, and maps. Alternative aligners are available from Johannes Zellner and from David Rogers.

Useful Maps

The useful maps in Links contains a medley of things: several maps to handle difference files, a map (F10 key) for determining the highlighting groups that the word the cursor is on belongs to, an autocmd which uses viminfo to cause subsequent invocations of vim on a file saved by viminfo (I use set viminfo='10,\"100,:20,%,n~/.viminfo) to open in the same place in the file as when it was closed, some maps for inserting dates, some maps for gzip and gunzip, and a pair of maps for writing text to a temporary file (great for moving info between vim invocations). The maps file is internally documented. Enjoy!

Vim Functions, Plugs, and Stubs

Various functions, plug-ins, and quick-insertion stubs follow alphabetically.

 [Jan 26, 2001] Adrian's VIM Page

There might be better fonts you can use for Windows NT than the ugly system font. I wanted a font that was clear, fixed width, and zeros (0) and capital O's were clearly distinguisable. I found two fonts on the Internet (through the VIM mailing list) that you can try. To install the Andale font, just execute the dowloaded file. For the Hyprfont font, read the readme.txt file for instructions. To make one of these fonts the default for gvim, add the following line:

set guifont=Andale_Mono:h10

Use the font name and add a colon h (:h) followed by your preferred font size. See my gvimrc file as an example or read :help guifont.

Fonts:

[Jan 20, 2001] Some version 6 features (from :version6). The main news is that 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.

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)


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: (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

\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

\@!		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".
\@		match preceding atom as a subexpression

\&		match only when branch before and after it match

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)


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. |s:var|
  automatically deletes them when the script ends.
- 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 mappings and abbreviations local to a buffer: ":map 
".
- In a mapping "
" can be used to get the value of the "mapleader"
  variable.  This simplifies mappings that use "mapleader".  "
"
  defaults to "\".  "
" does the same with "maplocalleader".  This
  is to be used for mappings local to a buffer.
- Added 
 Script ID to define functions and mappings local to a script.
Continued

Copyright © 1996-2008 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

Standard disclaimer: The statements, views and opinions presented on this web page are those of the author and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.

Last modified: February 28, 2008