Office for Information Technology
University Computing Services - Academic Camput
Information Takeout
Jove Fundamental Commands
Version 1b: 4/10/97


1 WHERE TO LEARN MORE
2 STARTING JOVE
3 TYPING IN TEXT
4 ISSUING JOVE COMMANDS
5 JOVE COMMAND LIST
5.1 Moving the Cursor and Scrolling
5.2 Deleting Text
5.3 Moving and Copying Text
5.4 Saving and Exiting
5.5 Visiting (Switching) Files
5.6 Inserting a File
5.7 Paragraph and Line Commands
5.8 Search and Replace
5.9 Working With Regions (Blocks)
5.10 Canceling a Command
5.11 Repeating an Action
5.12 Using Multiple Buffers
6 GETTING HELP

[Note: This takeout is for users of the RS/6000 computers: Saturn, Atlas, and Titan. For simplicity, we will only refer to the Saturn RS/6000. If you use Atlas or Titan, simply substitute "atlas" or "titan" wherever you see "saturn" in the discussion below.

In this takeout, we will use brackets "<>" to indicate keys to be pressed. Thus, the instruction press <m> means to press the letter "m" key.

If you have problems with or questions about the contents of this takeout, you may call the UCS-AC Help Line at 828-2227 during normal business hours.]


Jove is one of the text editing packages available on the RS/6000. It is a derivative of the "EMACS" editor ("Jove" is said to stand for Johnathon's Own Version of EMACS) with all its powerful editing features but without its cost. It is considered a "screen" editor in that you can use the arrow keys to move around on the screen and when you insert or delete text the whole screen adjusts to reflect the changes made.

1 WHERE TO LEARN MORE

A Jove tutorial program is available that describes the features that are outlined in this takeout and many more. To run the tutorial, from the UCS-AC Menu select Word Processing and then Tutorial For Jove. Or, if not using the menu, enter the command teachjove at the saturn% command prompt. Also, there is a help system available within Jove; it is described in the last section below.

2 STARTING JOVE

To start the Jove editor, from the UCS-AC Menu select Word Processing, then select Jove Text Editor. Or, if you are not using the menu, at the command prompt, enter the command jove or jove filename, where filename is the name of a new or existing file you wish to edit (for example, jove chapter3). The Jove editing screen will be displayed into which you may begin typing or editing your document.

After starting Jove, if the editing screen is empty and you wish to bring in a file to edit, you "visit" the file as described below. The contents of the file will be displayed and the name of the file will appear in the special mode line displayed near the bottom of the screen.

Advanced users: If you put Jove commands in a file named ".joverc" (note the period) in your home directory, these commands will be executed each time you start a Jove session. This is typically used for setting Jove variables, such as right-margin and case-ignore-search (discussed later).

3 TYPING IN TEXT

In Jove terminology, you type text into a buffer. This is a temporary copy of your document, which you will edit and then save as a permanent file, as described later. After you start the editor, you may immediately begin typing text into the buffer. If you position the cursor (also called the point) in the middle of any text already there, any new text you type will be inserted at that location.

4 ISSUING JOVE COMMANDS

As we will see, various editing tasks require that you issue commands to Jove. Some Jove commands can be issued via special keystrokes involving the Control (<Ctrl>) and Escape (<Esc>) keys. In describing these below, the notation "<Ctrl-a>", for example, means "while holding down the Control key, press a." The notation "<Esc> a" means "press the Escape key, then press a." (When you use the Escape key you never hold it down, just "punch" it.)

Other Jove commands are issued by first pressing "<Esc> x". This moves the cursor to the bottom of the screen where you finish the command by typing one or more command words and pressing <Enter>.

Actually, all Jove commands can be issued by this second method. The first method, using <Ctrl> and <Esc> keystrokes, is a "shortcut" that has been made available for the more frequently used commands. Where available, we will only present the shortcut method.

5 JOVE COMMAND LIST

5.1 Moving the Cursor and Scrolling

The arrow keys move the cursor in the pointed direction (you can only move where there is text). In addition,
<Esc> f moves forward one word
<Esc> b moves backward one word
<Ctrl-a> moves to the beginning of the line
<Ctrl-e> moves to the end of the line
<Esc> a moves to the beginning of a sentence
<Esc> e moves to the end of a sentence
<Esc> , moves to the first line on the current screen
<Esc> . moves to the last line on the current screen
<Esc> < moves to the first line of the entire buffer
<Esc> > moves to the last line of the entire buffer
<Ctrl-z> scrolls forward one line
<Esc> z scrolls backward one line
<Ctrl-v> scrolls forward one screenful
<Esc> v scrolls backward one screenful
<Ctrl-l> (the letter l) scrolls so that current line is centered

5.2 Deleting Text

<Backspace> Deletes the character to the left of the cursor.
<Ctrl-d> Deletes the character on which the cursor is positioned.
<Ctrl-k> Kills (deletes) all characters to the end of the line.
<Esc> k Kills (deletes) all characters to the end of the sentence.

Note that you may also delete a block of text (phrase, paragraph, etc.). See the section Working With Regions below.

5.3 Moving and Copying Text

<Ctrl-y> Text that you delete with a "kill" command, such as <Ctrl-k> or <Esc> k is held in a special buffer (that you cannot see) called the kill buffer. You can "yank" (restore) the text from this buffer back onto the screen by pressing <Ctrl-y>. The text will reappear wherever the cursor is located. This is one way to move text from one location to another. The text remains in the kill buffer until you issue another kill command, so you may yank the same text onto the screen at several locations, if desired. Copying text is done by deleting the text, yanking it back into its original location, and then yanking it into its new location.
<Esc> y If you have used a kill command several times, Jove remembers the last 10 sets of text that were killed. You can retrieve any one of these sets back into the document by first pressing <Ctrl-y> and then pressing <Esc> y one or more times until you see the desired text.

5.4 Saving and Exiting

The text in the buffer you are editing is only temporary. Unless you wish to discard it, you must save it into a file before you exit Jove. How to do this is described in this section.

<Ctrl-x> <Ctrl-\> (that's a backslash) Saves the contents of the buffer back into the visited file, replacing its previous contents. If you have not previously specified a filename for the buffer, you will be prompted to type the filename.
<Ctrl-x> <Ctrl-z> Saves the buffer (just as <Ctrl-x> <Ctrl-\>) and exits Jove, all in one step.
<Ctrl-x> <Ctrl-w> Saves the contents of the buffer into a different file (you will be prompted to type a filename) and then visits that file (i.e., Jove now considers you to be editing the new file). If the file you specify already exists, Jove will ask if it is all right to overwrite (destroy) it before saving the buffer.
<Esc> x
write-region filename
Saves the contents of the currently defined region (block) into the file you specify. For example, <Esc> x write-region chapter3. (See the section Working With Regions below.)
<Esc> x
append-region filename
Appends the contents of the currently defined region (block) to the file you specify. (See the section Working With Regions below.)
<Ctrl-x> <Ctrl-c> Exits Jove without saving the buffer. If you have made changes to the buffer without saving, you will be warned and asked whether to exit.

5.5 Visiting (Switching) Files

<Ctrl-x> <Ctrl-v> Use this to "visit" another file (i.e., to clear all the text currently in the buffer and begin editing another file). After pressing <Ctrl-x> <Ctrl-v> you will be prompted for the name of the file to visit. Type its name and press <Enter>. Next, if you have made unsaved changes to the current buffer, you will be asked whether to save these changes before the buffer is cleared. Answer with <y> or <n>. (If you have not yet supplied a filename for the current buffer, you will also be asked for a filename in which to store it.)

5.6 Inserting a File

<Ctrl-x> <Ctrl-i> Use this to insert the contents of another file into the edit screen at a point just in front of the cursor. You will be prompted to type the filename.

5.7 Paragraph and Line Commands

A "paragraph" in Jove is a contiguous block of one or more lines. Paragraphs are separated from each other by a blank line.

<Esc> x
auto-fill
When you begin a Jove session, the editor operates in auto-fill mode (and the word Fill appears in the Jove mode line). This means that, as you type, the cursor will automatically move down to a new line when it reaches a pre-specified right margin. Thus, each line you type is "filled" to a proper length. To turn off auto-fill mode (or to turn it back on), enter <Esc> x auto-fill. When auto-fill is off, you must press <Enter> to force the cursor to a new line. With auto-fill on, you press <Enter> twice to start a new paragraph.
<Esc> j To justifiy a paragraph (i.e., to combine the lines of an existing paragraph so they are all filled to the proper length), move the cursor into the paragraph and press <Esc> j. If the left margin has been altered (see below) and you want to justify using the new left margin, press <Ctrl-u> before <Esc> j.
<Esc> x
set right-margin n
This sets the value of the right margin variable that is used by auto-fill and by justify. Here n is a number representing the column position, for example <Esc> x set&nbspright-margin 65. The default margin is 70.
<Esc> x
set left-margin n
This sets the left margin variable to the number n (the default value is 0). This margin is used by auto-fill. Note that pressing <Enter> to move to a new line will not move the cursor to the new left margin unless you are in auto-indent mode (see below); press <Ctrl-j> instead.
<Esc> x
auto-indent
This turns on auto-indent mode (or turns it back off).

5.8 Search and Replace

<Ctrl-\> Search forward, from the location of the cursor. For example, to search for April, you would type <Ctrl-\> and then April and then press <Enter>. To find the next occurrence, press <Ctrl-\> and then press <Enter>. The search is case sensitive (it matters whether you type April or april). To make future searches case insensitive, issue the command <Esc> x set case-ignore-search on .
<Ctrl-r> Search in reverse. Same as the <Ctrl-\> except it searches backward from the cursor.
<Esc> q Search and replace. For example, to replace April with May, press <Esc> q. When prompted for the query replace string, type April, then press <Enter>, then type May, and then press <Enter>. The cursor will move to the next occurrence of April, and you will be asked whether to replace. At this prompt you may respond by pressing any of the following keys:
y Replaces April with May, then moves to the next occurrence of April.
n Skips this occurrence of April and moves to the next.
u Moves to the previous replacement and undoes the changes to this line.
p Replaces all remaining occurrences of April without asking.
<Enter>  Pressing <Enter> stops without doing any more replacements.

5.9 Working With Regions (Blocks)

Sometimes you may wish to delete, move, or copy a region (block) of text, such as a phrase or a paragraph. You must first define the boundaries of the region. Move the cursor to either the beginning or the end (it does not matter) of the region and "mark" that end. Now move the cursor, also called the point, to the other end of the region.

You have now defined the region boundaries, with the mark at one end and the point at the other. You are now ready to issue a command for processing this region. We will look at just three:

<Ctrl-@> Set mark. This places the "mark" at the current cursor location.
<Ctrl-w> Kill region. This kills (deletes) the text in the defined region. A copy of the deleted text is stored in the kill buffer (see the section Undeleting Text above). If desired, the text can be restored back into the document at any location by repositioning the cursor and pressing <Ctrl-y>. Thus, you can use this "kill and restore" method to move a region of text.
<Esc> w Copy region. This just places a copy of the text from the defined region into the kill buffer (see the section Moving and Copying Text above). You may now restore it onto the screen at a new location by pressing <Ctrl-y>.
<Ctrl-x> <Ctrl-x> This interchanges the mark and the point. The cursor (or point) will move to the other end of the region (where the mark had been), and vice-versa. You can issue <Ctrl-x> <Ctrl-x> repeatedly to move the cursor back and forth between both ends of the region. This is handy if, for example, you forget where you placed the mark or you just want a way to move easily between two locations in a large file.

5.10 Canceling a Command

<Ctrl-g> If you begin issuing a command but then change your mind, press <Ctrl-g> to cancel it.

5.11 Repeating an Action

<Esc> n Some (but not all) Jove commands will allow you to specify a multiplier so the command will be performed multiple times. Press <Esc> and then a number just before you issue the command. For example, <Esc> 12 followed by pressing the <down arrow> will move the cursor down 12 lines. Or, <Esc> 20 followed by typing <a> will type the letter a into the buffer 20 times. Or, <Esc> 4 <Ctrl-k> will kill (delete) 4 consecutive lines.

5.12 Using Multiple Buffers

You can use more than one buffer. When you create a new buffer, the previous buffer will continue to exist, but it will disappear from the screen, replaced by the new one. The current buffer name is displayed in the mode line at the bottom of the screen.

Initially, each new buffer will be empty. If you want to bring in a file to edit, use the file visiting command <Ctrl-x> <Ctrl-v> described earlier. You may edit a different file in each buffer. And, you may copy a region of text in one buffer, then switch to another buffer and insert it there (see Working With Regions above).

<Ctrl-x> b Switches to a buffer. When prompted, type the buffer name and press <Enter>. If the name entered is an already existing buffer, it will be switched in with its contents. Otherwise a new buffer with the given name will be created and an empty buffer displayed.
<Ctrl-x> <Ctrl-b> Displayes the names of all the buffers you are using. An asterisk shown beside a name means that that buffer contains unsaved changes. To switch to any of the buffers listed, press <Ctrl-x> b and, when prompted, enter the buffer name (you should not switch to the one named minibuf; it is reserved for special use by Jove). Note that pressing <Ctrl-x> b and pressing <Enter> without entering a name will switch to the most recently used buffer. Press <Spacebar> to remove the list from the screen.
<Ctrl-x> <Ctrl-m> Before exiting Jove, you will probably want to save the changes you made in some of your buffers. You could switch to each and issue a save command (described earlier). Or, to save all buffers to their respective files with one command, press <Ctrl-x> <Ctrl-m>. You will not be asked for confirmation about saving each file. To save all buffers with confirmation, press <Ctrl-u> before pressing <Ctrl-x> <Ctrl-m>.

6 GETTING HELP

Jove has an online help system. To use it, first press <Esc> x. The cursor will move to the bottom of the screen. Here you may type one of the following:

apropos topic This will display a list of Jove commands, variables, and shortcut keys pertaining to the editing topic that you specify. For example, try typing apropos search or apropos paragraph. (Advanced users: try apropos bind and apropos spell.)
describe-command command This displays a brief description of any Jove command that you specify, such as describe-command write-region. Or, type describe-command ? to see a list of all commands (press the <Spacebar> to advance the list, <Ctrl-g> to cancel). (Advanced users: try describe-command filter-region.)
describe-key After typing this, press any shortcut key sequence, such as <Ctrl-x> <Ctrl-c>, to display the name of the Jove command to which it is "bound" (i.e., for which it is a shortcut).
describe-variable variable This will display a brief description of any Jove variable that you specify, such as case-ignore-search. Or, type describe-variable ? to see a list of all variables (press the <Spacebar> to advance the list, <Ctrl-g> to cancel).
print variable This displays the value of a specified Jove variable. For example, you could issue the command <Esc> x print right-margin. (Jove variables are set by issuing the command <Esc> x set variable.)

To return to your document after viewing any of the above help screens, press the <Spacebar>.


University Computing Services - Academic Campus
This page is maintained by the Webmaster
Date Last Modified: Jun 12, 1997