summaryrefslogtreecommitdiff
path: root/usr.bin/vim/doc
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/vim/doc')
-rw-r--r--usr.bin/vim/doc/doctags.c13
-rw-r--r--usr.bin/vim/doc/vim_40.txt6
-rw-r--r--usr.bin/vim/doc/vim_ami.txt2
-rw-r--r--usr.bin/vim/doc/vim_arch.txt2
-rw-r--r--usr.bin/vim/doc/vim_diff.txt4
-rw-r--r--usr.bin/vim/doc/vim_digr.txt2
-rw-r--r--usr.bin/vim/doc/vim_dos.txt254
-rw-r--r--usr.bin/vim/doc/vim_gui.txt29
-rw-r--r--usr.bin/vim/doc/vim_help.txt15
-rw-r--r--usr.bin/vim/doc/vim_idx.txt5
-rw-r--r--usr.bin/vim/doc/vim_kcc.txt48
-rw-r--r--usr.bin/vim/doc/vim_menu.txt3
-rw-r--r--usr.bin/vim/doc/vim_mint.txt2
-rw-r--r--usr.bin/vim/doc/vim_os2.txt90
-rw-r--r--usr.bin/vim/doc/vim_ref.txt564
-rw-r--r--usr.bin/vim/doc/vim_rlh.txt2
-rw-r--r--usr.bin/vim/doc/vim_tags66
-rw-r--r--usr.bin/vim/doc/vim_tips.txt22
-rw-r--r--usr.bin/vim/doc/vim_unix.txt2
-rw-r--r--usr.bin/vim/doc/vim_w32.txt216
-rw-r--r--usr.bin/vim/doc/vim_win.txt11
21 files changed, 957 insertions, 401 deletions
diff --git a/usr.bin/vim/doc/doctags.c b/usr.bin/vim/doc/doctags.c
index 64d436f0f15..c71d1cc5a7e 100644
--- a/usr.bin/vim/doc/doctags.c
+++ b/usr.bin/vim/doc/doctags.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: doctags.c,v 1.1 1996/09/07 21:40:30 downsj Exp $ */
+/* $OpenBSD: doctags.c,v 1.2 1996/09/21 06:23:31 downsj Exp $ */
/* vim:set ts=4 sw=4:
* this program makes a tags file for vim_ref.txt
*
@@ -54,7 +54,16 @@ main(argc, argv)
characters */
{
*p2 = '\0';
- printf("%s\t%s\t/\\*%s\\*\n", p1 + 1, argv[0], p1 + 1);
+ ++p1;
+ printf("%s\t%s\t/\\*", p1, argv[0]);
+ while (*p1)
+ {
+ if (*p1 == '\\') /* insert backslash */
+ putchar('\\');
+ putchar(*p1);
+ ++p1;
+ }
+ printf("\\*\n");
p2 = strchr(p2 + 1, '*');
}
}
diff --git a/usr.bin/vim/doc/vim_40.txt b/usr.bin/vim/doc/vim_40.txt
index 720430400f1..6d4e1ba7a4c 100644
--- a/usr.bin/vim/doc/vim_40.txt
+++ b/usr.bin/vim/doc/vim_40.txt
@@ -1,4 +1,4 @@
-*vim_40.txt* For Vim version 4.2. Last modification: 1996 June 16
+*vim_40.txt* For Vim version 4.4. Last modification: 1996 Sep 1
Welcome to Vim Version 4.0!
@@ -1406,6 +1406,10 @@ Added list of options that are enabled/disabled at compile time to ":version"
command (+GUI -digraphs -eindent, etc.). For Unix, add a line to the
":version" command to show how it was compiled. |:version|
+Added ":if" and ":endif" commands. Everything in between them is ignored.
+This is just for being able to add future commands to vimrc files in a
+backwards compatible way. |:if|
+
Made CTRL-N and CTRL-P for command-line completion line cyclic. |c_CTRL-N|
"<cword>" in the command line where a file name is expected is expanded to
diff --git a/usr.bin/vim/doc/vim_ami.txt b/usr.bin/vim/doc/vim_ami.txt
index 6366564c2a5..2ba3374d7ca 100644
--- a/usr.bin/vim/doc/vim_ami.txt
+++ b/usr.bin/vim/doc/vim_ami.txt
@@ -1,4 +1,4 @@
-*vim_ami.txt* For Vim version 4.2. Last modification: 1996 Apr 19
+*vim_ami.txt* For Vim version 4.4. Last modification: 1996 Apr 19
This file contains the particularities for the Amiga version of Vim.
diff --git a/usr.bin/vim/doc/vim_arch.txt b/usr.bin/vim/doc/vim_arch.txt
index b5d40396146..a7fb9fb3b6f 100644
--- a/usr.bin/vim/doc/vim_arch.txt
+++ b/usr.bin/vim/doc/vim_arch.txt
@@ -1,4 +1,4 @@
-*vim_arch.txt* For Vim version 4.2. Last modification: 1996 Mar 6
+*vim_arch.txt* For Vim version 4.4. Last modification: 1996 Mar 6
This file contains the particularities for the Archimedes version of Vim.
diff --git a/usr.bin/vim/doc/vim_diff.txt b/usr.bin/vim/doc/vim_diff.txt
index 0b3ac232ed3..f9f0553718d 100644
--- a/usr.bin/vim/doc/vim_diff.txt
+++ b/usr.bin/vim/doc/vim_diff.txt
@@ -1,4 +1,4 @@
-*vim_diff.txt* For Vim version 4.2. Last modification: 1996 June 16
+*vim_diff.txt* For Vim version 4.4. Last modification: 1996 July 18
This is a summary of the differences between VIM and vi. It is not complete.
see also |vim_ref.txt|, look for comments in {}, like "{not in Vi}".
@@ -700,7 +700,7 @@ the "-n" option. Use the 'directory' option for placing the .swp file
somewhere else.
The 'shortname' (sn) option, when set, tells Vim that ".bak" and ".swp"
-filenames are to be MS-DOS-like: 8 characters plus 3 for extention. This
+filenames are to be MS-DOS-like: 8 characters plus 3 for extension. This
should be used on messydos or crossdos filesystems on the Amiga. If this
option is off, Vim tries to guess if MS-DOS filename restrictions are
effective.
diff --git a/usr.bin/vim/doc/vim_digr.txt b/usr.bin/vim/doc/vim_digr.txt
index 5635e49dbe2..a58d7723559 100644
--- a/usr.bin/vim/doc/vim_digr.txt
+++ b/usr.bin/vim/doc/vim_digr.txt
@@ -1,4 +1,4 @@
-*vim_digr.txt* For Vim version 4.2. Last modification: 1996 June 8
+*vim_digr.txt* For Vim version 4.4. Last modification: 1996 June 8
These are the default digraph characters for Vim.
diff --git a/usr.bin/vim/doc/vim_dos.txt b/usr.bin/vim/doc/vim_dos.txt
index 6e1ba5b8bcd..5a0860839ba 100644
--- a/usr.bin/vim/doc/vim_dos.txt
+++ b/usr.bin/vim/doc/vim_dos.txt
@@ -1,15 +1,21 @@
-*vim_dos.txt* For Vim version 4.2. Last modification: 1996 June 13
+*vim_dos.txt* For Vim version 4.4. Last modification: 1996 Aug 17
This file contains the particularities for the MS-DOS version of Vim.
+
+THREE VERSIONS FOR MS-DOS
+
There are Three versions of Vim that can be used with MS-DOS machines:
16-bit version Can be used on any MS-DOS system, only uses up to
640 Kbyte of memory. Also runs on OS/2, Windows 95, and NT.
+ Recommended for use on pre-386 machines.
32-bit version Requires 386 processor and a DPMI driver, uses all
available memory. Supports long file names where available.
+ Recommended for MS-DOS, Windows 3.1 and Windows 95.
Win32 version Requires Windows 95 or Windows NT, uses all available
- memory, supports long file names, etc. See |vim_w32.txt|
+ memory, supports long file names, etc. Has some problems on
+ Windows 95. Recommended for Windows NT. See |vim_w32.txt|
It is recommended to use the 32-bit or Win32 version. Although the 16-bit
version is able to edit very big files, it quickly runs out of memory when
@@ -23,7 +29,12 @@ run already. If you get the message "No DPMI", you need to install a DPMI
driver. Such a driver is included with the executable. The latest version of
"CWSDPMI.ZIP" can be obtained from: "ftp.neosoft.com:pub/users/s/sandmann".
-Known problems:
+If the 32-bit DOS version is run on Windows 95 or Windows NT, it can use long
+filenames, as can the Win32 version.
+
+
+KNOWN PROBLEMS
+
- When using smartdrive (MS-DOS 6.x) with write-behind caching, it is possible
that Vim will try to create a swap file on a read-only file system (e.g.
write protected floppy). You will then be given the message
@@ -35,8 +46,45 @@ Known problems:
- The 16 bits MS-DOS version can only have about 10 files open (in a window or
hidden) at one time. With more files you will get error messages when
trying to read or write a file, and for filter commands.
-- The 32 bits MS-DOS version runs out of file descriptors when using a command
- like ":r!ls"; Vim crashes after about five to twelve tries.
+- The 32 bit version can work with long filenames. When doing filename
+ completion, matches for the short filename will also be found. But this
+ will result in the corresponding long filename. For example, if you have
+ the long file name "this_is_a_test" with the short filename "this_i~1", the
+ command ":e *1" will start editing "this_is_a_test".
+- When using the 32 bit version and you run into problems with DPMI support,
+ check if there is a program in your config.sys that eats resources. One
+ program known to cause this problem is "netx", which says "NetWare v. 3.26
+ Workstation shell". Replace it with version 3.32 to fix the problem.
+
+
+LOCATION OF DOCUMENTATION and VIMRC FILE
+
+You should set the environment variable "VIM" to the directory where the Vim
+documentation files are. If "VIM" is used but not defined, "HOME" is tried
+too.
+
+If the HOME environment variable is not set, the value "C:/" is used as a
+default.
+
+The default help filename is "$VIM\vim_help.txt". If the environment variable
+$VIM is not defined or the file is not found, the DOS search path is used to
+search for the file "vim_help.txt". If you do not want to put "vim_help.txt"
+in your search path, use the command ":set helpfile=pathname" to tell Vim
+where the help file is. |'helpfile'|
+
+Vim will look for initializations in eight places. The first that is found
+is used and the others are ignored. The order is:
+ - The environment variable VIMINIT
+ - The file "$VIM/_vimrc"
+ - The file "$HOME/_vimrc"
+ - The file "$VIM/.vimrc"
+ - The file "$HOME/.vimrc"
+ - The environment variable EXINIT
+ - The file "$VIM/_exrc"
+ - The file "$HOME/_exrc"
+
+
+USING BACKSLASHES
Using backslashes in file names can be a problem. Vi halves the number of
backslashes for some commands. Vim is a bit more tolerant and backslashes
@@ -46,13 +94,15 @@ etc.), it is removed. Use slashes to avoid problems: ":e c:/foo/bar" works
fine. Vim will replace the slashes with backslashes internally, to avoid
problems with some MS-DOS programs.
+
+SCREEN OUTPUT AND COLORS
+
The default output method for the screen is to use bios calls. This will work
right away on most systems. You do not need ansi.sys. You can use ":mode" to
set the current screen mode. See vim_ref.txt, section 20.3 |:mode|.
You can set the color used in five modes with nine termcap options. Which of
-the five modes is used for which action depends on the 'highlight' ('hl')
-option. See vim_ref.txt |'highlight'|.
+the five modes is used for which action depends on the |'highlight'| option.
":set t_mr=^V^[\|xxm" start of invert mode
":set t_md=^V^[\|xxm" start of bold mode
@@ -69,33 +119,60 @@ option. See vim_ref.txt |'highlight'|.
^V is CTRL-V
^[ is <Esc>
-xx must be replaced with a decimal code: The foreground color number and
- background color number added together:
+xx must be replaced with a decimal code, which is the foreground color number
+ and background color number added together:
COLOR FOREGROUND BACKGROUND
-black 0 0
-blue 1 16
-green 2 32
-cyan 3 48
-red 4 64
-magenta 5 80
-brown 6 96
-lighgray 7 112
-darkgray 8
-lightblue 9
-lightgreen 10
-lighcyan 11
-lightred 12
-lighmagenta 13
-yellow 14
-white 15
-blink 128
-
-When you use 0, the color is reset to the one used when you started Vim. This
-is the default for t_me. The default for t_mr is black on grey, 0 + 112 = 112.
-The default for t_md is white on cyan, 15 + 48 = 63. The default for t_so is
-white on blue, 15 + 16 = 31. These colors were chosen, because they also look
-good when using an inverted display. But you can change them as you like.
+ black 0 0
+ blue 1 16
+ green 2 32
+ cyan 3 48
+ red 4 64
+ magenta 5 80
+ brown 6 96
+ lighgray 7 112
+ darkgray 8 128 *
+ lightblue 9 144 *
+ lightgreen 10 160 *
+ lighcyan 11 176 *
+ lightred 12 192 *
+ lightmagenta 13 208 *
+ yellow 14 224 *
+ white 15 240 *
+
+* Depending on the display mode, the color codes above 128 may not be
+ available, and code 128 will make the text blink.
+
+When you use 0, the color is reset to the one used when you started Vim.
+This is the default for t_me.
+
+The defaults for the various highlight modes are:
+ t_mr 112 reverse mode: black text (0) on lightgray (112)
+ t_md 63 bold mode: white text (15) on cyan (48)
+ t_me 0 normal mode (revert to default)
+
+ t_so 31 standout mode: white (15) text on blue (16)
+ t_se 0 standout mode end (revert to default)
+
+ t_czh 225 italic mode: blue text (1) on yellow (224)
+ t_czr 0 italic mode end (revert to default)
+
+ t_us 67 underline mode: cyan text (3) on red (64)
+ t_ue 0 underline mode end (revert to default)
+
+These colors were chosen because they also look good when using an inverted
+display, but you can change them to your liking.
+
+Example:
+:set t_mr=^V^[\|97m " start of invert mode: blue (1) on brown (96)
+:set t_md=^V^[\|67m " start of bold mode: cyan (3) on red (64)
+:set t_me=^V^[\|112m " back to normal mode: black (0) on light gray (112)
+
+:set t_so=^V^[\|37m " start of standout mode: magenta (5) on green (32)
+:set t_se=^V^[\|112m " back to normal mode: black (0) on light gray (112)
+
+
+SPECIAL TERMCAP CODES and NOT USING VIM ON THE PC CONSOLE
The termcap codes that are translated into bios calls are:
t_cl <Esc>|J clear screen
@@ -123,17 +200,19 @@ If you want to use Vim on a terminal connected to a COM: port, reset the
'bioskey' option. Otherwise the commands will be read from the PC keyboard.
CTRL-C and CTRL-P may not work correctly with 'bioskey' reset.
+
+TEXTMODE or NON-MS-DOS FILES
+
If the "tx" (textmode) option is set (which is the default), Vim will accept
a single <NL> or a <CR><NL> pair for end-of-line. When writing a file, Vim
will use <CR><NL>. Thus, if you edit a file and write it, <NL> is replaced
-with <CR><NL>. If the "tx" option is not set, the single <NL> will be used
+with <CR><NL>. If the "tx" option is not set, a single <NL> will be used
for end-of-line. A <CR> will be shown as ^M. You can use Vim to replace
<NL> with <CR><NL> by reading in any mode and writing in text mode (":se
tx"). You can use Vim to replace <CR><NL> with <NL> by reading in text mode
and writing in non-text mode (":se notx"). 'textmode' is set automatically
when 'textauto' is on (which is the default), so you don't really have to
-worry about what you are doing.
- |'textmode'| |'textauto'|
+worry about what you are doing. |'textmode'| |'textauto'|
If you want to edit a script file or a binary file, you should reset the
'textmode' and 'textauto' options before loading the file. Script files and
@@ -141,47 +220,47 @@ binary files may contain single <NL> characters which would be replaced with
<CR><NL>. You can reset 'textmode' and 'textauto' automatically by starting
Vim with the "-b" (binary) option.
-You should set the environment variable "VIM" to the directory where the Vim
-documentation files are. If "VIM" is used but not defined, "HOME" is tried
-too.
-If the HOME environment variable is not set, the value "C:/" is used as a
-default.
-
-The default help filename is "$VIM\vim_help.txt". If the environment variable
-$VIM is not defined or the file is not found, the DOS search path is used to
-search for the file "vim_help.txt". If you do not want to put "vim_help.txt"
-in your search path, use the command ":set helpfile=pathname" to tell Vim
-where the help file is. |'helpfile'|
-
-Vim will look for initializations in eight places. The first that is found
-is used and the others are ignored. The order is
- - The environment variable VIMINIT
- - The file "$VIM/_vimrc"
- - The file "$HOME/_vimrc"
- - The file "$VIM/.vimrc"
- - The file "$HOME/.vimrc"
- - The environment variable EXINIT
- - The file "$VIM/_exrc"
- - The file "$HOME/_exrc"
+:CD COMMAND
The ":cd" command recognizes the drive specifier and changes the current
drive. Use ":cd c:" to make drive C the active drive. Use ":cd d:\dos" to go
to the directory "dos" in the root of drive D. |:cd|
+
+INTERRUPTING
+
Use CTRL-break instead of CTRL-C to interrupt searches. The CTRL-C is not
detected until a key is read.
+
+SHIFTED ARROW KEYS
+
Use CTRL-arrow-left and CTRL-arrow-right instead of SHIFT-arrow-left and
SHIFT-arrow-right. The arrow-up and arrow-down cannot be used with SHIFT or
CTRL.
-Temporary files (for filtering) are put in the current directory.
+
+TEMP FILES
+
+Temporary files (for filtering) are put in the first directory in the next
+list that exists and where a file can be created:
+ $TMP
+ $TEMP
+ C:\TMP
+ C:\TEMP
+ current directory
+
+
+SHELL OPTION DEFAULT
The default for the sh (shell) option is "command". If COMSPEC is defined it
-is used instead. External commands are started with "command /c
-<command_name>". Typing CTRL-Z starts a new command shell. Return to Vim with
-"exit".
+is used instead. External commands are started with
+"command /c <command_name>". Typing CTRL-Z starts a new command shell.
+Return to Vim with "exit".
+
+
+FILENAME EXTENSIONS
MS-DOS allows for only one filename extension. Therefore, when appending an
extension, the '.' in the original filename is replaced with a '_', the name
@@ -192,8 +271,8 @@ becomes "thisisat.bak". To reduce these problems, the default for
then becomes "thisisat.es~". The 'shortname' option is not available,
because it would always be set.
-If the 32-bit DOS version is run on Windows 95 or Windows NT, it can use long
-filenames, as can the Win32 version.
+
+COMPILING
The MS-DOS binary was compiled with Borland-C++ version 4.0, using
makefile.bcc. Other compilers should also work. Use makefile.dos for
@@ -204,21 +283,19 @@ be done with the addcr program: "make addcr". This will compile addcr.c to
addcr.exe and then execute the addcr.bat file. Sometimes this fails. In
that case, execute the addcr.bat file from the DOS prompt.
-
The "spawno" library by Ralf Brown was used in order to free memory when Vim
starts a shell or other external command. Only about 200 bytes are taken from
conventional memory. When recompiling get the spawno library from Simtel,
directory "msdos/c". It is called something like "spwno413.zip". Or remove
the library from the makefile.
+
+MEMORY USAGE and LIMITATIONS
+
A swap file is used to store most of the text. You should be able to edit
very large files. However, memory is used for undo and other things. If you
delete a lot of text, you can still run out of memory in the 16-bit version.
-In the 16-bit version the line length is limited to about 32000 characters.
-When reading a file the lines are automatically split. But editing a line
-in such a way that it becomes too long may give unexpected results.
-
If Vim gives an "Out of memory" warning, you should stop editing. The result
of further editing actions is unpredictable. Setting 'undolevels' to 0 saves
some memory. Running the maze macros on a big maze is guaranteed to run out
@@ -227,7 +304,13 @@ of memory, because each change is remembered for undo. In this case set
In the 32-bit version, extended memory is used to avoid these problems.
-About using Vim to edit a symbolically linked file on a Unix NFS file server:
+In the 16-bit version the line length is limited to about 32000 characters.
+When reading a file the lines are automatically split. But editing a line
+in such a way that it becomes too long may give unexpected results.
+
+
+USING VIM TO EDIT A SYMBOLICALLY LINKED FILE ON A UNIX NFS FILE SERVER
+
When writing the file, Vim does not "write through" the symlink. Instead, it
deletes the symbolic link and creates a new file in its place.
On Unix, Vim is prepared for links (symbolic or hard). A backup copy of
@@ -238,3 +321,36 @@ bits are set like the original file. However, this doesn't work properly when
working on an NFS-mounted file system where links and other things exist. The
only way to fix this in the current version is not making a backup file, by
":set nobackup nowritebackup" |'writebackup'|
+
+
+HOW TO COPY/PASTE TEXT FROM/TO VIM IN A DOS BOX
+
+(posted to comp.editors by John Velman <velman@igate1.hac.com>)
+
+1) to get VIM to run in a window, instead of full screen, press alt+enter
+ (I've always used alt+shift+enter, but either one seems to work). This
+ toggles back and forth between full screen and a dos window.
+
+2) To paste something *into* vim, put vim in insert mode.
+
+3) put the text you want to paste on the windows clipboard.
+
+4) Click the control box in the upper left of the vim window. (This looks
+ like a big minus sign). If you don't want to use the mouse, you can get
+ this with alt+spacebar.
+5) on the resulting dropdown menu choose 'Edit'
+6) on the child dropdown menu choose 'Paste'
+
+To copy something from the vim window to the clipboard,
+
+1) select the control box to get the control drop down menu.
+2) select 'Edit.'
+3) select 'Mark'
+4) using either the the keys or the mouse, select the part of the vim window
+ that you want to copy. To use the keys, use the arrow keys, and hold down
+ shift to extend the selection.
+5) when you've completed your selection, press 'enter.' The selection
+ is now in the windows clipboard. By the way, this can be any
+ rectangular selection, for example columns 4-25 in rows 7-10. It can
+ include anything in the VIM window: the output of a :!dir, for
+ example.
diff --git a/usr.bin/vim/doc/vim_gui.txt b/usr.bin/vim/doc/vim_gui.txt
index 755240937a7..017f6f49e09 100644
--- a/usr.bin/vim/doc/vim_gui.txt
+++ b/usr.bin/vim/doc/vim_gui.txt
@@ -1,4 +1,4 @@
-*vim_gui.txt* For Vim version 4.2. Last modification: 1996 June 11
+*vim_gui.txt* For Vim version 4.4. Last modification: 1996 Sep 12
Vim's Graphical User Interface
@@ -31,10 +31,23 @@ that waits for gvim to exit), start gvim with "gvim -f", "vim -gf" or use
color. If you want the GUI to run in the foreground always, include the 'f'
flag in 'guioptions'. |-f|.
-When the GUI starts up, the file ~/.gvimrc is sourced if it exists, and then
-the file ./.gvimrc. This file may contain commands to set up your own
-customised menus (see |:menu|) and initialise other things that you may want
-to set up differently from the terminal version.
+ *gui_init*
+When the GUI starts up initializations are carried out, in this order:
+- If the system gvimrc exists, it is sourced. The name if this file is
+ something like "/usr/local/share/vim/gvimrc". You can check this with
+ ":version".
+- If the GVIMINIT environment variable exists and is not empty, it is
+ executed as an Ex command. Otherwise, if the user gvimrc file exists, it
+ is sourced. The name of this file is something like "$HOME/.gvimrc". You
+ can check this with ":version".
+- If the 'exrc' option is set (which is NOT the default) the file ./.gvimrc
+ is sourced, if it exist and isn't the same file as the system or user
+ gvimrc file. If this file is not owned by you, some security restrictions
+ apply.
+
+You can use the gvimrc files to set up your own customised menus (see |:menu|)
+and initialise other things that you may want to set up differently from the
+terminal version.
There are a number of options which only have meaning in the GUI version of
Vim. These are 'guifont', 'guipty' and 'guioptions'. They are documented
@@ -461,7 +474,7 @@ scrollbars will remain the same, because Vim has its own, which are already
- Window should be redrawn when resizing at the hit-return prompt.
- - Use different cursor and mouse shapes/colours for different modes.
+ - Use different cursor and mouse shapes/colors for different modes.
- Scrollbars with Motif 1.1 are ordered upside down! Do we care?
@@ -474,8 +487,8 @@ scrollbars will remain the same, because Vim has its own, which are already
current Vim window.
- Add a new command :highlight for specifying how various things should
- be highlighted, allowing colours to be given. Currently it's all hard
- coded, the text colour, bg colour etc.
+ be highlighted, allowing colors to be given. Currently it's all hard
+ coded, the text color, bg color etc.
- We need a nice little picture to go on the icon :-) But how do we do
that?
diff --git a/usr.bin/vim/doc/vim_help.txt b/usr.bin/vim/doc/vim_help.txt
index e6183370efa..70989e96d14 100644
--- a/usr.bin/vim/doc/vim_help.txt
+++ b/usr.bin/vim/doc/vim_help.txt
@@ -1,4 +1,4 @@
-*vim_help.txt* For Vim version 4.2. Last modification: 1996 June 16
+*vim_help.txt* For Vim version 4.4. Last modification: 1996 Aug 3
VIM help file
@@ -704,7 +704,9 @@ Short explanation of each option: *option_list*
|'sections'| |'sect'| nroff macros that separate sections
|'secure'| secure mode for reading .vimrc in current dir
|'shell'| |'sh'| name of shell to use for external commands
+|'shellcmdflag'| |'shcf'| flag to shell to execute one command
|'shellpipe'| |'sp'| string to put output of ":make" in error file
+|'shellquote'| |'shq'| quote character(s) for around shell command
|'shellredir'| |'srr'| string to put output of filter in a temp file
|'shelltype'| |'st'| Amiga: influences how to use a shell
|'shiftround'| |'sr'| round indent to multiple of shiftwidth
@@ -956,6 +958,7 @@ Short explanation of each option: *option_list*
|:xit| :x[it][!] [file] Like ":wq" but write only when changes have
been made
|ZZ| ZZ Same as ":x".
+|ZQ| ZQ Same as ":q!".
|:xall| :xall[!] or :wqall[!]
Write all changed buffers and exit
@@ -1089,7 +1092,11 @@ Now that you've jumped here with CTRL-], g<LeftMouse>, or <C-LeftMouse>, you
can use CTRL-T, g<RightMouse>, or <C-RightMouse> to go back to where you were.
------------------------------------------------------------------------------
-For the most recent information about Vim: *www* *faq* *FAQ*
+ *www* *faq* *FAQ* *ftp* *distribution* *download*
+The Vim pages contain the most recent information about Vim. They also
+contains links to the most recent version of Vim. The FAQ is a list of
+Frequently Asked Questions, read this if you have problems.
+
VIM home page: <URL:http://www.math.fu-berlin.de/~guckes/vim/>
VIM FAQ: <URL:http://www.grafnetix.com/~laurent/vim/>
@@ -1124,7 +1131,7 @@ There are three mailing lists for Vim:
NOTE: You can only send messages to these lists if you have subscribed! Also:
you need to send the messages from the same location as the one you subscribed
-from (yes, Majordomo is not flexible).
+from (yes, Majordomo is inflexible).
If you want to join, send a message to
<majordomo@prz.tu-berlin.de>
@@ -1151,7 +1158,7 @@ suggestions and discussing what is good and bad in Vim.
Tony Andrews Stevie
Gert van Antwerpen changes for DJGPP on MS-DOS
Berkeley DB(3) ideas for swapfile
- Keith Bostic nvi
+ Keith Bostic Nvi
Ralf Brown SPAWNO library for MS-DOS
Robert Colon many useful remarks
Kayhan Demirel sent me news in Uganda
diff --git a/usr.bin/vim/doc/vim_idx.txt b/usr.bin/vim/doc/vim_idx.txt
index 7b15ce40236..83c82b06b3e 100644
--- a/usr.bin/vim/doc/vim_idx.txt
+++ b/usr.bin/vim/doc/vim_idx.txt
@@ -1,4 +1,4 @@
-*vim_idx.txt* For Vim version 4.2. Last modification: 1996 June 16
+*vim_idx.txt* For Vim version 4.4. Last modification: 1996 Aug 4
This file contains a list of all commands for each mode, with a tag and a
short description. The list is sorted on ASCII value.
@@ -38,7 +38,7 @@ tag char action
line
|i_CTRL-E| CTRL-E insert the character which is below the cursor
CTRL-F not used
- CTRL-G not used
+ CTRL-G reserved for future expansion
|i_<BS>| <BS> delete character before the cursor
|i_digraph| {char1}<BS>{char2}
enter digraph (only when 'digraph' option set)
@@ -292,6 +292,7 @@ tag char note action in Normal mode
|Y| ["x]Y yank N lines [into buffer x]; synonym for
"yy"
|ZZ| ZZ store current file if modified, and exit
+|ZQ| ZQ exit current file always
|[| [{char} square bracket command (see below)
\ not used
|]| ]{char} square bracket command (see below)
diff --git a/usr.bin/vim/doc/vim_kcc.txt b/usr.bin/vim/doc/vim_kcc.txt
index 57884877629..4a0d35ca414 100644
--- a/usr.bin/vim/doc/vim_kcc.txt
+++ b/usr.bin/vim/doc/vim_kcc.txt
@@ -1,22 +1,26 @@
*vim_kcc.txt* *uganda* *copying*
-Vim is Charityware. There are no restrictions on using or copying Vim, but I
-encourage you to make a donation to charity, see below. If you include Vim on
-a CD-ROM you should send me a copy.
+Vim is Charityware. You can use and copy it as much as you like, but you are
+encouraged to make a donation to orphans in Uganda. See below.
+
+If you include Vim on a CD-ROM, I would like to receive a copy. Just so I
+know which Vim distributions exists in the world (and to show off to my
+friends :-)).
+
+If you distribute a modified version of Vim, you must send me a copy,
+including the source code. Or make it available to me through ftp; let me
+know where I can find it. If the number of changes is small (e.g., a modified
+Makefile) e-mailing me the diffs will do. I preserve the right to include
+any changes in the official version of Vim. It is not allowed to distribute
+a modified version of Vim without making the source code available to me.
+It is not allowed to remove these restrictions from the distribution of the
+Vim sources.
+
If you are happy with Vim, please express that by reading the rest of this
file.
-Summer 1993 I spent my holidays in Uganda, working for Kibaale Children's
-Centre (KCC) with a Dutch team. I was very impressed with what I experienced
-there. Of course I knew Africa from books and television, but actually being
-there and talking and working with the people is very different. January 1994
-I spent another month there, which made me realize that I could be of help to
-these people. Summer 1994 to summer 1995 I spent a whole year at the centre,
-working as a volunteer. I have helped to expand the centre and worked in the
-area of water and sanitation.
-
KCC is located in Kibaale, a small town in the south of Uganda, near Tanzania.
The area is known as Rakai District. The population is mostly farmers.
Although people are poor, there is enough food. But this district is
@@ -63,9 +67,11 @@ to travel hours by bicycle, if they have one. There is no ambulance in the
area and they don't have money to hire a taxi (if there is one). For most
people KCC is the only help they can get.
-Now that I'm back in Holland, I would like to continue supporting KCC. To do
-this I'm raising funds and organizing the sponsorship program. Please
-consider one of these options:
+Summer 1994 to summer 1995 I spent a whole year at the centre, working as a
+volunteer. I have helped to expand the centre and worked in the area of water
+and sanitation. Now that I'm back in Holland, I would like to continue
+supporting KCC. To do this I'm raising funds and organizing the sponsorship
+program. Please consider one of these options:
1. Sponsor a child: $15 a month. (Holland: fl 25)
2. Sponsor a child and the improvement of its environment: $25 a month
@@ -77,13 +83,13 @@ Compared with other organizations that do child sponsorship the amounts are
very low. This is because the money goes directly to the centre. Less than
5% is used for administration. This is possible because this is a small
organization that works with volunteers. If you would like to sponsor a
-child, you should have the intention to do this for at least a year.
+child, you should have the intention to do this for at least one year.
-How do you know that the money will be spent right? First of all you have my
-personal guarantee as the author of Vim. Further the centre is co-sponsored
-and inspected by World Vision, Save the Children Fund and International Child
-Care Fund. I have worked with the centre as a volunteer from September 1994
-to August 1995. I trust the people that are working there.
+How do you know that the money will be spent right? First of all you have my
+personal guarantee as the author of Vim. I trust the people that are working
+at the centre, I know them personally. Further more the centre is
+co-sponsored and inspected by World Vision, Save the Children Fund and
+International Child Care Fund.
If you have any further questions, send me e-mail: mool@oce.nl.
diff --git a/usr.bin/vim/doc/vim_menu.txt b/usr.bin/vim/doc/vim_menu.txt
index 24801b33942..5057e79c5e6 100644
--- a/usr.bin/vim/doc/vim_menu.txt
+++ b/usr.bin/vim/doc/vim_menu.txt
@@ -1,4 +1,5 @@
-" *vim_menu.txt*
+" *vim_menu.txt* For Vim version 4.4. Last modification: 1996 May 29
+"
" These menu commands should recreate the default Vim menus.
" You can use this as a start for your own set of menus.
" The colons at the start of each line are just to indicate these are colon
diff --git a/usr.bin/vim/doc/vim_mint.txt b/usr.bin/vim/doc/vim_mint.txt
index 6ae58bb2be0..5ac9d567653 100644
--- a/usr.bin/vim/doc/vim_mint.txt
+++ b/usr.bin/vim/doc/vim_mint.txt
@@ -1,4 +1,4 @@
-*vim_mint.txt* For Vim version 4.2. Last modification 1996 June 11
+*vim_mint.txt* For Vim version 4.4. Last modification 1996 June 11
This file contains the particularities for the Atari MiNT version of Vim.
diff --git a/usr.bin/vim/doc/vim_os2.txt b/usr.bin/vim/doc/vim_os2.txt
index 988a785a598..6a6c11226b9 100644
--- a/usr.bin/vim/doc/vim_os2.txt
+++ b/usr.bin/vim/doc/vim_os2.txt
@@ -1,46 +1,49 @@
-*vim_os2.txt* For Vim version 4.2. Last modification: 1996 June 13
+*vim_os2.txt* For Vim version 4.4. Last modification: 1996 July 20
This file contains the particularities for the OS/2 version of Vim.
-Note: This OS/2 port works well for me and a couple of other OS/2 users;
- however, since I haven't had much feedback, that either means no
- (OS/2-specific) bugs exist (besides the one mentioned below), or no one
- has yet created a situation in which any bugs are apparent. Report any
- problems or other comments to paul@wau.mis.ah.nl (email valid up to at
- least September 1996, after that try paul@wurtel.hobby.nl,
- paul@murphy.nl, or paulS@toecompst.nl). Textmode/notextmode, binary
- mode, and FAT handling all seem to work well, which would seem to be the
- most likely places for trouble.
+NOTE
- A known problem is that files opened by Vim are inherited by other
- programs that are started via a shell escape from within Vim.
- This specifically means that Vim won't be able to remove the swap
- file(s) associated with buffers open at the time the other program was
- started, until the other program is stopped. At that time, the swap file
- may be removed, but if Vim could not do that the first time, it won't be
- removed at all. You'll get warnings that some other Vim session may be
- editing the file when you start Vim up again on that file. This can be
- reproduced with ":!start epm". Now quit Vim, and start Vim again with
- the file that was in the buffer at the time epm was started. I'm
- working on this!
+This OS/2 port works well for me and a couple of other OS/2 users; however,
+since I haven't had much feedback, that either means no (OS/2-specific) bugs
+exist (besides the one mentioned below), or no one has yet created a situation
+in which any bugs are apparent. Report any problems or other comments to
+paul@wau.mis.ah.nl (email valid up to at least September 1996, after that try
+paul@wurtel.hobby.nl, paul@murphy.nl, or paulS@toecompst.nl).
+Textmode/notextmode, binary mode, and FAT handling all seem to work well,
+which would seem to be the most likely places for trouble.
+A known problem is that files opened by Vim are inherited by other programs
+that are started via a shell escape from within Vim. This specifically means
+that Vim won't be able to remove the swap file(s) associated with buffers open
+at the time the other program was started, until the other program is stopped.
+At that time, the swap file may be removed, but if Vim could not do that the
+first time, it won't be removed at all. You'll get warnings that some other
+Vim session may be editing the file when you start Vim up again on that file.
+This can be reproduced with ":!start epm". Now quit Vim, and start Vim again
+with the file that was in the buffer at the time epm was started. I'm working
+on this!
-Prerequisites:
-- To run Vim, you need the emx runtime environment (at least rev. 0.9b). This
- is generally available as (ask Archie about it):
+PREREQUISITES
+
+To run Vim, you need the emx runtime environment (at least rev. 0.9b). This
+is generally available as (ask Archie about it):
emxrt.zip emx runtime package
- I've included a copy of emx.dll, which should be copied to one of the
- directories listed in your LIBPATH. Emx is GPL'ed, but the emx.dll library
- is not (read COPYING.EMX to find out what that means to you).
+I've included a copy of emx.dll, which should be copied to one of the
+directories listed in your LIBPATH. Emx is GPL'ed, but the emx.dll library is
+not (read COPYING.EMX to find out what that means to you).
+
+This emx.dll is from the emxfix04.zip package, which unfortunately has a bug
+in select(). Versions of Vim before 3.27 will appear to hang when starting
+(actually, while processing vimrc). Hit return a couple of times until Vim
+starts working if this happens. Next, get an up to date version of Vim!
- This emx.dll is from the emxfix04.zip package, which unfortunately has a bug
- in select(). Versions of Vim before 3.27 will appear to hang when starting
- (actually, while processing vimrc). Hit return a couple of times until Vim
- starts working if this happens. Next, get an up to date version of Vim!
+
+HELP AND VIMRC FILE
The VIM environment variable is used to find the location of the help files
and the system .vimrc. Place an entry such as this in CONFIG.SYS:
@@ -59,19 +62,44 @@ network drive (including .vimrc; this is then called the "system" vimrc file),
and then use a personal copy of .vimrc (the "user" vimrc file). This should be
located in a directory indicated by the HOME environment variable.
+
+ENVIRONMENT VARIABLES IN FILE NAMES
+
This HOME environment variable is also used when using ~ in file names, so
":e ~/textfile" will edit the file "textfile" in the directory referred to by
HOME. Additionally you can use other environment variables in file names, as
as ":n $SRC/*.c".
+The HOME environment variable is also used to locate the .viminfo file
+(see |viminfo_file|). There is no support yet for .viminfo on FAT file
+systems yet, sorry. You could try the -i startup flag (as in "vim -i
+$HOME/_viminfo") however.
+
If the HOME environment variable is not set, the value "C:/" is used as a
default.
+
+BACKSLASHES
+
Using slashes ('/') and backslashes ('\') can be a bit of a problem (see
vim_dos.txt for more explanation), but in almost all cases Vim does "The Right
Thing". Vim itself uses backslashes in file names, but will happily accept
forward slashes if they are entered (in fact, often that works better!).
+
+TEMP FILES
+
+Temporary files (for filtering) are put in the first directory in the next
+list that exists and where a file can be created:
+ $TMP
+ $TEMP
+ C:\TMP
+ C:\TEMP
+ current directory
+
+
+TERMINAL SETTING
+
Use "os2ansi" as the TERM environment variable (or don't set it at all, as the
default is the correct value). You can set term to os2ansi in the .vimrc, in
case you need TERM to be a different value for other applications. The
diff --git a/usr.bin/vim/doc/vim_ref.txt b/usr.bin/vim/doc/vim_ref.txt
index e9358ebe02d..ad163ba4c79 100644
--- a/usr.bin/vim/doc/vim_ref.txt
+++ b/usr.bin/vim/doc/vim_ref.txt
@@ -1,4 +1,4 @@
-*vim_ref.txt* For Vim version 4.2. Last modification: 1996 June 17
+*vim_ref.txt* For Vim version 4.4. Last modification: 1996 Sep 12
VIM REFERENCE MANUAL
@@ -130,7 +130,9 @@ to the name of the help file, so you can put it in any place you like.
CTRL-{char} {char} typed as a control character; that is, typing {char}
while holding the CTRL key down. The case of {char} does not
- matter; thus CTRL-A and CTRL-a are equivalent.
+ matter; thus CTRL-A and CTRL-a are equivalent. But on some
+ terminals, using the SHIFT key will produce another code,
+ don't use it then.
'option' An option, or parameter, that can be set to a value, is
enclosed in single quotes. See chapter 19, |options|.
@@ -169,6 +171,10 @@ notation meaning equivalent decimal value(s)
<End> end *end*
<PageUp> page-up *page_up* *page-up*
<PageDown> page-down *page_down* *page-down*
+<kHome> keypad home (upper left) *keypad_home*
+<kEnd> keypad end (lower left) *keypad_end*
+<kPageUp> keypad page-up (upper right) *keypad_page_up*
+<kPageDown> keypad page-down (lower right) *keypad_page_down*
<S-...> shift-key *shift*
<C-...> control-key *control* *ctrl*
<M-...> alt-key or meta-key *meta* *alt*
@@ -180,10 +186,17 @@ available on a few terminals. On the Amiga, shifted function key 10 produces
a code (CSI) that is also used by key sequences. It will be recognized only
after typing another key.
-Note: There are two codes for the delete key. 127 is the ASCII value for the
-delete key, which is always recognized. Some delete keys send another value,
-in which case this value is obtained from the termcap entry "kD". Both values
-have the same effect. Also see |:fixdel|.
+Note: There are two codes for the delete key. 127 is the decimal ASCII value
+for the delete key, which is always recognized. Some delete keys send another
+value, in which case this value is obtained from the termcap entry "kD". Both
+values have the same effect. Also see |:fixdel|.
+
+Note: The keypad keys are used in the same way as the corresponding "normal"
+keys. For example, <kHome> has the same effect as <Home>. If a keypad key
+sends the same raw key code as it non-keypad equivalent, it will be recognized
+as the non-keypad code. For example, when <kHome> sends the same code as
+<Home>, when pressing <kHome> Vim will think <Home> was pressed. Mapping
+<kHome> will not work then.
*<>*
Some of the examples are given in the <> notation. The rules are:
@@ -201,9 +214,14 @@ Some of the examples are given in the <> notation. The rules are:
<M-A> Meta- A ('A' with bit 8 set)
<t_kd> "kd" termcap entry (cursor down key)
-If you want to use this notation in Vim, you have to remove the 'B' flag from
-'cpoptions' and make sure the '<' flag is excluded (it already is by default).
+If you want to use the full <> notation in Vim, you have to remove the 'B'
+flag from 'cpoptions' and make sure the '<' flag is excluded (it already is by
+default).
:set cpo=ceFs
+If you have the 'B' flag in 'cpoptions', then <> notation mostly still works,
+but you can't escape the special meaning of key names in <> with a backslash.
+To distinguish using <> with and without the 'B' flag, it's called full <>
+notation if the 'B' flag is excluded.
For mapping, abbreviation and menu commands you can then copy-paste the
examples and use them directly. Or type them literally, including the '<' and
'>' characters. This does NOT work for other commands, like ":set" and
@@ -717,6 +735,16 @@ can be used to load this information. You could even have different viminfos
for different types of files (e.g., C code) and load them based on the file
name, using the ":autocmd" command (see |:autocmd|).
+ *viminfo_errors*
+When Vim detects an error while reading a viminfo file, it will not overwrite
+that file. If there are more than 10 errors, Vim stops reading the viminfo
+file. This was done to avoid accidently destroying a file when the filename
+of the viminfo file is wrong. This could happen when accidently typing "vim
+-i file" when you wanted "vim -v file" (yes, somebody accidently did that!).
+If you want to overwrite a viminfo file with an error in it, you will either
+have to fix the error, or delete the file (while Vim is running, so most of
+the information will be restored).
+
*:rv* *:rviminfo*
:rv[iminfo][!] [file] Read from viminfo file [file] (default: see above).
If [!] is given, then any information that is
@@ -1186,7 +1214,7 @@ Completing keywords in current file *compl_current*
The keys CTRL-N and CTRL-P can be used to complete the keyword that is in
front of the cursor. This is useful if you are writing a program that has
complicated variable names, and you want to copy a name from the text before
-of after the cursor.
+or after the cursor.
If there is a keyword in front of the cursor (a name made out of alphabetic
characters and characters in 'iskeyword'), it is used as the search pattern,
@@ -1351,12 +1379,12 @@ move around in the command line with the left and right cursor keys. With the
Note that if your keyboard does not have working cursor keys or any of the
other special keys, you can use ":cnoremap" to define another key for them.
For example, to define tcsh style editing keys: *tcsh-style*
- :cnoremap ^A <Home>
- :cnoremap ^F <Right>
- :cnoremap ^B <Left>
- :cnoremap ^[b <S-Left>
- :cnoremap ^[f <S-Right>
-(All ^x characters entered with CTRL-V CTRL-x, <xx> typed literally).
+ :cnoremap <C-A> <Home>
+ :cnoremap <C-F> <Right>
+ :cnoremap <C-B> <Left>
+ :cnoremap <Esc>b <S-Left>
+ :cnoremap <Esc>f <S-Right>
+(<> notation |<>|; type all this literally)
*cmdline_history*
The command lines that you enter are remembered in a history table. You can
@@ -1590,10 +1618,12 @@ line. The commands ":global", "vglobal", ":!", ":r !", ":w !", ":help" and
":autocmd" see the '|' as their argument, and can therefore not be followed by
another command. If you want '|' to be included in one of the other commands,
precede it with '\'. Note that this is confusing (inherited from Vi). With
-":g" the '|' is included in the command, with ":s" it is not. There is one
-execption: When the 'b' flag is present in 'cpoptions', with the ":map" and
-":abbr" commands and friends CTRL-V needs to be used instead of '\'. See also
-|map_bar|.
+":g" the '|' is included in the command, with ":s" it is not.
+
+There is one exception: When the 'b' flag is present in 'cpoptions', with the
+":map" and ":abbr" commands and friends CTRL-V needs to be used instead of
+'\'. You can also use "<Bar>" instead. See also |map_bar|.
+
Examples:
:!ls | wc view the output of two commands
:r !ls | wc insert the same output in the text
@@ -1743,7 +1773,10 @@ order):
:h Head of the file name (the last component and any
separators removed). Cannot be used with :e, :r or :t.
Can be repeated to remove several components at the end.
- When there is no head the result is empty.
+ When the file name is an absolute path (starts with "/" for
+ Unix; "x:\" for MS-DOS, WIN32, OS/2; "drive:" for Amiga),
+ that part is not removed. When there is no head (path is
+ relative to current directory) the result is empty.
:t Tail of the file name (last component of the name). Must
precede any :r or :e.
:r Root of the file name (the last extension removed). When
@@ -2042,6 +2075,49 @@ Abbreviations are disabled if the 'paste' option is on.
:cabc[lear] Remove all abbreviations for Command-line mode. {not
in Vi}
+ *using_CTRL-V*
+It is possible to use special characters in the rhs of an abbreviation.
+CTRL-V has to be used to avoid the special meaning of most non printable
+characters. How many CTRL-Vs need to be typed depends on how you enter the
+abbreviation. This also applies to mappings. Let's use an example here.
+
+Suppose you want to abbreviate "esc" to enter an <Esc> character. When you
+type the ":ab" command in Vim, you have to enter this: (here ^V is a CTRL-V
+and ^[ is <Esc>)
+
+You type: ab esc ^V^V^V^V^V^[
+
+ All keyboard input is subjected to ^V quote interpretation, so
+ the first, third, and fifth ^V characters simply allow the second,
+ and fourth ^Vs, and the ^[, to be entered into the command line.
+
+You see: ab esc ^V^V^[
+
+ The command line contains two actual ^Vs before the ^[. This is
+ how it should appear in your .exrc file, if you choose to go that
+ route. The first ^V is there to quote the second ^V; the :ab
+ command uses ^V as its own quote character, so you can include quoted
+ whitespace or the | character in the abbreviation. The :ab command
+ doesn't do anything special with the ^[ character, so it doesn't need
+ to be quoted. (Although quoting isn't harmful; that's why typing 7
+ [but not 8!] ^Vs works.)
+
+Stored as: esc ^V^[
+
+ After parsing, the abbreviation's short form ("esc") and long form
+ (the two characters "^V^[") are stored in the abbreviation table.
+ If you give the :ab command with no arguments, this is how the
+ abbreviation will be displayed.
+
+ Later, when the abbreviation is expanded because the user typed in
+ the word "esc", the long form is subjected to the same type of
+ ^V interpretation as keyboard input. So the ^V protects the ^[
+ character from being interpreted as the "exit input-mode" character.
+ Instead, the ^[ is inserted into the text.
+
+Expands to: ^[
+
+[example given by Steve Kirkendall]
4.7 Digraphs *digraphs*
@@ -2831,6 +2907,11 @@ ZZ Write current file, if modified, and exit (same as
current file, the file is written if it was modified
and the window is closed).
+ *ZQ*
+ZQ Quit current file and exit (same as ":q!"). (Note: If
+ there are several windows for the current file, only
+ the window is closed).
+
*timestamp*
Vim remembers the timestamp of the file when you start editing it. When you
write a file the timestamp is checked. If the file has been changed since you
@@ -2932,30 +3013,39 @@ match the error messages from your compiler (see below).
The following commands can be used if you are in QuickFix mode:
*:cc*
-:cc [nr] Display error [nr]. If [nr] is omitted, the same
- error is displayed again. {not in Vi}
+:cc[!] [nr] Display error [nr]. If [nr] is omitted, the same
+ error is displayed again. Without [!] this doesn't
+ work when jumping to another buffer, the current buffer
+ has been changed, there is the only window for the
+ buffer and both 'hidden' and 'autowrite' are off.
+ When jumping to another buffer with [!] any changes to
+ the current buffer are lost, unless 'hidden' is set or
+ there is another window for this buffer. {not in Vi}
*:cn* *:cnext*
-:[count]cn[ext] Display the [count] next error in the list that
+:[count]cn[ext][!] Display the [count] next error in the list that
includes a file name. If there are no file names at
- all, go the the [count] next error. {not in Vi}
+ all, go the the [count] next error. See |:cc| for
+ [!]. {not in Vi}
-:[count]cN[ext] *:cp* *:cprevious* *:cN* *:cNext*
-:[count]cp[revious] Display the [count] previous error in the list that
+:[count]cN[ext][!] *:cp* *:cprevious* *:cN* *:cNext*
+:[count]cp[revious][!] Display the [count] previous error in the list that
includes a file name. If there are no file names at
- all, go the the [count] previous error. {not in Vi}
+ all, go the the [count] previous error. See |:cc| for
+ [!]. {not in Vi}
*:cq* *:cquit*
:cq[uit] Quit Vim with an error code, so that the compiler
will not compile the same file again. {not in Vi}
*:cf* *:cfile*
-:cf[ile] [errorfile] Read the error file and jump to the first error.
+:cf[ile][!] [errorfile] Read the error file and jump to the first error.
This is done automatically when Vim is started with
the -e option. You can use this command when you
keep Vim running while compiling. If you give the
name of the errorfile, the 'errorfile' option will
- be set to [errorfile] {not in Vi}
+ be set to [errorfile]. See |:cc| for [!]. {not in
+ Vi}
*:cl* *:clist*
:cl[ist] List all errors that inlcude a file name. {not in Vi}
@@ -3176,7 +3266,7 @@ considered part of the command.
Show the auto-commands associated with {event} and
{pat}.
-:au[tocmd] * {pat} Show the auto-commands associated with pat} for all
+:au[tocmd] * {pat} Show the auto-commands associated with {pat} for all
events.
:au[tocmd] {event} Show all auto-commands for {event}.
@@ -3206,6 +3296,7 @@ considered part of the command.
match the right pattern, after changing settings, or
to execute autocommands for a certain event.
+ *autocommand-events*
These events are recognized. Case is ignored, for example "BUFread" and
"bufread" can be used instead of "BufRead".
@@ -3216,13 +3307,13 @@ BufNewFile When starting to edit a file that doesn't
*BufReadPre*
BufReadPre When starting to edit a new buffer, before
reading the file into the buffer. Not used
- when starting to edit a new file.
+ when the file doesn't exist.
*BufRead* *BufReadPost*
BufRead or BufReadPost When starting to edit a new buffer, after
reading the file into the buffer, before
executing the modelines. This does NOT work
- for ":r file". Not used when starting to edit
- a new file.
+ for ":r file". Not used when the file doesn't
+ exist.
*FileReadPre*
FileReadPre Before reading a file with a ":read" command.
*FileReadPost*
@@ -3298,11 +3389,16 @@ BufReadPre BufReadPost starting to edit an existing file
FilterReadPre FilterReadPost read the temp file with filter output
FileReadPre FileReadPost any other file read
+Note that the autocommands for the *ReadPre and *Filter* events are not
+allowed to change the current buffer. You will get an error message if this
+happens anyway. This is to prevent the file to be read into the wrong buffer.
+
Before the *ReadPre event the '[ mark is set to the line just above where the
new lines will be inserted.
Before the *ReadPost event the '[ mark is set to the first line that was just
read, the '] mark to the last line.
Careful: '[ and '] will change when using commands that change the buffer.
+
"<afile>" can be used for the file name that is being read, in commands where
a file name is expected (where you can also use "%" for the current file
name) |:<afile>|.
@@ -3326,9 +3422,18 @@ Note that the *WritePost commands should undo any changes to the buffer that
were caused by the *WritePre commands, otherwise writing the file will have
the side effect of changing the buffer.
-Before the *WritePre event the '[ mark is set to the first line that will be
-written, the '] mark to the last line.
+Before executing the autocommands, the buffer from where the lines are to be
+written is temporarily made the current buffer. Unless the autocommands
+change the current buffer, or delete the previously current buffer, the
+previously current buffer is made the current buffer again.
+
+The *WritePre and *AppendPre autocommands must not delete the buffer from
+where the lines are to be written.
+
+Before executing the *WritePre and *AppendPre autocommands the '[ mark is set
+to the first line that will be written, the '] mark to the last line.
Careful: '[ and '] will change when using commands that change the buffer.
+
"<afile>" can be used for the file name that is being written, in commands
where a file name is expected (where you can also use "%" for the current file
name) |:<afile>|.
@@ -3369,12 +3474,19 @@ There is currently no way to disable the autocommands. If you want to write a
file without executing the autocommands for that type of file, write it under
another name and rename it with a shell command.
-Note: When doing a ":read file" command and the last line in the file does not
-have an end-of-line character, this is remembered. When executing the
-FileReadPost autocommands and the same line is written again as the last line
-in a file, no end-of-line character is written if 'binary' is set. This makes
-a filter command on the just read lines write the same file as was read.
+Note: When reading a file (with ":read file" or with a filter command) and the
+last line in the file does not have an end-of-line character, this is
+remembered. At the next write (with ":write file" or with a filter command),
+if the same line is written again as the last line in a file AND 'binary' is
+set, no end-of-line character is written. This makes a filter command on the
+just read lines write the same file as was read, and makes a write command on
+just filtered lines write the same file as was read from the filter. For
+example, another way to write a compressed file:
+ :autocmd FileWritePre *.gz set bin|'[,']!gzip
+ :autocmd FileWritePost *.gz undo|set nobin
+
+ *autocommand-pattern*
Multiple patterns may be given separated by commas. Here are some examples:
:autocmd BufRead * set tw=79 nocin ic infercase fo=2croq
@@ -3437,6 +3549,9 @@ against the full file name. For example:
:autocmd BufRead */vim/src/* set wrap
+Note that using ~ in a file name (for home directory) doesn't work. Use a
+pattern that matches the full path name, for example "*home/user/.cshrc".
+
6. Cursor motions *cursor_motions*
=================
@@ -3693,12 +3808,14 @@ ge Backward to the end of word [count] (inclusive).
*gE*
gE Backward to the end of WORD [count] (inclusive).
- *word* *WORD*
-These commands move over words or WORDS. A word consists of a sequence of
-letters, digits and underscores, or a sequence of other non-blank
-characters, separated with white space (spaces, tabs, end of line). A WORD
-consists of a sequence of non-blank characters, separated with white space.
-An empty line is also considered to be a word and a WORD.
+These commands move over words or WORDS.
+ *word*
+A word consists of a sequence of letters, digits and underscores, or a
+sequence of other non-blank characters, separated with white space (spaces,
+tabs, end of line). This can be changed with the 'iskeyword' option.
+ *WORD*
+A WORD consists of a sequence of non-blank characters, separated with white
+space. An empty line is also considered to be a word and a WORD.
Special case: "cw" and "cW" are treated like "ce" and "cE" if the cursor is
on a non-blank. This is because "cw" is interpreted as change-word, and a
@@ -3767,9 +3884,9 @@ first column). A section boundary is also a paragraph boundary. Note that
this does not include a '{' or '}' in the first column.
*section*
-A section begins after a form-feed in the first column and at each of a set
-of section macros, specified by the pairs of characters in the 'sections'
-option. The default is "SHNHH HUnhsh".
+A section begins after a form-feed (<C-L>) in the first column and at each of
+a set of section macros, specified by the pairs of characters in the
+'sections' option. The default is "SHNHH HUnhsh".
The "]" and "[" commands stop at the '{' or <}" in the first column. This is
useful to find the start or end of a function in a C program. Note that the
@@ -3887,11 +4004,16 @@ N Repeat the latest "/" or "?" [count] times in
*star*
* Search forward for the [count]'th occurrence of the
- keyword after or under the cursor (exclusive). Only
- whole keywords are search for, like with the command
- "/\<keyword\>". If there is no keyword after or
- under the cursor, any non-blank word is used to
- search for. {not in Vi}
+ word nearest to the cursor. The word used for the
+ search is the first of:
+ 1. the keyword under the cursor |'iskeyword'|
+ 2. the first keyword after the cursor, in the
+ current line
+ 3. the non-blank word under the cursor
+ 4. the first non-blank word after the cursor,
+ in the current line
+ Only whole keywords are searched for, like with the
+ command "/\<keyword\>". (exclusive) {not in Vi}
*#*
# Same as "*", but search backward. The English pound
@@ -3907,13 +4029,6 @@ g# Like "#", but don't put "\<" and "\>" around the word.
This makes the search also find matches that are not a
whole word. {not in Vi}
- HINT: If you want to search for something else than a
- whole word, you could use these mappings, to search
- for Visually highlighted text:
- :vmap / y/<C-R>"<CR>
- :vmap ? y?<C-R>"<CR>
- (<> notation, see |<>|).
-
*gd*
gd Goto local Declaration. When the cursor is on a local
variable, this command will jump to its declaration.
@@ -3939,7 +4054,9 @@ gD Goto global Declaration. When the cursor is on a
CTRL-C Interrupt current (search) command.
While typing the search pattern the current match will be shown if the
-'incsearch' option is on.
+'incsearch' option is on. Remember that you still have to finish the search
+command with <CR> to actually position the cursor at the displayed match. Or
+use <Esc> to abandon the search.
These commands search for the specified pattern. With "/" and "?" an
additional offset may be given. There are two types of offsets: line offsets
@@ -4013,15 +4130,17 @@ TOP" is given when searching backwards or forwards respectively. This can be
switched off by setting the 's' flag in the 'shortmess' option. The highlight
method 'w' is used for this message (default: standout).
-The "*" and "#" commands search for the keyword currently under the cursor.
-If there is no keyword under the cursor, the first one to the right is used.
-This keyword may only contain letters and characters in 'iskeyword'. Note
-that if you type with ten fingers, the characters are easy to remember: the
-"#" is under your left hand middle finger (search to the left and up) and
-the "*" is under your right hand middle finger (search to the right and
-down). If there is no keyword under or after the cursor, a search is done
-for any word under or after the cursor. Blanks (<Tab>s and/or <Space>s) are
-then recognized as delimiters for the word.
+The "*", "#", "g*" and "g#" commands look for a word near the cursor in this
+order, the first one that is found is used:
+- The keyword currently under the cursor.
+- The first keyword to the right of the cursor, in the same line.
+- The WORD currently under the cursor.
+- The first WORD to the right of the cursor, in the same line.
+The keyword may only contain letters and characters in 'iskeyword'.
+The WORD may contain any non-blanks (<Tab>s and/or <Space>s).
+Note that if you type with ten fingers, the characters are easy to remember:
+the "#" is under your left hand middle finger (search to the left and up) and
+the "*" is under your right hand middle finger (search to the right and down).
The definition of a pattern: *search_pattern*
@@ -4029,76 +4148,75 @@ The definition of a pattern: *search_pattern*
Patterns may contain special characters, depending on the setting of the
'magic' option.
+ */bar* */\bar*
1. A pattern is one or more branches, separated by "\|". It matches anything
- that matches one of the branches. Example: "foo\|bar" matches "foo" and
- "bar".
+ that matches one of the branches. Example: "foo\|beep" matches "foo" and
+ "beep".
2. A branch is one or more pieces, concatenated. It matches a match for the
- first, followed by a match for the second, etc. Example: "foo[0-9]bar",
- first match "foo", then a digit and then "bar".
+ first, followed by a match for the second, etc. Example: "foo[0-9]beep",
+ first match "foo", then a digit and then "beep".
3. A piece is an atom, possibly followed by:
- 'magic' 'nomagic'
- option option
- * \* matches 0 or more of the preceding atom
- \+ \+ matches 1 or more of the preceding atom {not
- in Vi}
- \= \= matches 0 or 1 of the preceding atom {not in
- Vi}
+ magic nomagic
+ */star* */\star*
+ * \* matches 0 or more of the preceding atom
+ */\+*
+ \+ \+ matches 1 or more of the preceding atom {not in Vi}
+ */\=*
+ \= \= matches 0 or 1 of the preceding atom {not in Vi}
+
Examples:
- .* .\* matches anything, also empty string
- ^.\+$ ^.\+$ matches any non-empty line
- foo\= foo\= matches "fo" and "foo"
+ .* .\* matches anything, also empty string
+ ^.\+$ ^.\+$ matches any non-empty line
+ foo\= foo\= matches "fo" and "foo"
4. An atom can be:
- One of these five:
- magic nomagic
- ^ ^ at beginning of pattern, matches start of
- line
- $ $ at end of pattern or in front of "\|",
- matches end of line
- . \. matches any single character
- \< \< matches the beginning of a word
- \> \> matches the end of a word
- \i \i matches any identifier character (see
- 'isident' option) {not in Vi}
- \I \I like "\i", but excluding digits {not in Vi}
- \k \k matches any keyword character (see
- 'iskeyword' option) {not in Vi}
- \K \K like "\k", but excluding digits {not in Vi}
- \f \f matches any file name character (see
- 'isfname' option) {not in Vi}
- \F \F like "\f", but excluding digits {not in Vi}
- \p \p matches any printable character (see
- 'isprint' option) {not in Vi}
- \P \P like "\p", but excluding digits {not in Vi}
- \e \e <Esc>
- \t \t <Tab>
- \r \r <CR>
- \b \b <BS>
- ~ \~ matches the last given substitute pattern
- \(\) \(\) A pattern enclosed by escaped parentheses
- (e.g., "\(^a\)") matches that pattern
- x x A single character, with no special meaning,
- matches itself
- \x \x A backslash followed by a single character,
- with no special meaning, matches the single
- character
- [] \[] A range. This is a sequence of characters
- enclosed in "[]" or "\[]". It matches any
- single character from the sequence. If the
- sequence begins with "^", it matches any
- single character NOT in the sequence. If two
- characters in the sequence are separated by
- '-', this is shorthand for the full list of
- ASCII characters between them. E.g., "[0-9]"
- matches any decimal digit. To include a
- literal "]" in the sequence, make it the
- first character (following a possible "^").
- E.g., "[]xyz]" or "[^]xyz]". To include a
- literal '-', make it the first or last
- character.
+ magic nomagic
+ ^ ^ at beginning of pattern, matches start of line */^*
+ $ $ at end of pattern or in front of "\|", */$*
+ matches end of line
+ . \. matches any single character */.* */\.*
+ \< \< matches the beginning of a word */\<*
+ \> \> matches the end of a word */\>*
+ \i \i matches any identifier character (see */\i*
+ 'isident' option) {not in Vi}
+ \I \I like "\i", but excluding digits {not in Vi} */\I*
+ \k \k matches any keyword character (see */\k*
+ 'iskeyword' option) {not in Vi}
+ \K \K like "\k", but excluding digits {not in Vi} */\K*
+ \f \f matches any file name character (see */\f*
+ 'isfname' option) {not in Vi}
+ \F \F like "\f", but excluding digits {not in Vi} */\F*
+ \p \p matches any printable character (see */\p*
+ 'isprint' option) {not in Vi}
+ \P \P like "\p", but excluding digits {not in Vi} */\P*
+ \e \e <Esc> */\e*
+ \t \t <Tab> */\t*
+ \r \r <CR> */\r*
+ \b \b <BS> */\b*
+ ~ \~ matches the last given substitute string */~* */\~*
+ \(\) \(\) A pattern enclosed by escaped parentheses */\(\)*
+ (e.g., "\(^a\)") matches that pattern
+ x x A single character, with no special meaning,
+ matches itself
+ \x \x A backslash followed by a single character, */\*
+ with no special meaning, matches the single
+ character
+ [] \[] A range. This is a sequence of characters */[]*
+ enclosed in "[]" or "\[]". It matches any */\[]*
+ single character from the sequence. If the
+ sequence begins with "^", it matches any
+ single character NOT in the sequence. If two
+ characters in the sequence are separated by '-', this
+ is shorthand for the full list of ASCII characters
+ between them. E.g., "[0-9]" matches any decimal
+ digit. To include a literal "]" in the sequence, make
+ it the first character (following a possible "^").
+ E.g., "[]xyz]" or "[^]xyz]". To include a literal
+ '-', make it the first or last character.
If the 'ignorecase' option is on, the case of letters is ignored.
@@ -5501,7 +5619,7 @@ magic nomagic action
\U following characters made uppercase
\l next character made lowercase
\L following characters made lowercase
- \e end of /u, /U, /l and /L
+ \e end of /u, /U, /l and /L (NOTE: not <Esc>!)
\E end of /u, /U, /l and /L
<CR> split line in two at this point
\r idem
@@ -6097,6 +6215,11 @@ be replaced with spaces to make this happen. However, if the width of the
block is not a multiple of a <Tab> width and the text after the inserted
block contains <Tab>s, that text may be misaligned.
+Rationale: In Vi the "y" command followed by a backwards motion would
+ sometimes not move the cursor to the first yanked character,
+ because redisplaying was skipped. In Vim it always moves to
+ the first character, like specified by Posix.
+
There are five types of registers: *registers*
- The unnamed register "" *quote_quote* *quotequote*
- 10 numbered registers "0 to "9 *quote_number* *quote0*
@@ -6265,7 +6388,7 @@ linewise Visual Visual blockwise Visual Normal
For moving the end of the block many commands can be used, but you cannot
use Ex commands, commands that make changes or abandon the file. Commands
-(starting with) ".pPiIaAO&", CTRL-^, "ZZ", CTRL-], CTRL-T, CTRL-R, CTRL-I
+(starting with) ".pPiIaAO&", CTRL-^, "Z", CTRL-], CTRL-T, CTRL-R, CTRL-I
and CTRL-O cause a beep and Visual mode continues.
If Visual mode is not active and the "v", "V" or CTRL-V is preceded with a
@@ -6462,6 +6585,17 @@ ga Print the ascii value of the character under the
is higher than the current Vim version this will
result in an error message. {not in Vi}
+:if *:if* *:endif*
+:endif Every Ex command in between the ":if" and ":endif" is
+ ignored. These two commands are just to allow for
+ future expansions in a backwards compatible way.
+ Nesting is allowed. In Vim version 5 you are expected
+ to be able to do something like
+ :if version >= "5.0"
+ : version-5-specific-command
+ :endif
+ {not in Vi}
+
*K*
K Run a program to lookup the keyword under the
cursor. The name of the program is given with the
@@ -6817,7 +6951,9 @@ with a space.
*map_backslash*
Note that only CTRL-V is mentioned here as a special character for mappings
and abbreviations. When 'cpoptions' does not contain 'B', a backslash can
-also be used like CTRL-V. The <> notation can be fully used then |<>|.
+also be used like CTRL-V. The <> notation can be fully used then |<>|. But
+you cannot use "<C-V>" like CTRL-V to escape the special meaning of what
+follows.
*map_space_in_lhs*
To include a space in {lhs} precede it with a CTRL-V (type two CTRL-Vs for
@@ -6827,24 +6963,36 @@ If you want a {rhs} that starts with a space, precede {rhs} with a single
CTRL-V (you have to type CTRL-V two times).
*map_empty_rhs*
You can create an empty {rhs} by typing nothing after a single CTRL-V (you
-have to type CTRL-V two times).
+have to type CTRL-V two times). Unfortunately, you cannot do this in a vimrc
+file.
- *map_bar*
It is not possible to put a comment after this command, because the '"'
-character is considered to be part of the {rhs}. To put a '|' in {rhs}
-escape it with a backslash or a CTRL-V (to get one CTRL-V you have to type
-it twice). When 'b' is present in 'cpoptions', only CTRL-V can be used, "\|"
-will be recognized as a mapping ending in a '\' and then another command. This
-is vi compatible, but unlogical. Summary:
- :map _l :!ls \| more^M works in Vim when 'b' is not in 'cpo'
- :map _l :!ls ^V| more^M works always, in Vim and vi
+character is considered to be part of the {rhs}.
+
+ *map_bar*
+Since the '|' character is used to separate a map command from the next
+command, you will have to do something special to include a '|' in {rhs}.
+There are three methods:
+ use works when example
+ <Bar> '<' is not in 'cpoptions' :map _l :!ls <Bar> more^M
+ \| 'b' is not in 'cpoptions' :map _l :!ls \| more^M
+ ^V| always, in Vim and Vi :map _l :!ls ^V| more^M
+
+(here ^V stands for CTRL-V; to get one CTRL-V you have to type it twice; you
+cannot use the <> notation "<C-V>" here).
+
+All three work when you use the default setting for 'cpoptions'.
+
+When 'b' is present in 'cpoptions', "\|" will be recognized as a mapping
+ending in a '\' and then another command. This is Vi compatible, but
+unlogical when compared to other commands.
To avoid mapping of the characters you type in insert or Command-line mode,
type a CTRL-V first. The mapping in Insert mode is disabled if the 'paste'
option is on.
Note that when an error is enountered (that causes an error message) the rest
-of the mapping is not executed. This is vi-compatible.
+of the mapping is not executed. This is Vi-compatible.
Note that the second character (argument) of the commands @zZtTfF[]rm'`"v
and CTRL-X is not mapped. This was done to be able to use all the named
@@ -6875,10 +7023,11 @@ included in {rhs} is encountered it will be replaced with {rhs}, and so on.
This makes it possible to repeat a command an infinite number of times. The
only problem is that the only way to stop this is by causing an error. The
macros to solve a maze uses this, look there for an example. There is one
-exception: If the {rhs} starts with {lhs}, that part is not mapped again.
+exception: If the {rhs} starts with {lhs}, the first character is not mapped
+again (this is Vi compatible).
For example:
- :map a ab
-will execute the "a" command and insert a 'b' in the text. The 'a' in the
+ :map ab abcd
+will execute the "a" command and insert "bcd" in the text. The "ab" in the
{rhs} will not be mapped again.
If you want to exchange the meaning of two keys you should use the :noremap
@@ -7464,9 +7613,11 @@ backupdir (bdir) string (default for Amiga: ".,t:",
where this is possible.
- Empty means that no backup file will be created ('patchmode' is
impossible!).
- - A directory '.' means to put the backup file in the same directory
- as the edited file. Characters after the "." are ignored, "./temp"
- is handled in the same way as ".".
+ - A directory "." means to put the backup file in the same directory
+ as the edited file.
+ - A directory starting with "./" (or ".\" for MS-DOS et.al.) means to
+ put the backup file relative to where the edited file is. The
+ leading "." is replaced with the path name of the edited file.
- Spaces after the comma are ignored, other spaces are considered part
of the directory name. To have a space at the start of a directory
name, precede it with a backslash.
@@ -7716,7 +7867,7 @@ cpoptions (cpo) string (default "BceFs", unless compiled with
set when the buffer is created.
S Set buffer options always when entering a buffer
(except 'readonly' and 'textmode'). This is the
- (most) vi compatible setting.
+ (most) Vi compatible setting.
The options are set to the values in the current
buffer. When you change an option and go to another
buffer, the value is copied. Effectively makes the
@@ -7725,8 +7876,7 @@ cpoptions (cpo) string (default "BceFs", unless compiled with
's' 'S' copy buffer options
no no when buffer created
yes no when buffer first entered (default)
- no yes each time when buffer entered (vi comp.)
- yes yes when buffer created or first entered
+ X yes each time when buffer entered (vi comp.)
t Search pattern for the tag command is remembered for
"n" command. Otherwise Vim only puts the pattern in
@@ -7752,7 +7902,7 @@ cpoptions (cpo) string (default "BceFs", unless compiled with
match the last one. When this flag is not included,
parens inside single and double quotes are treated
specially. When matching a paren outside of quotes,
- everyting inside quotes is ignored. When matching a
+ everything inside quotes is ignored. When matching a
paren inside quotes, it will find the matching one (if
there is one). This works very well for C programs.
@@ -7797,9 +7947,11 @@ directory (dir) string (default for Amiga: ".,t:",
possible.
- Empty means that no swap file will be used (recovery is
impossible!).
- - A directory '.' means to put the swap file in the same directory as
- the edited file. Everything after the "." is ignored, "./temp" is
- handled in the same way as ".".
+ - A directory "." means to put the swap file in the same directory as
+ the edited file.
+ - A directory starting with "./" (or ".\" for MS-DOS et.al.) means to
+ put the swap file relative to where the edited file is. The leading
+ "." is replaced with the path name of the edited file.
- Spaces after the comma are ignored, other spaces are considered part
of the directory name. To have a space at the start of a directory
name, precede it with a backslash.
@@ -7909,10 +8061,11 @@ expandtab (et) toggle (default off)
exrc toggle (default off)
global
{not in Vi}
- Enables the reading of .vimrc and .exrc in the current directory. If
- you switch this option on you should also consider setting the
- 'secure' option (see 3.4 |initialization|). Using a local .exrc or
- .vimrc is a potential security leak, use with care!
+ Enables the reading of .vimrc, .exrc and .gvimrc in the current
+ directory. If you switch this option on you should also consider
+ setting the 'secure' option (see 3.4 |initialization|). Using a local
+ .exrc, .vimrc or .gvimrc is a potential security leak, use with care!
+ also see |.vimrc| and |gui_init|.
*'formatoptions'* *'fo'*
formatoptions (fo) string (default "tcq", "vt" when compiled with
@@ -8134,7 +8287,10 @@ incsearch (is) toggle (default off)
While typing a search pattern, show immediately where the so far
typed pattern matches. The matched string is highlighted. If the
pattern is invalid or not found, nothing is shown. The screen will
- be updated often, this is only useful on fast terminals.
+ be updated often, this is only useful on fast terminals. Note that
+ the match will be shown, but the cursor is not actually positioned
+ there. You still need to finish the search command with <CR> to move
+ the cursor.
*'infercase'* *'inf'* *'noinfercase'* *'noinf'*
infercase (inf) toggle (default off)
@@ -8216,11 +8372,11 @@ iskeyword (isk) string (default for MS-DOS and Win32:
local to buffer
{not in Vi}
Keywords are used in searching and recognizing with many commands:
- "*", "[i", etc. See 'isfname' for a description of the format of this
- option. For C programs you could use "a-z,A-Z,48-57,_,.,-,>". For a
- help file it is set to all non-blank printable characters except '*',
- '"' and '|'. When the 'lisp' option is on the '-' character is always
- included.
+ "w", "*", "[i", etc. See 'isfname' for a description of the format of
+ this option. For C programs you could use "a-z,A-Z,48-57,_,.,-,>".
+ For a help file it is set to all non-blank printable characters except
+ '*', '"' and '|'. When the 'lisp' option is on the '-' character is
+ always included.
*'isprint'* *'isp'*
isprint (isp) string (default for MS-DOS and Win32: "@,~-255"
@@ -8677,6 +8833,18 @@ shell (sh) string (default $SHELL or "sh",
"csh -f". See |option_backslash| about including spaces and
backslashes. Environment variables are expanded |:set_env|.
+ *'shellcmdflag'* *'shcf'*
+shellcmdflag (shcf) string (default: "-c", MS-DOS and Win32, when 'shell'
+ does not contain "sh" somewhere: "/c")
+ global
+ {not in Vi}
+ Flag passed to the shell to execute "!" and ":!" commands; e.g.,
+ "bash.exe -c ls" or "command.com /c dir". For the MS-DOS-like
+ systems, the default is set according to the value of 'shell', to
+ reduce the need to set this option by the user. It's not used for
+ OS/2 (EMX figures this out itself). See |option_backslash| about
+ including spaces and backslashes. See |win32_shell| for Win32.
+
*'shellpipe'* *'sp'*
shellpipe (sp) string (default ">", "| tee", "|& tee" or "2>&1| tee")
global
@@ -8698,6 +8866,18 @@ shellpipe (sp) string (default ">", "| tee", "|& tee" or "2>&1| tee")
In the future pipes may be used for filtering and this option will
become obsolete (at least for Unix).
+ *'shellquote'* *'shq'*
+shellquote (shq) string (default: ""; MS-DOS and Win32, when 'shell'
+ contains "sh" somewhere: "\"")
+ global
+ {not in Vi}
+ Quoting character(s) passed to the shell to execute "!" and ":!"
+ commands. This is an empty string by default. Only known to be
+ useful for third-party shells on MS-DOS-like systems, such as the MKS
+ Korn Shell or bash, where it should be "\"". The default is adjusted
+ according the value of 'shell', to reduce the need to set this option
+ by the user. See |win32_shell| for Win32.
+
*'shellredir'* *'srr'*
shellredir (srr) string (default ">", ">&" or ">%s 2>&1")
global
@@ -8730,8 +8910,8 @@ shelltype (st) number (default 0)
4 and 5: use shell only for ':sh' command
When not using the shell, the command is executed directly.
- 0 and 2: use 'shell -c cmd' to start external commands
- 1 and 3: use 'shell cmd' to start external commands
+ 0 and 2: use "shell 'shellcmdflag' cmd" to start external commands
+ 1 and 3: use "shell cmd" to start external commands
*'shiftround'* *'sr'* *'noshiftround'* *'nosr'*
shiftround (sr) toggle (default off)
@@ -8785,12 +8965,12 @@ shortmess (shm) string (default "")
shortname (sn) toggle (default off)
local to buffer
{not in Vi}
- Filenames can be 8 characters plus one extension of 3 characters.
- Multiple dots in file names are not allowed. When this option is on,
- dots in filenames are replaced with underscores when adding an
- extension (".~" or ".swp"). This option is not available for
- MS-DOS and Win32, because then it would always be on. This option is
- useful when editing files on an MS-DOS compatible filesystem, e.g.,
+ Filenames are assumed to be 8 characters plus one extension of 3
+ characters. Multiple dots in file names are not allowed. When this
+ option is on, dots in filenames are replaced with underscores when
+ adding an extension (".~" or ".swp"). This option is not available
+ for MS-DOS and Win32, because then it would always be on. This option
+ is useful when editing files on an MS-DOS compatible filesystem, e.g.,
messydos or crossdos.
*'showbreak'* *'sbr'*
@@ -9063,7 +9243,7 @@ ttimeoutlen (ttm) number (default -1)
{not in Vi}
The time in milliseconds that is waited for a key code or mapped key
sequence to complete. Normally only 'timeoutlen' is used and
- 'ttimeoutline' is -1. When a different timeout value for key codes is
+ 'ttimeoutlen' is -1. When a different timeout value for key codes is
desired set 'ttimeoutlen' to a non-negative number.
ttimeoutlen mapping delay key code delay
@@ -9072,7 +9252,7 @@ ttimeoutlen (ttm) number (default -1)
The timeout only happens when the 'timeout' and 'ttimeout' options
tell so. A useful setting would be
- :set timeout timeoutlen=3000 ttimeloutlen=100
+ :set timeout timeoutlen=3000 ttimeoutlen=100
(time out on mapping after three seconds, time out on key codes after
a tenth of a second).
@@ -9097,6 +9277,19 @@ title toggle (default off, on when title can be restored)
title of the window should change back to what it should be after
exiting Vim (rather than using the "Thanks..." message).
+ *'titlelen'*
+titlelen number (default 85)
+ global
+ {not in Vi}
+ Gives the percentage of 'columns' to use for the length of the window
+ title. When the title is longer, only the end of the path name is
+ shown. A '>' character is used to indicate this. Using a percentage
+ makes this adapt to the width of the window. But it won't work
+ perfectly, because the actual number of characters available also
+ depends on the font used and other things in the title bar. When
+ 'titlelen' is zero the full path is used. Otherwise, values from 1 to
+ 30000 can be used.
+
*'ttybuiltin'* *'tbi'* *'nottybuiltin'* *'notbi'*
ttybuiltin (tbi) toggle (default on)
global
@@ -9215,8 +9408,8 @@ visualbell (vb) toggle (default off)
{not in Vi}
Use visual bell instead of beeping. The terminal code to display the
visual bell is given with 't_vb'. When no beep of flash is wanted,
- Does not work on the Amiga, you always get a screen flash. use ":set
- vb t_vb=". Also see 'errorbells'.
+ use ":set vb t_vb=". Does not work on the Amiga, you always get a
+ screen flash. Also see 'errorbells'.
*'warn'* *'nowarn'*
warn toggle (default on)
@@ -9447,6 +9640,15 @@ The default termcap entry for xterm on sun and other platforms does not
contain the entry for scroll regions. Add ":cs=\E[%i%d;%dr:" to the xterm
entry in /etc/termcap and everything should work.
+ *xterm_end_home_keys*
+On some systems (at least on FreeBSD with X386 3.1.2) the codes that the <End>
+and <Home> keys send contain a <Nul> character. To make these keys send the
+proper key code, add these lines to your ~/.Xdefaults file:
+
+*VT100.Translations: #override \n\
+ <Key>Home: string("0x1b") string("[7~") \n\
+ <Key>End: string("0x1b") string("[8~")
+
20.2 Terminal options *terminal_options*
@@ -9548,6 +9750,10 @@ Note: Use the <> form if possible
t_@7 <End> end key *t_@7* *'t_@7'*
t_kP <PageUp> page-up key *t_kP* *'t_kP'*
t_kN <PageDown> page-down key *t_kN* *'t_kN'*
+ t_K1 <kHome> keypad home key *t_K1* *'t_K1'*
+ t_K4 <kEnd> keypad end key *t_K4* *'t_K4'*
+ t_K3 <kPageUp> keypad page-up key *t_K3* *'t_K3'*
+ t_K5 <kPageDown> keypad page-down key *t_K5* *'t_K5'*
Note about t_so and t_mr: When the termcap entry "so" is not present the
entry for "mr" is used. And vice versa. The same is done for "se" and "me".
diff --git a/usr.bin/vim/doc/vim_rlh.txt b/usr.bin/vim/doc/vim_rlh.txt
index fd667d043aa..9f8dcbfbbe8 100644
--- a/usr.bin/vim/doc/vim_rlh.txt
+++ b/usr.bin/vim/doc/vim_rlh.txt
@@ -1,4 +1,4 @@
-*vim_rlh.txt* For Vim version 4.2. Last modification: 1996 June 11
+*vim_rlh.txt* For Vim version 4.4. Last modification: 1996 June 11
Right to Left and Hebrew Mapping for Vim *hebrew*
========================================
diff --git a/usr.bin/vim/doc/vim_tags b/usr.bin/vim/doc/vim_tags
index acd78b65659..a58adfe8025 100644
--- a/usr.bin/vim/doc/vim_tags
+++ b/usr.bin/vim/doc/vim_tags
@@ -324,8 +324,11 @@ $ vim_ref.txt /\*$\*
'sections' vim_ref.txt /\*'sections'\*
'secure' vim_ref.txt /\*'secure'\*
'sh' vim_ref.txt /\*'sh'\*
+'shcf' vim_ref.txt /\*'shcf'\*
'shell' vim_ref.txt /\*'shell'\*
+'shellcmdflag' vim_ref.txt /\*'shellcmdflag'\*
'shellpipe' vim_ref.txt /\*'shellpipe'\*
+'shellquote' vim_ref.txt /\*'shellquote'\*
'shellredir' vim_ref.txt /\*'shellredir'\*
'shelltype' vim_ref.txt /\*'shelltype'\*
'shiftround' vim_ref.txt /\*'shiftround'\*
@@ -337,6 +340,7 @@ $ vim_ref.txt /\*$\*
'showcmd' vim_ref.txt /\*'showcmd'\*
'showmatch' vim_ref.txt /\*'showmatch'\*
'showmode' vim_ref.txt /\*'showmode'\*
+'shq' vim_ref.txt /\*'shq'\*
'si' vim_ref.txt /\*'si'\*
'sidescroll' vim_ref.txt /\*'sidescroll'\*
'sj' vim_ref.txt /\*'sj'\*
@@ -374,6 +378,10 @@ $ vim_ref.txt /\*$\*
't_DL' vim_ref.txt /\*'t_DL'\*
't_F1' vim_ref.txt /\*'t_F1'\*
't_F2' vim_ref.txt /\*'t_F2'\*
+'t_K1' vim_ref.txt /\*'t_K1'\*
+'t_K3' vim_ref.txt /\*'t_K3'\*
+'t_K4' vim_ref.txt /\*'t_K4'\*
+'t_K5' vim_ref.txt /\*'t_K5'\*
't_RI' vim_ref.txt /\*'t_RI'\*
't_ZH' vim_ref.txt /\*'t_ZH'\*
't_ZR' vim_ref.txt /\*'t_ZR'\*
@@ -442,6 +450,7 @@ $ vim_ref.txt /\*$\*
'timeout' vim_ref.txt /\*'timeout'\*
'timeoutlen' vim_ref.txt /\*'timeoutlen'\*
'title' vim_ref.txt /\*'title'\*
+'titlelen' vim_ref.txt /\*'titlelen'\*
'tl' vim_ref.txt /\*'tl'\*
'tm' vim_ref.txt /\*'tm'\*
'to' vim_ref.txt /\*'to'\*
@@ -568,9 +577,39 @@ $ vim_ref.txt /\*$\*
.exrc vim_ref.txt /\*.exrc\*
.vimrc vim_ref.txt /\*.vimrc\*
/ vim_ref.txt /\*/\*
+/$ vim_ref.txt /\*/$\*
+/. vim_ref.txt /\*/.\*
//; vim_ref.txt /\*//;\*
/<CR> vim_ref.txt /\*/<CR>\*
+/[] vim_ref.txt /\*/[]\*
+/\ vim_ref.txt /\*/\\\*
+/\(\) vim_ref.txt /\*/\\(\\)\*
+/\+ vim_ref.txt /\*/\\+\*
+/\. vim_ref.txt /\*/\\.\*
+/\< vim_ref.txt /\*/\\<\*
+/\= vim_ref.txt /\*/\\=\*
+/\> vim_ref.txt /\*/\\>\*
+/\F vim_ref.txt /\*/\\F\*
+/\I vim_ref.txt /\*/\\I\*
+/\K vim_ref.txt /\*/\\K\*
+/\P vim_ref.txt /\*/\\P\*
+/\[] vim_ref.txt /\*/\\[]\*
+/\b vim_ref.txt /\*/\\b\*
+/\bar vim_ref.txt /\*/\\bar\*
+/\e vim_ref.txt /\*/\\e\*
+/\f vim_ref.txt /\*/\\f\*
+/\i vim_ref.txt /\*/\\i\*
+/\k vim_ref.txt /\*/\\k\*
+/\p vim_ref.txt /\*/\\p\*
+/\r vim_ref.txt /\*/\\r\*
+/\star vim_ref.txt /\*/\\star\*
+/\t vim_ref.txt /\*/\\t\*
+/\~ vim_ref.txt /\*/\\~\*
+/^ vim_ref.txt /\*/^\*
+/bar vim_ref.txt /\*/bar\*
+/star vim_ref.txt /\*/star\*
/vim/src/ vim_ref.txt /\*/vim/src/\*
+/~ vim_ref.txt /\*/~\*
0 vim_ref.txt /\*0\*
: vim_ref.txt /\*:\*
:! vim_ref.txt /\*:!\*
@@ -712,6 +751,7 @@ $ vim_ref.txt /\*$\*
:edit! vim_ref.txt /\*:edit!\*
:edit!_f vim_ref.txt /\*:edit!_f\*
:edit_f vim_ref.txt /\*:edit_f\*
+:endif vim_ref.txt /\*:endif\*
:ex vim_ref.txt /\*:ex\*
:exi vim_ref.txt /\*:exi\*
:exit vim_ref.txt /\*:exit\*
@@ -735,6 +775,7 @@ $ vim_ref.txt /\*$\*
:iabbrev vim_ref.txt /\*:iabbrev\*
:iabc vim_ref.txt /\*:iabc\*
:iabclear vim_ref.txt /\*:iabclear\*
+:if vim_ref.txt /\*:if\*
:ij vim_ref.txt /\*:ij\*
:ijump vim_ref.txt /\*:ijump\*
:il vim_ref.txt /\*:il\*
@@ -1140,6 +1181,7 @@ FileReadPost vim_ref.txt /\*FileReadPost\*
FileReadPre vim_ref.txt /\*FileReadPre\*
FileWritePost vim_ref.txt /\*FileWritePost\*
FileWritePre vim_ref.txt /\*FileWritePre\*
+Filter vim_ref.txt /\*Filter\*
FilterReadPost vim_ref.txt /\*FilterReadPost\*
FilterReadPre vim_ref.txt /\*FilterReadPre\*
FilterWritePost vim_ref.txt /\*FilterWritePost\*
@@ -1214,6 +1256,7 @@ X_vm vim_help.txt /\*X_vm\*
X_wi vim_help.txt /\*X_wi\*
X_wq vim_help.txt /\*X_wq\*
Y vim_ref.txt /\*Y\*
+ZQ vim_ref.txt /\*ZQ\*
ZZ vim_ref.txt /\*ZZ\*
[ vim_idx.txt /\*[\*
[# vim_ref.txt /\*[#\*
@@ -1276,7 +1319,10 @@ argument_list vim_ref.txt /\*argument_list\*
author vim_help.txt /\*author\*
auto_setting vim_ref.txt /\*auto_setting\*
auto_shortname vim_ref.txt /\*auto_shortname\*
+autocmd-<> vim_tips.txt /\*autocmd-<>\*
autocommand vim_ref.txt /\*autocommand\*
+autocommand-events vim_ref.txt /\*autocommand-events\*
+autocommand-pattern vim_ref.txt /\*autocommand-pattern\*
b vim_ref.txt /\*b\*
backspace vim_ref.txt /\*backspace\*
backspace_delete vim_40.txt /\*backspace_delete\*
@@ -1287,6 +1333,7 @@ backup_table vim_ref.txt /\*backup_table\*
bar vim_ref.txt /\*bar\*
bars vim_help.txt /\*bars\*
beep vim_ref.txt /\*beep\*
+buffer-menu vim_tips.txt /\*buffer-menu\*
bug_fixes vim_40.txt /\*bug_fixes\*
bugs vim_help.txt /\*bugs\*
builtin_terms vim_ref.txt /\*builtin_terms\*
@@ -1379,8 +1426,10 @@ deleting vim_ref.txt /\*deleting\*
dh vim_ref.txt /\*dh\*
digraph_table vim_digr.txt /\*digraph_table\*
digraphs vim_ref.txt /\*digraphs\*
+distribution vim_help.txt /\*distribution\*
dl vim_ref.txt /\*dl\*
doc_files vim_ref.txt /\*doc_files\*
+download vim_help.txt /\*download\*
dp vim_ref.txt /\*dp\*
drag_status_line vim_ref.txt /\*drag_status_line\*
ds vim_ref.txt /\*ds\*
@@ -1407,6 +1456,7 @@ fork vim_unix.txt /\*fork\*
format_bullet_list vim_tips.txt /\*format_bullet_list\*
format_comments vim_ref.txt /\*format_comments\*
formatting vim_ref.txt /\*formatting\*
+ftp vim_help.txt /\*ftp\*
function-key vim_ref.txt /\*function-key\*
function_key vim_ref.txt /\*function_key\*
g vim_idx.txt /\*g\*
@@ -1445,6 +1495,7 @@ gui_delete_menus vim_gui.txt /\*gui_delete_menus\*
gui_extras vim_gui.txt /\*gui_extras\*
gui_fork vim_gui.txt /\*gui_fork\*
gui_horiz_scroll vim_gui.txt /\*gui_horiz_scroll\*
+gui_init vim_gui.txt /\*gui_init\*
gui_intro vim_gui.txt /\*gui_intro\*
gui_menus vim_gui.txt /\*gui_menus\*
gui_mouse vim_gui.txt /\*gui_mouse\*
@@ -1560,6 +1611,7 @@ insert vim_ref.txt /\*insert\*
insert_expand vim_ref.txt /\*insert_expand\*
insert_index vim_idx.txt /\*insert_index\*
inserting vim_ref.txt /\*inserting\*
+into vim_dos.txt /\*into\*
intro vim_ref.txt /\*intro\*
j vim_ref.txt /\*j\*
jumplist vim_ref.txt /\*jumplist\*
@@ -1567,6 +1619,10 @@ k vim_ref.txt /\*k\*
key_codes_changed vim_40.txt /\*key_codes_changed\*
key_mapping vim_ref.txt /\*key_mapping\*
key_notation vim_ref.txt /\*key_notation\*
+keypad_end vim_ref.txt /\*keypad_end\*
+keypad_home vim_ref.txt /\*keypad_home\*
+keypad_page_down vim_ref.txt /\*keypad_page_down\*
+keypad_page_up vim_ref.txt /\*keypad_page_up\*
l vim_ref.txt /\*l\*
left_right_motions vim_ref.txt /\*left_right_motions\*
limits vim_ref.txt /\*limits\*
@@ -1705,6 +1761,10 @@ t_CS vim_ref.txt /\*t_CS\*
t_DL vim_ref.txt /\*t_DL\*
t_F1 vim_ref.txt /\*t_F1\*
t_F2 vim_ref.txt /\*t_F2\*
+t_K1 vim_ref.txt /\*t_K1\*
+t_K3 vim_ref.txt /\*t_K3\*
+t_K4 vim_ref.txt /\*t_K4\*
+t_K5 vim_ref.txt /\*t_K5\*
t_RI vim_ref.txt /\*t_RI\*
t_ZH vim_ref.txt /\*t_ZH\*
t_ZR vim_ref.txt /\*t_ZR\*
@@ -1822,6 +1882,7 @@ up_down_motions vim_ref.txt /\*up_down_motions\*
use_visual_cmds vim_40.txt /\*use_visual_cmds\*
useful-mappings vim_tips.txt /\*useful-mappings\*
usenet vim_help.txt /\*usenet\*
+using_CTRL-V vim_ref.txt /\*using_CTRL-V\*
v vim_ref.txt /\*v\*
v_! vim_ref.txt /\*v_!\*
v_: vim_ref.txt /\*v_:\*
@@ -1888,6 +1949,7 @@ vim_unix.txt vim_unix.txt /\*vim_unix.txt\*
vim_w32.txt vim_w32.txt /\*vim_w32.txt\*
vim_win.txt vim_win.txt /\*vim_win.txt\*
vimdev vim_help.txt /\*vimdev\*
+viminfo_errors vim_ref.txt /\*viminfo_errors\*
viminfo_file vim_ref.txt /\*viminfo_file\*
viminfo_file_marks vim_ref.txt /\*viminfo_file_marks\*
vimrc vim_ref.txt /\*vimrc\*
@@ -1895,6 +1957,9 @@ visual_block vim_ref.txt /\*visual_block\*
visual_index vim_idx.txt /\*visual_index\*
vt100_cursor_keys vim_ref.txt /\*vt100_cursor_keys\*
w vim_ref.txt /\*w\*
+win32_faq vim_w32.txt /\*win32_faq\*
+win32_shell vim_w32.txt /\*win32_shell\*
+win32_term vim_w32.txt /\*win32_term\*
window_contents vim_ref.txt /\*window_contents\*
window_size vim_ref.txt /\*window_size\*
word vim_ref.txt /\*word\*
@@ -1908,6 +1973,7 @@ x vim_ref.txt /\*x\*
xterm-screens vim_tips.txt /\*xterm-screens\*
xterm_copy_paste vim_ref.txt /\*xterm_copy_paste\*
xterm_cursor_keys vim_ref.txt /\*xterm_cursor_keys\*
+xterm_end_home_keys vim_ref.txt /\*xterm_end_home_keys\*
y vim_ref.txt /\*y\*
ye_option_gone vim_40.txt /\*ye_option_gone\*
yy vim_ref.txt /\*yy\*
diff --git a/usr.bin/vim/doc/vim_tips.txt b/usr.bin/vim/doc/vim_tips.txt
index 28ac34e8610..95c44523a76 100644
--- a/usr.bin/vim/doc/vim_tips.txt
+++ b/usr.bin/vim/doc/vim_tips.txt
@@ -1,4 +1,4 @@
-*vim_tips.txt* For Vim version 4.2. Last modification: 1996 June 16
+*vim_tips.txt* For Vim version 4.4. Last modification: 1996 Aug 30
Contents:
@@ -15,6 +15,7 @@ Useful mappings |useful-mappings|
Compressing the help files |gzip-helpfile|
Executing shell commands in a window |shell_window|
Pseudo-Ex mode |pseudo-Q|
+Using <> notation in autocommands |autocmd-<>|
Editing C programs *C-editing*
@@ -304,4 +305,23 @@ cabbrev visual cunmap <C-V><CR><NL>
In a following version of Vim the "Q" command will be made Vi compatible. Use
"gq" for formatting text.
+
+Using <> notation in autocommands *autocmd-<>*
+=================================
+
+The <> notation is not recognized in the argument for :autocmd. To avoid
+having to use special characters, you could use a mapping to get the <>
+notation and then call the mapping from the autocmd. Example:
+
+ *buffer-menu*
+"
+" This is for automatically adding the name of the file to the menu list
+" first we use the normal mode to convert the 'dots' in the filename to
+" \., store that in register '"' and then add that name to the Buffers menu
+" list. WARNING: this does have some side effects, like overwriting the
+" current register contents.
+"
+nmap _xaddbufmenu O<C-R>%<Esc>:.g/\./s/\./\\./g<CR>0"9y$u:menu Buffers.<C-R>9 :buffer <C-R>%<C-V><C-M><C-M>
+autocmd BufNewFile,BufReadPre * normal _xaddbufmenu
+
vim:ts=8:sw=8:js:tw=78:
diff --git a/usr.bin/vim/doc/vim_unix.txt b/usr.bin/vim/doc/vim_unix.txt
index 48631b983b7..1761d41698a 100644
--- a/usr.bin/vim/doc/vim_unix.txt
+++ b/usr.bin/vim/doc/vim_unix.txt
@@ -1,4 +1,4 @@
-*vim_unix.txt* For Vim version 4.2. Last modification: 1996 Apr 23
+*vim_unix.txt* For Vim version 4.4. Last modification: 1996 Apr 23
This file contains the particularities for the Unix version of Vim.
diff --git a/usr.bin/vim/doc/vim_w32.txt b/usr.bin/vim/doc/vim_w32.txt
index b6cd5e2f1eb..1abe28ae949 100644
--- a/usr.bin/vim/doc/vim_w32.txt
+++ b/usr.bin/vim/doc/vim_w32.txt
@@ -1,4 +1,4 @@
-*vim_w32.txt* For Vim version 4.2. Last modification: 1996 June 13
+*vim_w32.txt* For Vim version 4.4. Last modification: 1996 Aug 12
This file documents the idiosyncrasies of the Win32 version of Vim.
@@ -11,13 +11,66 @@ box"). It is not a full-fledged Windows GUI application, although it may
become one some day. It will not run in the Win32s subsystem in Windows
3.1; use the 32-bit DOS version of Vim instead. See |vim_dos.txt|.
-Vim for Win32 compiles with the Microsoft Visual C++ 2.0 compiler and later,
-and with the Borland C++ 4.5 32-bit compiler and later. It compiles on
-Windows 95 and all four NT platforms: i386, Alpha, MIPS, and PowerPC. The
-NT/i386 and the Windows 95 binaries are identical. Use Makefile.w32 to
-compile with Visual C++ and Makefile.b32 to compile with Borland C++.
-You can set the colour used in five modes with nine termcap options. Which of
+KNOWN PROBLEMS
+
+There are a few known problems with running the Win32 Vim on Windows 95.
+Comments from somebody working at Microsoft: "Win95 console support has always
+been and will always be flaky".
+- Dead key support doesn't work.
+- Resizing the window with ":set columns=nn rows=n" works, but executing
+ external commands may cause the system to crash.
+
+If this bothers you, use the 32 bit MS-DOS version.
+
+- When doing filename completion, matches for the short filename will also be
+ found. But this will result in the corresponding long filename. For
+ example, if you have the long file name "this_is_a_test" with the short
+ filename "this_i~1", the command ":e *1" will start editing
+ "this_is_a_test".
+
+
+LOCATION OF DOCUMENTATION and VIMRC FILE
+
+You should set the environment variable "VIM" to the directory where the Vim
+documentation files are. If "VIM" is used but not defined, "HOME" is tried
+too.
+
+If the HOME environment variable is not set, the value "C:/" is used as a
+default.
+
+The default help filename is "$VIM\vim_help.txt". If the environment variable
+$VIM is not defined or the file is not found, the Win32 search path is used to
+search for the file "vim_help.txt". If you do not want to put "vim_help.txt"
+in your search path, use the command ":set helpfile=pathname" to tell Vim
+where the help file is. |'helpfile'|
+
+Vim will look for initializations in eight places. The first that is found
+is used and the others are ignored. The order is:
+ - The environment variable VIMINIT
+ - The file "$VIM/_vimrc"
+ - The file "$HOME/_vimrc"
+ - The file "$VIM/.vimrc"
+ - The file "$HOME/.vimrc"
+ - The environment variable EXINIT
+ - The file "$VIM/_exrc"
+ - The file "$HOME/_exrc"
+
+
+USING BACKSLASHES
+
+Using backslashes in file names can be a problem. Vi halves the number of
+backslashes for some commands. Vim is a bit more tolerant and backslashes
+are not removed from a file name, so ":e c:\foo\bar" works as expected. But
+when a backslash is used before a special character (space, comma, backslash,
+etc.), it is removed. Use slashes to avoid problems: ":e c:/foo/bar" works
+fine. Vim will replace the slashes with backslashes internally, to avoid
+problems with some MS-DOS programs and Win32 programs.
+
+
+USING COLORS
+
+You can set the color used in five modes with nine termcap options. Which of
the five modes is used for which action depends on the |'highlight'| option.
":set t_mr=^V^[\|xxm" start of invert mode
@@ -34,11 +87,11 @@ the five modes is used for which action depends on the |'highlight'| option.
":set t_ZR=^V^[\|xxm" back to normal text
^V is CTRL-V
-^[ is ESC
-xx must be replaced by a decimal code, which is the foreground colour number
- and background colour number added together:
+^[ is <Esc>
+xx must be replaced with a decimal code, which is the foreground color number
+ and background color number added together:
-COLOUR FOREGROUND BACKGROUND
+COLOR FOREGROUND BACKGROUND
black 0 0
blue 1 16
green 2 32
@@ -56,35 +109,38 @@ COLOUR FOREGROUND BACKGROUND
yellow 14 224
white 15 240
-When you use 0, the colour is reset to the one used when you started Vim
+When you use 0, the color is reset to the one used when you started Vim
(usually 7, lightgray on black, but you can override this in NT. If you have
-overridden the default colours in a command prompt, you may need to adjust
-some of the highlight colours in your vimrc---see below).
+overridden the default colors in a command prompt, you may need to adjust
+some of the highlight colors in your vimrc---see below).
The defaults for the various highlight modes are:
- t_mr 112 reverse mode: black text on lightgray
- t_md 63 bold mode: white text on cyan
- t_me 0 normal mode (revert to default)
+ t_mr 112 reverse mode: black text (0) on lightgray (112)
+ t_md 63 bold mode: white text (15) on cyan (48)
+ t_me 0 normal mode (revert to default)
- t_so 31 standout mode: white text on blue
- t_se 0 standout mode end (revert to default)
+ t_so 31 standout mode: white (15) text on blue (16)
+ t_se 0 standout mode end (revert to default)
- t_czh 225 italic mode: blue text on yellow
- t_czr 0 italic mode end (revert to default)
+ t_czh 225 italic mode: blue text (1) on yellow (224)
+ t_czr 0 italic mode end (revert to default)
- t_us 67 underline mode: cyan text on red
- t_ue 0 underline mode end (revert to default)
+ t_us 67 underline mode: cyan text (3) on red (64)
+ t_ue 0 underline mode end (revert to default)
-These colours were chosen because they also look good when using an inverted
+These colors were chosen because they also look good when using an inverted
display, but you can change them to your liking.
Example:
-:set t_mr=^V^[\|97m " start of invert mode: blue on brown
-:set t_md=^V^[\|67m " start of bold mode: cyan on red
-:set t_me=^V^[\|112m " back to normal mode: black on light gray
+:set t_mr=^V^[\|97m " start of invert mode: blue (1) on brown (96)
+:set t_md=^V^[\|67m " start of bold mode: cyan (3) on red (64)
+:set t_me=^V^[\|112m " back to normal mode: black (0) on light gray (112)
-:set t_so=^V^[\|37m " start of standout mode: magenta on green
-:set t_se=^V^[\|112m " back to normal mode: black on light gray
+:set t_so=^V^[\|37m " start of standout mode: magenta (5) on green (32)
+:set t_se=^V^[\|112m " back to normal mode: black (0) on light gray (112)
+
+
+TEXTMODE or NON-MS-DOS FILES
If the "tx" (textmode) option is set (which is the default), Vim will accept
a single <NL> or a <CR><NL> pair for end-of-line. When writing a file, Vim
@@ -97,71 +153,81 @@ and writing in non-text mode (":se notx"). 'textmode' is set automatically
when 'textauto' is on (which is the default), so you don't really have to
worry about what you are doing. |'textmode'| |'textauto'|
-When 'restorescreen' is set (which is the default), Vim will restore the
-original contents of the console when exiting or when executing external
-commands. If you don't want this, use ":set nors". |'restorescreen'|
-
-Using backslashes in file names can be a problem. Vi halves the number of
-backslashes for some commands. Vim is a bit more tolerant and backslashes
-are not removed from a file name, so ":e c:\foo\bar" works as expected. But
-when a backslash is used before a special character (space, comma, backslash,
-etc.), it is removed. Use slashes to avoid problems: ":e c:/foo/bar" works
-fine. Vim will replace the slashes with backslashes internally, to avoid
-problems with some MS-DOS programs and Win32 programs.
-
If you want to edit a script file or a binary file, you should reset the
'textmode' and 'textauto' options before loading the file. Script files and
binary files may contain single <NL> characters which would be replaced with
<CR><NL>. You can reset 'textmode' and 'textauto' automatically by starting
Vim with the "-b" (binary) option.
-You should set the environment variable "VIM" to the directory where the Vim
-documentation files are. If "VIM" is used but not defined, "HOME" is tried
-too.
-
-If the HOME environment variable is not set, the value "C:/" is used as a
-default.
-
-The default help filename is "$VIM\vim_help.txt". If the environment variable
-$VIM is not defined or the file is not found, the Win32 search path is used to
-search for the file "vim_help.txt". If you do not want to put "vim_help.txt"
-in your search path, use the command ":set helpfile=pathname" to tell Vim
-where the help file is. |'helpfile'|
-
-Vim will look for initializations in eight places. The first that is found
-is used and the others are ignored. The order is:
- - The environment variable VIMINIT
- - The file "$VIM/_vimrc"
- - The file "$HOME/_vimrc"
- - The file "$VIM/.vimrc"
- - The file "$HOME/.vimrc"
- - The environment variable EXINIT
- - The file "$VIM/_exrc"
- - The file "$HOME/_exrc"
-The only kind of terminal type that the Win32 version of Vim understands is
-"win32", which is built-in. If you set the TERM environment variable to
-anything else, you will probably get very strange behaviour from Vim. This is
-most likely to happen when running a non-standard shell such as Cygnus's
-GNU-Win32 bash (http://www.cygnus.com/misc/gnu-win32) or the one in the MKS
-toolkit. Use "unset TERM" before starting Vim!
+:CD COMMAND
The ":cd" command recognizes the drive specifier and changes the current
drive. Use ":cd c:" to make drive C the active drive. Use ":cd d:\foo" to go
to the directory "foo" in the root of drive D. UNC names are also recognized;
e.g., ":cd \\server\share\dir". |:cd|
+
+INTERRUPTING
+
Use CTRL-BREAK instead of CTRL-C to interrupt searches. The CTRL-C is not
detected until a key is read.
-Temporary files (for filtering) are put in the current directory.
+TEMP FILES
+
+Temporary files (for filtering) are put in the first directory in the next
+list that exists and where a file can be created:
+ $TMP
+ $TEMP
+ C:\TMP
+ C:\TEMP
+ current directory
+
+
+SHELL OPTION DEFAULT
+ *win32_shell*
The default for the 'sh' ('shell') option is "command.com" on Windows 95 and
"cmd.exe" on Windows NT. If SHELL is defined, it is used instead, and if
SHELL is not defined but COMSPEC is, COMPSPEC is used. External commands are
-started with "command /c <command_name>". Typing CTRL-Z starts a new
+started with "<shell> /c <command_name>". Typing CTRL-Z starts a new
command subshell. Return to Vim with "exit". |'shell'| |CTRL-Z|
+If you are running a third-party shell, you may need to set the
+|'shellcmdflag'| ('shcf') and |'shellquote'| ('shq') options. For example,
+with the MKS Korn shell or with bash, the values of the options should be:
+ 'shellcmdflag' -c
+ 'shellquote' "
+This will start the shell as
+ <shell> -c "<command name>"
+"-c" is needed in place of "/c" and double quotes are needed around the
+command passed to the shell. Vim will check for the presence of "sh" anywhere
+in the 'shell' option. If it is present, the 'shellcmdflag' and 'shellquote'
+option will be set to "-c" and "\"".
+
+TERM OPTION DEFAULT
+ *win32_term*
+The only kind of terminal type that the Win32 version of Vim understands is
+"win32", which is built-in. If you set 'term' to anything else, you will
+probably get very strange behaviour from Vim. Therefore the default value of
+'term' is not obtained from the environment variable "TERM".
+
+
+RESTORE SCREEN CONTENTS
+
+When 'restorescreen' is set (which is the default), Vim will restore the
+original contents of the console when exiting or when executing external
+commands. If you don't want this, use ":set nors". |'restorescreen'|
+
+
+COMPILING
+
+Vim for Win32 compiles with the Microsoft Visual C++ 2.0 compiler and later,
+and with the Borland C++ 4.5 32-bit compiler and later. It compiles on
+Windows 95 and all four NT platforms: i386, Alpha, MIPS, and PowerPC. The
+NT/i386 and the Windows 95 binaries are identical. Use Makefile.w32 to
+compile with Visual C++ and Makefile.b32 to compile with Borland C++.
+
The Win32 binary was compiled with Visual C++ version 4.0, using Makefile.w32.
Other compilers should also work. If you get all kinds of strange error
messages when compiling (you shouldn't with the Microsoft or Borland 32-bit
@@ -170,10 +236,16 @@ done with the addcr program: "nmake -f makefile.w32 addcr". This will compile
addcr.c to addcr.exe and then execute the addcr.bat file. Sometimes this
fails. In that case, execute the addcr.bat file from the DOS prompt.
+
+USING THE MOUSE
+
The Win32 version of Vim supports using the mouse. If you have a two-button
mouse, the middle button can be emulated by pressing both left and right
buttons simultaneously. |mouse_using|
+
+WIN32 FAQ *win32_faq*
+
Q. Why does the Win32 version of Vim update the screen so slowly on Windows 95?
A. The support for Win32 console mode applications is very buggy in Win95.
For some unknown reason, the screen updates very slowly when Vim is run at
diff --git a/usr.bin/vim/doc/vim_win.txt b/usr.bin/vim/doc/vim_win.txt
index 1a3b5d7a388..1e62bc8b439 100644
--- a/usr.bin/vim/doc/vim_win.txt
+++ b/usr.bin/vim/doc/vim_win.txt
@@ -1,4 +1,4 @@
-*vim_win.txt* For Vim version 4.2. Last modification: 1996 June 16
+*vim_win.txt* For Vim version 4.4. Last modification: 1996 Aug 6
Editing with multiple windows and buffers.
@@ -51,6 +51,9 @@ be editing empty buffers.
If there are many filenames, the windows will become very small. You might
want to set the 'winheight' option to create a workable situation.
+Buf/Win Enter/Leave autocommands are not executed when opening the new windows
+and reading the files, that's only done when they are really entered.
+
*status_line*
A status line will be used to separate windows. The 'laststatus' option tells
when the last window also has a status line:
@@ -322,6 +325,8 @@ can also get to them with the buffer list commands, like ":bnext".
:[N]sal[l] [N] Rearrange the screen to open one window for each argument.
All other windows are closed (buffers become hidden). When a
count is given, this is the maximum number of windows to open.
+ Buf/Win Enter/Leave autocommands are not executed for the new
+ windows here, that's only done when they are really entered.
:[N]sa[rgument][!] [N] *:sa* *:sargument*
Short for ":split | argument [N]": split window and go to Nth
@@ -540,7 +545,9 @@ Be careful: there may be more hidden, modified buffers!
:[N]ba[ll] [N] *:ba* *:ball* *:sba* *:sball*
:[N]sba[ll] [N] Rearrange the screen to open one window for each buffer in
the buffer list. When a count is given, this is the maximum
- number of windows to open.
+ number of windows to open. Buf/Win Enter/Leave autocommands
+ are not executed for the new windows here, that's only done
+ when they are really entered.
Memory usage limits