This file was created elsewhere and bits the don't apply were edited out. The original version is http://www.cc.swarthmore.edu/cc/cc-docs/jove.basics.html. You may also wish to read the Abridged Jove Reference at the same site.

Basics of the JOVE Unix Text Editor

Invoking JOVE

To invoke the JOVE editor simply type "jove" at a command prompt. The JOVE screen then will appear with a large blank area where text is entered, and a black status line (sometimes referred to as the "mode line") at the bottom of the screen. This status line provides such information as the name of your file, the text mode you're in, whether or not your file has been modified, and the size of the file in characters and lines. Below the status line you'll see a command line where you enter special commands, e.g., C-X C-B (to see the text buffers you're working in), or information provided by JOVE in response to a command you've given.

JOVE Commands

JOVE makes use of an extensive set of keyboard commands to perform the numerous functions available. These keyboard commands were defined by the creators of JOVE, although you may change them to better suit your needs.

Control and Meta Keys

Many of the commands you'll use are a combination of one of two special keys-the Control key or the Meta key-followed by a character, e.g.:

C-L (to center the current line on the screen)
M-A (to move to the beginning of a sentence)

The Control key may appear on your keyboard either as CTRL or CTL; the Meta key may appear as either the ESC or the OPTION key.

The following abbreviations are used in this document to refer to the Control and Meta keys and the way they are used. In either case, <chr> can be upper or lower case.

 
C-<chr>
hold down the CONTROL key while typing the character <chr>, for example C-F

 

M-<chr>
press the ESC or OPTION key and release it, then type the character <chr>, for example M-E

Extended Commands

There are many more commands in JOVE, however, than you could possibly use with just the Control and Meta keys in combination with one character, as shown in the examples above. JOVE, therefore, expands the use of the Control or Meta keys in two ways:

C-X -- character eXtend -- followed by one or two characters
M-X -- named command eXtend --followed by a long name

To issue a character eXtend command, type C-X followed by the character(s), e.g., C-X C-V (to visit a file) or C-X N (to to move to the next window). To issue a named command eXtend, type M-X. Your cursor will be repositioned in the command line below the status line at the bottom of your screen. At this point, type the command, e.g., set margin 50 (to change the number of characters allowed per line to 50).

Repeating a Command

Most JOVE commands can use a "universal argument," i.e., the command will be repeated the number of times you specify. To use a universal argument, press the Meta key, then type the number of times the command is to be repeated and the command itself, e.g.,

M 4 M-F (to move the cursor forward four (4) words)

One exception to the way a universal argument works is with the screen moving commands (C-V to move to the next screen, or M-V to move backward one screen). If a number is specified with these commands, the cursor will scroll by lines rather than by screens. For example, the command M 3 C-V would move the cursor forward three (3) lines rather than forward three screens.

Cancelling a Command

To cancel a command, issue the command C-G.

Errors

If you do something that JOVE doesn't allow or understand, e.g., incorrectly typing an instruction or an unrecognized control key sequence, JOVE will issue a beep. Other types of errors may generate an informative message at the bottom of your screen.

Editing a File

Entering Text

To enter text in a file, simply type the text. If you make a mistake, press the DELETE key; the character to the left of the current cursor position will be erased.

The default mode in JOVE is "Auto Fill," which means there is no need to press the Return key (represented in this document by <RETURN>) when you reach the end of a line. If a word at the end of a line will exceed the set maximum line length of 78 characters, JOVE will automatically begin that word on the next line. (The number of characters allowed per line can be changed using the "Set" command. Refer to the manual for information on using this command. A full set of manuals is available in the Printer Room of Beardsley.)

There may be times, however, when you don't want to work in "Auto Fill" mode, e.g., when you're writing a program. You can turn off "Auto Fill" mode by typing M-X <RETURN> . When you give this command, your cursor will move to the bottom of the screen below the status line. At the colon (:) type:

auto-fill-mode <RETURN>

This is a toggle command, so you would repeat these steps to turn auto-fill back on. In either case, your current mode ("Text Fill" if auto-fill-mode is turned on, or "Text" if auto-fill-mode is turned off) will appear in the status line at the bottom of your screen. (Incidentally, this is an example of using a named eXtend command.)

Saving and Naming Text in Files

While you're entering text in a new file or editing an existing file, your work is saved in a "scratch" file or buffer. The scratch file name appears after Buffer: in the status line at the bottom of your screen, followed by the name of your file.

If you enter text in a new, unnamed file, the status line will be similar to the following:

JOVE (Text Fill) Buffer: Main "[No file]" *(11:27)

In this example, the name of the scratch file is "Main". "[No file]" indicates that the file has not been named yet.

To name your file, use the command C-X C-\ (enter on keypad). The following message will appear below the status line:

: save-file

Your cursor will be positioned after this message, and you can type the name you want to give to the file; then press <RETURN>. The filename, along with the number of lines and characters in the file then will appear below the status line, and your cursor will be repositioned in the text area of your screen.

"testing" 20 lines, 237 characters.

As you edit your file, this work also is stored in a scratch file until you save it (to make the changes permanent). To save your work, type C-X C-\ . The message in the status line at the bottom of your screen then will look something like this:

JOVE (Text Fill) Buffer: Jove-sample "Jove-sample" *(11:37)

The asterisk (*) following "Jove-sample" indicates that this file has been modified. This asterisk will not be present in a newly opened or saved file.

Moving Around

JOVE provides a number of ways to move around within a file, from the simple use of the arrow keys on your keyboard to move in small increments, e.g., up or down one or two lines, to the use of the Control and Meta keys to move larger distances, e.g., from the beginning of your file to the end. The list below lists some of these move commands.

 
C-V
move to the next screen. (So that you don't lose your place while moving from screen to screen, the last line of text at the bottom of the screen will appear at the top of the next.)

 

M-V
move backwards one screen

 

C-L
center the current line on the screen, or clear the screen and redisplay everything if the current line is already at the center

 

M-F
move forward a word

 

M-B
move back a word

 

C-A
move to the beginning of the current line

 

C-E
move to the end of the current line

 

M-A
move to the beginning of a sentence

 

M-E
move to the end of a sentence

 

M-,
move to beginning of the window

 

M-.
move to end of window

 

M-<
move to the beginning of the file

 

M->
move to the end of the file.

 

M-# M-G
goto line #

Numbering Lines

There may be times when you need to know a specific line number for some text in your file, for example, when you issue the command M-# M-G to go to a specific line number. An easy way to find a line number is to type M-X, then number-of-lines-in-window at the colon (:) prompt in the command line at the bottom of your screen. Each line in your window will be numbered, although these numbers are not considered part of your text. This is a toggle command, so you would repeat M-X and number-of-lines-in-window to turn off this feature.

Inserting and Deleting Text

You already know that you can delete a character by using the DELETE key to remove the character to the left of the cursor. The term "kill," on the other hand, is used in JOVE to refer to any text greater than a character that is removed from your screen. This text is saved in a buffer for later retrieval by "yanking" it back; more on this in a moment. You can have as many as 10 "kills." There is an important distinction between text that has been killed and text that has been deleted: Killed text-words, lines, sentences-can be retrieved; deleted text-a character, a space, or a blank line- cannot be retrieved.

The following commands are used to delete or kill text:

 
<Delete>
delete the character just before the cursor
C-D
delete the next character after the cursor
M-<Delete>
kill the word immediately before the cursor
M-D
kill the next word after the cursor
C-K
kill from the cursor position to the end of the line
M-K
kill to the end of the current sentence

If you kill several lines of text in a row, that text is saved as one block so that it can be retrieved as a block at a later time. For example, you could use this technique to kill an entire paragraph by first positioning the cursor at the beginning of the paragraph, then repeatedly using the command M-K (to kill to the end of the current sentence) until every sentence in the paragraph has been killed.

Alternatively, you could use the M-K command with a universal argument, by first determining the number of lines in the paragraph, then placing the cursor at the beginning of the paragraph and giving the command M # C-K, where # is the number of lines in the paragraph. (See "Numbering Lines" above.)

As we mentioned above, killed text can be retrieved by yanking it back. This text can be inserted it in its original location or some other location at a later time during your session. To retrieve the most recently killed text, whether it's a word or a block of text, position the cursor where you want the text to appear, then type C-Y to yank back the text. Typing C-Y repeatedly will repeatedly yank back that same text.

To yank back earlier kills, i.e., text killed prior to the most recent kill, use the C-Y command followed by the M-Y command. C-Y will retrieve the most recent kill; M-Y will retrieve previous kills, replacing each successive kill retrieved. Suppose you have done five kills and want to retrieve the last one. You would do the following:

  1.  
  2. Place the cursor where you want the text to appear.

     

  3. Press C-Y to yank back the first kill.

     

  4. Press M-Y to yank back the second most recent kill. This text will replace the first kill you yanked back.

     

  5. Press M-Y three more times. Each time you press M-Y, the text will be replaced and the fifth kill will eventually appear.

Pressing M-Y will yank back each kill in order from the most recent to the earliest, until you eventually recycle back to the most recent. If you simply want to insert a blank line between two lines, e.g., in the middle of a paragraph, move the cursor to the second of the two lines, then type C-O.

Search and Replacing

Suppose you want to locate a string of text (a group of characters or words) in your file. You could do this by using the command C-\ to begin the search, then typing the string you want to locate. JOVE will find the first occurrence of that string after the current cursor location. If that's not the occurrence you want, type C-\ <RETURN> until you find the one you want. To locate a string before the current cursor location, type C-R to reverse the search; C-\ <RETURN> will take you backward to an even earlier occurrence of the specified string.

Now suppose you want to replace one string of text with another. There are several ways to do this. For example, to change every occurrence of a string with another string, you would use the command

M-r oldtext<RETURN>newtext<RETURN>

Each occurrence of "oldtext" would be replaced with "newtext".

You also can replace selectively one string of text with another, using the command query-replace-search. To start this process, type the command M-Q; the message query-replace-string will appear at the bottom of your screen. Type the string you want to change (e.g., oldtext); at the prompt "with", type the replacement string (e.g., newtext). The following message will appear at the bottom of your screen

Replace (Type `?" for help)?

and your cursor will be positioned next to the first occurrence of oldtext.

You now have several options.

Press the space bar to change the occurrence of oldtext found. The cursor then will move on to the next occurrence. Press the space bar again to change this occurrence. Press <Delete>to skip the occurrence of oldtext found. The cursor then will move on to the next occurrence. Press r to temporarily suspend the process so you can do some other editing. Press C-X C-X to return to the process after doing other editing. The message

Replace (Type `?" for help)?

will reappear at the bottom of your screen.

Press P to replace all occurrences of oldtext with newtext. The following message will appear at the bottom of your screen:

[Point pushed] (# substitutions]

where # is the number of replacements made.

Getting Help

JOVE offers far too many features to mention in this document. There are several ways, however, to find more information or help with a particular feature, many of which are available from within JOVE.

Describe-key Command

The describe-key command, C-X ? , provides information about the command bound (i.e., assigned) to the command character you specify, either a simple command such as C-V or a multi-character command such as C-X C-C. A one line comment providing the information requested will appear at the bottom of your screen. This information is important to know if you want to customize JOVE to suit your needs (see "Initialization Files" later in this document).

For example, to find the command bound to M-Q, you would type C-X ? . The message

describe key ESC q is bound to query-replace-string

would appear in the command line, and your cursor would be repositioned in your text area. To get more detailed information about query-replace-string, use the describe-command command.

Describe-command Command

Once you know what command is bound to a particular key, you may want more information about that command. You can do this by using the describe-command command M- ? . When you give this command, a prompt will appear at the bottom of your screen; type the name of the command, e.g., query-replace-string <RETURN>. The relevant information from the manual will appear on your screen. If there is more information than can fit on the screen, --more-- will appear; press the spacebar to see the rest of the explanation. When you have finished reading, press <RETURN>; your text will reappear.

Apropos

Information about the command to use a particular feature in JOVE can be found by using the apropos command M-X (* on your keypad). When you give this command, your cursor will be position at the colon (:) prompt at the bottom of your screen; at this point type apropos or apr (JOVE will complete the word). At the (keyword) prompt, type the keyword or phrase (with hyphens between words) for the information you want; press <RETURN>. The command names, the associated keyboard commands, and any variable pertaining to the specified keyword will appear in the text area of your screen. When you have finished reading this information, press <RETURN>.

Exiting from JOVE

Exit Without Saving

The command to exit from JOVE is C-X C-C (0 on your keypad). If your file has been modified, the following message will appear.

Some buffers haven't been saved; leave anyway?

If you don't want to save your changes, type y <RETURN>.

Exit With Changes Saved

If you want to save your changes before exiting from JOVE, type C-X C-\ C-X C-X . This first saves your changes, then takes you out of JOVE.

Advanced JOVE Features

Buffers

As you edit a file, your changes are written into a "buffer." When you save a file, the changes in the buffer are written to your file. In essence, the file you're editing is a copy of the actual file that is eventually saved. JOVE allows you to have up to 100 buffers, which means that it is possible to work simultaneously with up to 100 files.

Use the command C-X C-B to see what buffers are open. In a file that has been neither named or saved, the following will appear.

* means buffer needs saving)
(+ means file hasn't been read yet)
 
NO Lines Type          Name         File
-- ----- ----          ----         ----
1  1     File          Main         [No file]
2  2     Scratch     * *minibuf*    [No file]

Using the C-X C-B command with a named and modified file will produce something like this:

* means buffer needs saving)
(+ means file hasn't been read yet)
 
NO Lines Type          Name         File
-- ----- ----          ----         ----
1  1     File          Main         [No file]
2  2     Scratch     * *minibuf*    [No file]
3  908   File        * jove-test    jove-test

You can edit more than one file at a time, in which case each file will be in a separate buffer. This is a very convenient feature if you want to kill text in one file and yank it back into another. There are two ways to edit two or more files simultaneously:

  1.  
  2. When you invoke JOVE, type the names of the files you want to open, e.g.,
    1. jove filea fileb filec
  3. Each file will open in its own separate buffer; type C-X C-B to see these buffers.

     

  4. Once you're in JOVE, in either a new file or an existing file, you can open other files using the find-file command C-X C-F . When you're prompted at the bottom of your screen for the filename, type the name of the file you want to open, then press <RETURN>. This file then will appear on your screen. Repeat this procedure to open additional files.

When you give the command C-X C-B to see what buffers are open after opening several files, the result will look similar to this.

* means buffer needs saving)
(+ means file hasn't been read yet)
 
NO Lines Type          Name         File
-- ----- ----          ----         ----
1  1     File          Main         [No file]
2  4     Scratch     * *minibuf*    [No file]
3  906   File          jove-test    jove-test
4  1     File        + sample       sample
5  1     File        + Jove-sample  Jove-sample

You can switch between buffers in one of two ways:

  1.  
  2. Use the command C-X B, which will prompt you for the name of the buffer you want. A default name will appear in parenthesis; you can press <RETURN> to select this buffer, or type the name of some other buffer, followed by <RETURN>.

     

  3. If you recall the number of the buffer you want, you can use the command C-X B #, where # is the buffer number appearing in the first column when you give the command C-X C-B.

Windows

The text you see on your screen is a "window" to the buffer you're working in. JOVE allows you to work not only with multiple buffers, but with multiple windows, which means that you can work simultaneously with windows for two or more files or different parts of one file on your screen.

To split a file into two windows, use the command C-X 2. Although the screen will be split in half, and each half will have its own status line, both windows will look into the same buffer. You can look at two parts of the same file by using the C-X 2 command, then using one of the move commands in one of the windows to reach another place in the file. If, however, the same part of the file is visible in both windows and you enter text in one of these windows, you'll see that text being entered in the other window as you type.

To open another window, repeat the command C-X 2; you now will have three windows on your screen. To return to one window, use the command C-X 1.

To open a window for another file, use the command C-X 4 f. At the prompt, enter the file name or the buffer number. The new file will appear with its own status line in a separate window.

The commands C-X n and C-X p are used to go to the next window or to the previous window, respectively.

Checking Your Spelling

JOVE makes use of the window feature when you use its spelling checker. When you give the command M-X spel <RETURN>, every word in your file is checked, and a list of questionable words appears in a window below your file window. The status line of this window will read:

[ JOVE (Text) Buffer: Spell "[No file]" ] * (19:19)

Go through the list of words in the spell window and delete those you know to be correct. Then type C-X C-C to exit the spell-edit mode. The message

Finding misspelled words ... Done

will appear, and your cursor will be positioned to the right of the first misspelled word in your document. Type the correction, then type C-X C-N to go to the next error. As long as the spell buffer window is open, you can move to different locations in your file, do some other editing, then use the command C-X C-N to return to the next spelling error or C-X C-P to go the previous error. Repeat the commands C-X C-N and C-X C-P until all corrections are made.

Initialization Files

You can initialize JOVE just the way you like by putting a file named ".joverc" in your home directory. The sequences ^[ = ESC and ^ = CONTROL are interpreted correctly by JOVE on startup. If you create your own .joverc file to redesign your editing environment, it will be read after the default file and will override the default where they are in conflict.

Updated: 9/19/94
jfj/mw/jps