vi base profile
The vi base profile has default key assignments that should be familiar to vi users.
Not all key and mouse-event settings listed below may be available in the environment (workstation configuration, operating system, Java support, enclosing editor application, etc.) in which the editor is running. The set of key and mouse settings in the current editor view may also be extended and modified by the editor application, active document parser, and editor extensions in effect.
Key Settings
When the vi base profile is active, the editor does not use the keyAction parameter for key assignments in the text area. Instead, the editor's vi key handler is activated. Below is a list of the vi commands that are recognized by the editor's vi key handler.
Command Description
$ Move the cursor to the end of the current line. % Move the cursor to the parenthesis, bracket, or brace that matches the one at the current cursor position. [n]& Repeat the last substitution command n times. 'x Move the cursor to the first character on the line with the mark indicated by x. '' Move the cursor to the first character on the line where the cursor was before the last cursor jump command. [n]+ Move the cursor to the first character on the nth next line. [n], Repeat the last f, F, t, or T command n times in the reverse direction. [n]- Move the cursor to the first character on the nth previous line. `x Move the cursor to the mark indicated by x. `` Move the cursor to where the cursor was before the last cursor jump command. ["buffer][n]. Repeat the last change command n times. If the last change command uses a buffer, use the specified buffer. /string Search for string. :abbreviate abbreviation string Set an abbreviation. :edit [name] If the document does not contain any unsaved changes, reload the document. If you specify name, the name of the document will be changed and the new file will be loaded. :edit! [name] Unconditionally reload the current document. If you specify name, the name of the document will be changed and the new file will be loaded. :lpex command Issue command as an LPEX editor command. :quit If the document does not contain any unsaved changes, close the document. If the editor application does not define the quit command, the document will not be closed. :quit! Unconditionally close the document. If the editor application does not define the quit command, the document will not be closed. :substitute/string1/string2/[g] Replace string1 with string2. If you specify the optional g parameter, all instances of string1 are replaced with string2. :unabbreviate abbreviation Remove the specified abbreviation. :w [name] If the document has any unsaved changes, save the document. If you specify name, the document will be saved under the specified name. :w! [name] Unconditionally save the document. If you specify name, the document will be saved under the specified name. :wq Save and quit the document. If the editor application does not define the quit command, the document will not be closed. [n]; Repeat the last f, F, t, or T command n times. [n]<< Unindent n lines. [n]>> Indent n lines. ?string Search for string backwards through the document. @buffer Issue the command in the specified buffer. @@ Reissue the last buffer command. ^ Move the cursor to the first character on the line. [n]_ Move the cursor to the first character on the next (n-1)th line. [n]| Move the cursor to the column specified by n. If n is not specified, the cursor is moved to column 1. [n]~ Toggle the case of n characters. 0 Move the cursor to the first column of the current line. [n]a Insert n times after the current cursor position. [n]A Insert n times at the end of the current line. [n]b Move the cursor to the start of the nth previous word. [n]B Move the cursor to the start of the nth previous word. ["buffer]c$ Replace the text from the current cursor position to the end of the current line. Store the deleted text in the specified buffer. ["buffer]c^ Replace the text from the current cursor position to the start of the current line. Store the deleted text in the specified buffer. ["buffer][n]cc Replace n lines. Store the deleted text in the specified buffer. ["buffer][n]cw Replace n words. Store the deleted text in the specified buffer. ["buffer]C Replace the text from the current cursor position to the end of the current line. Store the deleted text in the specified buffer. ["buffer]d$ Delete the text from the current cursor position to the end of the current line. Store the deleted text in the specified buffer. ["buffer]d^ Delete the text from the current cursor position to the start of the current line. Store the deleted text in the specified buffer. ["buffer][n]dd Delete n lines. Store the deleted text in the specified buffer. ["buffer][n]dw Delete n words. Store the deleted text in the specified buffer. ["buffer]D Delete the text from the current cursor position to the end of the current line. Store the deleted text in the specified buffer. [n]e Move the cursor to the end of the nth next word. [n]E Move the cursor to the end of the nth next word. [n]fc Move the cursor to location of the nth instance of the character c to the right. [n]Fc Move the cursor to location of the nth instance of the character c to the left. [n]G Move the cursor to the first character on the line indicated by n. If n is not specified, the last line in the document is assumed. [n]h Move the cursor n characters to the left. [n]H Move the cursor to the first character on the nth line from the top of the window. [n]i Insert n times at the current cursor position. [n]I Insert n times at the start of the current line. [n]j Move the cursor down n lines. [n]J Join n lines to the current line. [n]k Move the cursor up n lines. [n]l Move the cursor n characters to the right. [n]L Move the cursor to the first character on the nth line from the bottom of the window. mx Set a mark x at the current cursor position. M Move the cursor to the first character on the line in the middle of the window. [n]n Repeat last search command n times. [n]N Repeat last search command n times in the reverse direction. [n]o Insert n times in a new line after the current line. [n]O Insert n times in a new line before the current line. ["buffer]p Paste from the specified buffer after the current cursor position. ["buffer]P Paste from the specified buffer at the current cursor position. [n]rc Replace n characters with the specified character c. [n]R Replace n times at the current cursor position. [n]s Replace n characters. ["buffer][n]S Replace n lines. Store the deleted text in the specified buffer. [n]tc Move the cursor to the column before the location of the nth instance of the character c to the right. [n]Tc Move the cursor to the column after the location of the nth instance of the character c to the left. u Undo the last change. If the last command was u, restore the last change. [n]w Move the cursor to the nth next word. [n]W Move the cursor to the nth next word. ["buffer][n]x Delete n characters and store the deleted text in the specified buffer. ["buffer][n]X Delete n characters before the current cursor position and store the deleted text in the specified buffer. ["buffer]y$ Yank the text from the current cursor position to the end of the current line into the specified buffer. ["buffer]y^ Yank the text from the current cursor position to the start of the current line into the specified buffer. ["buffer][n]yy Yank n lines into the specified buffer. ["buffer][n]Y Yank n lines into the specified buffer. ["buffer]yw Yank the text from the current cursor position to the end of the word into the specified buffer. [n]z^M Scroll the current line to the top of the window. If n is specified, scroll the nth line in the document to the top of the window. [n]z- Scroll the current line to the bottom of the window. If n is specified, scroll the nth line in the document to the bottom of the window. [n]z. Scroll the current line to the center of the window. If n is specified, scroll the nth line in the document to the center of the window. [n]^B Scroll backward n pages. [n]^D Scroll forward n lines. If n is not specified, scroll forward half a page. If possible, keep the cursor on the same text line. [n]^E Scroll forward n lines. If possible, keep the cursor on the same text line. [n]^F Scroll forward n pages. [n]^H Move the cursor n characters to the left. [n]^J Move the cursor down n lines. [n]^M Move the cursor to the first character on the nth next line. [n]^N Move the cursor down n lines. [n]^P Move the cursor up n lines. [n]^U Scroll backward n lines. If n is not specified, scroll backward half a page. If possible, keep the cursor on the same text line. [n]^Y Scroll backward n lines. If possible, keep the cursor on the same text line. Note that in the above table:
- Symbols enclosed in [] are optional.
- n is used to indicate a positive integer.
- x is used to indicate a lowercase letter in the range a-z.
- buffer is used to indicate a buffer. There are in total 35 buffers represented by the digits 1-9 and the letters a-z. If you do not specify a buffer, the default buffer is assumed. The default buffer is buffer 1. If a command puts text into the default buffer, the contents of buffer 1 are moved to buffer 2, the contents of buffer 2 are moved to buffer 3, and so on. The contents of buffer 9 are discarded. You can not explicitly specify a buffer in the range 1-9 if the command writes to a buffer. You can only explicitly indicate these buffers if the command is only reading from a buffer. If the command writes to a buffer and you specify the buffer with an uppercase letter, the command will append to the buffer rather than overwriting the buffer.
- The symbol ^ before an uppercase letter indicates that the Control (Ctrl) key should be held while the specified letter is being typed.
The following special keys are recognized by the vi key handler when the editor is in insert or replace mode:
Key Description
^H Backspace over the last character. ^V Do not interpret the next key as a special key. ^W Backspace over the last word. ^[ End insert or replace mode. Esc End insert or replace mode. If the cursor is not in the text area, regular key settings will still apply. The key settings listed below show the key definition (for example, "a-d.c") and the editor action (for example, "blockDelete"). For a complete reference of how a key is defined see the keyAction parameter.
a-d.c Alt+D blockDelete a-i.c Alt+I blockLowerCase a-k.c Alt+K blockUpperCase a-pageDown.c Alt+Page Down findBlockEnd a-pageUp.c Alt+Page Up findBlockStart a-q.c Alt+Q findQuickMark a-u.c Alt+U blockUnmark c-a.c Ctrl+A blockMarkAll c-backSpace.c Ctrl+Backspace deleteLine c-end.c Ctrl+End bottom c-enter.c Ctrl+Enter openLine c-f.c Ctrl+F find c-home.c Ctrl+Home top c-j.c Ctrl+J findLastChange c-l.c Ctrl+L locateLine c-m.c Ctrl+M match c-n.c Ctrl+N findNext c-numpadEnter.c.secondary Ctrl+Numpad Enter openLine c-p.c Ctrl+P c-pageDown.c Ctrl+Page Down pageRight c-pageUp.c Ctrl+Page Up pageLeft c-s-f.c Ctrl+Shift+F findAndReplace c-s-l.c Ctrl+Shift+L locateSequenceLine c-s-m.c Ctrl+Shift+M findMatch c-s-n.c Ctrl+Shift+N compareNext c-s-p.c Ctrl+Shift+P comparePrevious c-s-r.c Ctrl+Shift+R compareRefresh c-s-u.c.secondary Ctrl+Shift+U comparePrevious c-s.c Ctrl+S save c-t.c Ctrl+T scrollTop c-u.c Ctrl+U findUp c-w.c Ctrl+W showAll f1.c F1 help f7.c F7 blockShiftLeft f8.c F8 blockShiftRight pageDown.c Page Down pageDown pageUp.c Page Up pageUp
Mouse Event Settings
The mouse event settings listed below are divided into mouse event and action pairs. The first string (for example, "1-a-dragged") indicates the mouse event, and the second string indicates the action (for example, "blockMarkToMouse"). For information on how a mouse event is defined refer to the mouseAction parameter.
Editor commands, actions, and parameters
Editor profiles
Default editor commands
Editor parameters
keyAction parameter
mouseAction parameter