\input texinfo
-@setfilename ../../info/vip
+@setfilename ../../info/vip.info
@settitle VIP
+@documentencoding UTF-8
+
@copying
-Copyright @copyright{} 1987, 2001--2013 Free Software Foundation, Inc.
+Copyright @copyright{} 1987, 2001--2014 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
-Invariant Sections, with the Front-Cover texts being ``A GNU Manual'',
+Invariant Sections, with the Front-Cover Texts being ``A GNU Manual'',
and with the Back-Cover Texts as in (a) below. A copy of the license
is included in the section entitled ``GNU Free Documentation License''.
@dircategory Emacs misc features
@direntry
-* VIP: (vip). An older VI-emulation for Emacs.
+* VIP: (vip). An obsolete VI-emulation for Emacs.
@end direntry
@ifnottex
concentrate mainly on differences from Vi, especially features unique to
VIP.
+VIP is obsolete since Emacs 24.5---consider using Viper instead.
+@xref{Top, Viper,, viper, The Viper VI-emulation mode for Emacs}.
+
It is recommended that you read nodes on survey and on customization before
you start using VIP@. Other nodes may be visited as needed.
Comments and bug reports are welcome. Please send messages to
@code{ms@@Sail.Stanford.Edu} if you are outside of Japan and to
-@code{masahiko@@sato.riec.tohoku.junet} if you are in Japan.@refill
+@code{masahiko@@sato.riec.tohoku.junet} if you are in Japan.
@insertcopying
concentrate mainly on differences from Vi, especially features unique to
VIP.
+VIP is obsolete since Emacs 24.5---consider using Viper instead.
+@xref{Top, Viper,, viper, The Viper VI-emulation mode for Emacs}.
+
It is recommended that you read chapters on survey and on customization
before you start using VIP@. Other chapters may be used as future
references.
@key{PNT} and @key{MRK} are used
to indicate positions in a buffer and they are not part of the text of the
buffer. If a buffer contains a @key{MRK} then the text between @key{MRK}
-and @key{PNT} is called the @dfn{region} of the buffer.@refill
+and @key{PNT} is called the @dfn{region} of the buffer.
@cindex window
Emacs provides (multiple) @dfn{windows} on the screen, and you can see the
content of a buffer through the window associated with the buffer. The
cursor of the screen is always positioned on the character after @key{PNT}.
-@refill
@cindex mode
@cindex keymap
a function is bound to some key in the local keymap then that function will
be executed when you type the key. If no function is bound to a key in the
local map, however, the function bound to the key in the global map becomes
-in effect.@refill
+in effect.
@node Loading VIP
@section Loading VIP
to be in vi mode whenever Emacs starts up, you can include the following
line in your @file{.emacs} file instead of the above line:
@example
-(setq term-setup-hook 'vip-mode)
+(add-hook 'emacs-startup-hook 'vip-mode)
@end example
@noindent
(@xref{Vi Mode}, for the explanation of vi mode.)
to the function @code{vip-change-mode-to-vi}. The default binding of @kbd{C-z}
in GNU Emacs is @code{suspend-emacs}, but, you can also call
@code{suspend-emacs} by typing @kbd{C-x C-z}. Other than this, all the
-key bindings of Emacs remain the same after loading VIP.@refill
+key bindings of Emacs remain the same after loading VIP.
@cindex vi mode
invoked by @kbd{M-x}. Here @kbd{M-x} means @kbd{Meta-x}, and if your
terminal does not have a @key{META} key you can enter it by typing
@kbd{@key{ESC} x}. The same effect can also be achieve by typing
-@kbd{M-x vip-mode}.)@refill
+@kbd{M-x vip-mode}.)
@cindex mode line
You can observe the change of mode by looking at the @dfn{mode line}. For
-instance, if the mode line is:@refill
+instance, if the mode line is:
@example
-----Emacs: *scratch* (Lisp Interaction)----All------------
@end example
@cindex emacs mode
You can go back to the original @dfn{emacs mode} by typing @kbd{C-z} in
-vi mode. Thus @kbd{C-z} toggles between these two modes.@refill
+vi mode. Thus @kbd{C-z} toggles between these two modes.
Note that modes in VIP exist orthogonally to modes in Emacs. This means
that you can be in vi mode and at the same time, say, shell mode.
You will be in this mode just after you loaded VIP@. You can do all
normal Emacs editing in this mode. Note that the key @kbd{C-z} is globally
bound to @code{vip-change-mode-to-vi}. So, if you type @kbd{C-z} in this mode
-then you will be in vi mode.@refill
+then you will be in vi mode.
@node Vi Mode
@subsection Vi Mode
You can repeat undoing by the @kbd{.} key. So, @kbd{u} will undo
a single change, while @kbd{u .@: .@: .@:}, for instance, will undo 4 previous
changes. Undo is undoable as in Vi. So the content of the buffer will
-be the same before and after @kbd{u u}.@refill
+be the same before and after @kbd{u u}.
@node Changing
@subsection Changing
@key{ESC} to complete the command. Before you enter @key{RET} or
@key{ESC} you can abort the command by typing @kbd{C-g}. In general,
@kindex 007 @kbd{C-g} (@code{vip-keyboard-quit})
-you can abort a partially formed command by typing @kbd{C-g}.@refill
+you can abort a partially formed command by typing @kbd{C-g}.
@node Searching
@subsection Searching
search and regular expression search. You cannot give an offset to the
search string. (It is a limitation.) By default, search will wrap around
the buffer as in Vi. You can change this by rebinding the variable
-@code{vip-search-wrap-around}. @xref{Customization}, for how to do this.@refill
+@code{vip-search-wrap-around}. @xref{Customization}, for how to do this.
@node z Command
@subsection z Command
For those of you who cannot remember which of @kbd{z} followed by @key{RET},
@kbd{.}@: and @kbd{-} do what. You can also use @kbd{z} followed by @kbd{H},
@kbd{M} and @kbd{L} to place the current line in the Home (Middle, and
-Last) line of the window.@refill
+Last) line of the window.
@node Counts
@subsection Counts
Thus @kbd{d r} will delete the current region. If @kbd{R} is used instead
of @kbd{r} the region will first be enlarged so that it will become the
smallest region containing the original region and consisting of whole
-lines. Thus @kbd{m .@: d R} will have the same effect as @kbd{d d}.@refill
+lines. Thus @kbd{m .@: d R} will have the same effect as @kbd{d d}.
@node New Commands
@subsection Some New Commands
will be in vi mode again. You can give a count before typing @kbd{\}.
Thus @kbd{5 \ *}, as well as @kbd{\ C-u 5 *}, will insert @samp{*****}
before point. Similarly @kbd{1 0 \ C-p} will move the point 10 lines above
-the current line.@refill
+the current line.
@item K
@kindex 113 @kbd{K} (@code{vip-kill-buffer})
Kill current buffer if it is not modified. Useful when you selected a
If followed by a certain character @var{ch}, it becomes an operator whose
argument is the region determined by the motion command that follows.
Currently, @var{ch} can be one of @kbd{c}, @kbd{C}, @kbd{g}, @kbd{q} and
-@kbd{s}.@refill
+@kbd{s}.
@item # c
@kindex 0432 @kbd{# c} (@code{downcase-region})
Change upper-case characters in the region to lower case
@item # g
@kindex 0432 @kbd{# g} (@code{vip-global-execute})
Execute last keyboard macro for each line in the region
-(@code{vip-global-execute}).@refill
+(@code{vip-global-execute}).
@item # q
@kindex 0432 @kbd{# q} (@code{vip-quote-region})
Insert specified string at the beginning of each line in the region
@kindex 1300 @kbd{X} (@code{vip-ctl-x-equivalent})
These keys will exit from vi mode and return to emacs mode temporarily.
If you type @kbd{C} (@kbd{X}), Emacs will be in emacs mode and will believe
-that you have typed @kbd{C-c} (@kbd{C-x}, resp.) in emacs mode. Moreover,
+that you have typed @kbd{C-c} (@kbd{C-x}) in emacs mode. Moreover,
if the following character you type is an upper-case letter, then Emacs
will believe that you have typed the corresponding control character.
You will be in vi mode again after the command is executed. For example,
the idea here is that you can execute useful Emacs commands without typing
control characters. For example, if you hit @kbd{X} (or @kbd{C-x}) followed
by @kbd{2}, then the current window will be split into 2 and you will be in
-vi mode again.@refill
+vi mode again.
@end table
In addition to these, @code{ctl-x-map} is slightly modified:
a prefix to the commands. A numeric argument is also called a @dfn{count}.
In many cases, if a count is given, the command is executed that many times.
For instance, @kbd{5 d d} deletes 5 lines while simple @kbd{d d} deletes a
-line. In this manual the metavariable @var{n} will denote a count.@refill
+line. In this manual the metavariable @var{n} will denote a count.
@node Important Keys
@section Important Keys
In Emacs many commands are bound to the key strokes that start with
@kbd{C-x}, @kbd{C-c} and @key{ESC}. These commands can be
-accessed from vi mode as easily as from emacs mode.@refill
+accessed from vi mode as easily as from emacs mode.
@table @kbd
@item C-x
and you can execute a single Emacs command. After executing the
Emacs command you will be in vi mode again. You can give a count before
typing @kbd{\}. Thus @kbd{5 \ +}, as well as @kbd{\ C-u 5 +}, will insert
-@samp{+++++} before point.@refill
+@samp{+++++} before point.
@end table
@node Buffers and Windows
In Emacs the text you edit is stored in a @dfn{buffer}.
See GNU Emacs Manual, for details. There is always one @dfn{current}
-buffer, also called the @dfn{selected buffer}.@refill
+buffer, also called the @dfn{selected buffer}.
@cindex window
@cindex modified (buffer)
@dfn{default directory} which is specific to each buffer. Suppose, for
instance, that the default directory of the current buffer is
@file{/usr/masahiko/lisp/}. Then you will get the following prompt in the
-minibuffer.@refill
+minibuffer.
@example
visit file: /usr/masahiko/lisp/
@end example
already exists in the directory, Emacs will visit that file, and if not,
the file will be created. Emacs will use the file name (@file{vip.el}, in
this case) as the name of the buffer visiting the file. In order to make
-the buffer name unique, Emacs may append @samp{<2>}, @samp{<3>} etc., to
-the buffer name. As the @dfn{file name completion} is provided here, you
-can sometime save typing. For instance, suppose there is only one file in the
+the buffer name unique, Emacs may add a suffix (@pxref{Uniquify,,,
+emacs, The GNU Emacs Manual}). As @dfn{file name completion} is provided here, you
+can sometimes save typing. For instance, suppose there is only one file in the
default directory whose name starts with @samp{v}, that is @samp{vip.el}.
Then if you just type @kbd{v @key{TAB}} then it will be completed to
@samp{vip.el}. Thus, in this case, you just have to type @kbd{v v @key{TAB}
You can verify which file you are editing by typing @kbd{g}. (You can also
type @kbd{X B} to get information on other buffers too.) If you type
-@kbd{g} you will get an information like below in the echo area:@refill
+@kbd{g} you will get an information like below in the echo area:
@example
"/usr/masahiko/man/vip.texinfo" line 921 of 1949
@end example
associated with the buffer (@file{/usr/masahiko/man/vip.texinfo}, in this
case), you can just say @kbd{X S}. If you wish to save it in another file,
you can type @kbd{X W}. You will then get a similar prompt as you get for
-@kbd{v}, to which you can enter the file name.@refill
+@kbd{v}, to which you can enter the file name.
@node Viewing the Buffer
@section Viewing the Buffer
wish to change it to @samp{bar}, you can type @kbd{c w}. Then, as @kbd{w}
is a point command, you will get the prompt @samp{foo =>} in the
minibuffer, for which you can type @kbd{b a r @key{RET}} to complete the change
-command.@refill
+command.
@table @kbd
@item c c
@kindex 011 TAB (@code{indent-for-tab-command})
Indent line for current major mode (@code{indent-for-tab-command}).
@item C-j
-@kindex 012 @kbd{C-j} (@code{newline-and-indent})
-Insert a newline, then indent according to mode (@code{newline-and-indent}).
+@kindex 012 @kbd{C-j} (@code{electric-newline-and-maybe-indent})
+Insert a newline, and maybe indent according to mode.
@item C-k
@kindex 013 @kbd{C-k} (@code{kill-line})
Kill the rest of the current line; before a newline, kill the newline.
@node Customization
@chapter Customization
-If you have a file called @file{.vip} in your home directory, then it
+If you have a file called @file{~/.emacs.d/vip} (or @file{~/.vip}), then it
will also be loaded when VIP is loaded. This file is thus useful for
customizing VIP.
@end table
@noindent
You can reset these constants in VIP by the Ex command @kbd{set}. Or you
-can include a line like this in your @file{.vip} file:
+can include a line like this in your @file{~/.emacs.d/vip} file:
@example
(setq vip-case-fold-search t)
@end example
VIP uses @code{vip-command-mode-map} as the @dfn{local keymap} for vi mode.
For example, in vi mode, @key{SPC} is bound to the function
@code{vip-scroll}. But, if you wish to make @key{SPC} and some other keys
- behave like Vi, you can include the following lines in your @file{.vip}
-file.
+ behave like Vi, you can include the following lines in your
+@file{~/.emacs.d/vip} file.
@example
(define-key vip-command-mode-map "\C-g" 'vip-info-on-file)