\begindata{text,538324812}
\textdsversion{12}
\template{help}
\define{global
}
\chapter{Vi Interface for Andrew Text Views\chapter{

}}
\section{What the Vi Interface is


}\leftindent{All andrew based applications that display text normally default 
to an \italic{emacs} style editing interface for navigating and editing.  The 
\italic{\helptopic{vi}} interface has been added to allow people familiar with 
the this interface to navigate and do simple text editing.  If it proves 
useful, additional commands and features will be added.  The interface can be 
made available on a per-application basis, or can be made to apply to all text 
viewed under andrew.

}\indent{
}\section{Switching to the Vi Interface


}\leftindent{There are three ways to get the \italic{vi }interface.  To 
activate it dynamically in any andrew application you happen to be in, make 
sure the text cursor is in the text object for which you want the \italic{vi} 
interface and type ESC-t.  The message "Command Mode" will appear in the 
message line. You can toggle back to the \italic{emacs} interface using the 
same sequence.  So, you can experiment with which interface you like better 
for particular views/applications by using this dynamic switching capability. 
The second way is to specify \italic{vi} in a preference (see preferences 
section).  This way you can have the \italic{vi }interface automatically when 
particular (or all) applications come up.  Thirdly, if no preferences are are 
specified, the shell variables VISUAL, EDITOR, and ED will be examined in 
order.  The value of the first variable that is set will be used to determine 
the interface.


When switching to \italic{vi} for an application, any text view in it will 
have the \italic{vi} interface.  This includes dialogues and the message line 
at the bottom of every window, so you'll have VI line editing available while 
answering prompts.  Application windows that contain several text views, such 
as the header and body sections of AMS/sendmessage and the document body and 
inserted annotations in the inspector are treated as separate \italic{vi} 
editor views with their own input/command modes.  The message line at the 
 bottom of the window will indicate the current mode for the view which has 
the input focus.  If a particular text view seems awkward to use with a 
\italic{vi} interface, you can dynamically switch it to \italic{emacs} again.

}
\section{Warnings

}\leftindent{
}\leftindent{Normally, the ESC key is used in \italic{vi} to terminate input 
mode.  Unfortunately, "ESC" is a heavily used and in some cases a special 
character in Andrew.  Many of the Andrew classes use ESC-something in their 
key-bindings, and it appears that the basic interaction manager makes a 
special case of not allowing a single ESC to be bound to a command.  So,the 
following key bindings have been implemented to terminate input mode:


\indent{ESC-ESC	

CTL-e

}}\indent{
}\section{Commands Supported:\section{

}}\section{\section{
}}\leftindent{Cursor motion:

\leftindent{<bs>, h, <del>, <sp>, l, <tab>


^N, j, <lf>, ^P, k


-, +, <cr>


^, 0, $


w, W, b, B, e, E


^D, ^U, ^F, ^B, G

(Unlike the \italic{emacs }interface, paging forward and backward (^F, ^B, ^U, 
^D) DO change the carat position.


L, M, H

}
Searching:

\leftindent{/, ?, n, N

}
Text Deletion:

\leftindent{x, X, d[wWbBeEd$], D

}
Text Replacement:

\leftindent{r, s, S, c[wWbBeEc$], C

}
Moving Text:

\leftindent{y[wWbBeEy$], p, P

}
Text insertion:

\leftindent{a\leftindent{, A, i, I, o, O}}

\leftindent{(since the carat is positioned BETWEEN characters "a" and "i" are 
equivalent commands.)

}Misc:

\leftindent{:r

% (will inverse video all text containing matching [], \{\}, or () )

}
All of the above commands will work with a count parameter, where it makes

sense (e.g., 30G means "go to line 30, 5cw means substitute text for the

following five words, 5dd means delete 5 lines, etc.).


Obviously "repeat" and "undo" would be high priority commands to

add in the future.

}
\section{Additional Features\section{

}}
\leftindent{Some additional features, based on the fact that you now have a 
\italic{vi} which is Andrew-based and has mouse input:


\leftindent{1.  Several new commands have been added that operate on the 
currently selected text: ds, cs, and ys will delete, change, and yank, 
respectively, the current selection.


2.  While in input mode, you can move the cursor and position the carat 
anyplace in the window, and continue inserting text (or   deleting text by 
backspacing).  You can also use the  cut/copy/paste menu items while in input 
mode.


3.  You can search forward and backward by selecting  some text and issuing 
 "/" and "?".  In this case you won't be prompted for the search string - the 
search will be executed immediately.  You   can use this to rapidly repeat 
searches, since you need only type "/" and "?", without the <CR>.


}}\section{Preferences

}
\leftindent{After you have experimented enough to know where you want the 
\italic{vi} interface to be used, you can use a preference specification to 
make it come up automatically for that application.  For instance, if you want 
it for all text views in application "app" then put:


app.editor: vi


into your preferences file.  If you want \italic{vi} for ALL andrew 
application, then specify:


editor: vi


Of course, at any time in an application, you can type ESC-t to dynamically 
switch between \italic{emacs} and \italic{vi} editor interfaces.

}\indent{\indent{
}}\section{Program Author}

\leftindent{
F. A. Schmidt  (fas%mtgzx@att.com)}


\section{Recent changes to Vi Interface}


\indent{First release (3/15/90).}



\begindata{bp,537558784}
\enddata{bp,537558784}
\view{bpv,537558784,194,0,0}
Copyright 1992 Carnegie Mellon University and IBM.  All rights reserved.

\smaller{\smaller{$Disclaimer: 

Permission to use, copy, modify, and distribute this software and its 

documentation for any purpose is hereby granted without fee, 

provided that the above copyright notice appear in all copies and that 

both that copyright notice, this permission notice, and the following 

disclaimer appear in supporting documentation, and that the names of 

IBM, Carnegie Mellon University, and other copyright holders, not be 

used in advertising or publicity pertaining to distribution of the software 

without specific, written prior permission.



IBM, CARNEGIE MELLON UNIVERSITY, AND THE OTHER COPYRIGHT HOLDERS 

DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 

ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT 

SHALL IBM, CARNEGIE MELLON UNIVERSITY, OR ANY OTHER COPYRIGHT HOLDER 

BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 

DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 

WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 

ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 

OF THIS SOFTWARE.

 $

}}\enddata{text,538324812}
