Submit a Help Request (804) 828-2227 | itsc@vcu.edu

Jove: A Text Editor

ABOUT JOVE

Jove is one of the text editing packages available for Unix servers, such as Hubert.  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.



Note Regarding Notation on This Page:

  • In this article, we use brackets "< >" to indicate keys to be pressed.
    • Press means to press the letter "m" key.
  • Combinations of keys within the brackets are pushed together.
    • tells you to hold down the Control key and press the letter "a".
    • Notice how the letter "a" is inside the brackets.
  • Never hold down the Escape Key, just "punch" it.
    • a tells you to press the Escape key and then press the letter "a".
    • Notice how the letter "a" is outside of the brackets.

Starting Jove

To start the Jove editor, first exit the menu system (if you are using the menu) and get to the command prompt.  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.  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).

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.

Issuing Jove Commands

As we will see, various editing tasks require that you issue commands to Jove. 

There are two ways to issue commands in Jove:

  1. Issuing Commands the Long Way
    1. Jove commands can also be issued by first pressing  x, typing a command, and then pressing .
    2. x moves the cursor to the bottom of the screen where you finish entering the command and .
  2. Issuing Commands using Shortcut Keys
    1. Some Jove commands can be issued via special keystrokes involving the Control () and Escape () keys.
    2. Using the and/or keys are considered "shortcut" methods available for the more frequently used commands.
    3. Thus, while all commands can be issued "the long way"; some commands can be issued via this "shortcut" method.
    4. Where available, we will only present the shortcut method 

Jove Command List

Moving the Cursor and Scrolling

The arrow keys move you in the desired direction.  Other commands follow.

Jove CommandAction

  f

Moves forward one word

  b

Moves backward one word

 

Moves to the beginning of the line

 

Moves to the end of the line

  a

Moves to the beginning of a sentence

  e 

Moves to the end of a sentence

  ,

Moves to the first line on the current screen

  .

Moves to the last line on the current screen

  <

Moves to the first line of the entire buffer

  >

Moves to the last line of the entire buffer

 

Scrolls forward one line

  z 

Scrolls backward one line

 

Scrolls forward one screenful

  v

Scrolls backward one screenful

  (the letter L)

Scrolls so that current line is centered

 

Deleting Text

Jove CommandAction

 

 Deletes the character to the left of the cursor

 

 Deletes the character on which the cursor is positioned

 

 Kills (deletes) all characters to the end of the line

  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 section below.

Moving and Copying Text

Jove CommandAction

 

Text that you delete with a "kill" command, such as or  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 .
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.

  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 and then pressing  y one or more times until you see the desired text.

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.
Here's how...

Jove CommandAction

  <Ctrl-\>

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.

  

Saves the buffer (just as  <Ctrl-\>) and exits Jove, all in one step.

  

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.

  x write-region filename

Saves the contents of the currently defined region (block) into the file you specify.
For example,  x write-region chapter3.
See the section Working With Regions below.

  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.

  

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.

 

Visiting (Switching) Files

Jove CommandAction

  

Use this to "visit" another file (i.e., to clear all the text currently in the buffer and begin editing another file).
After pressing  , you will be prompted for the name of the file to visit.
Type its name and press .
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 or .
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.

Inserting a File

Jove CommandAction

  

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.

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.

Jove CommandAction

 x auto-fill

Turns on/off the auto-fill mode.

Auto-Fill Mode: The cursor automatically moves down to a new line as you type (i.e., the text wraps).
When auto-fill is off, you must press to force the cursor to a new line.
With auto-fill on, you press twice to start a new paragraph.

The editor operates in auto-fill mode with each new session.  The word Fill will appear in the Jove mode line to show you this.

 j

Justifies a paragraph.  Move the cursor into the paragraph and press  j.
If the left margin has been altered (see below) and you want to justify using the new left margin, press before  j.

 x set right-margin n

Sets the value of the right margin variable that is used by auto-fill and by justify.
Fill in the value for n: This number represents the column position.
For example  x set right-margin 65.  The default margin is 70.

 x set left-margin n

Sets the value of the left margin variable that is used by auto-fill and by justify.
Fill in the value for n: This number represents the column position.

Note that pressing 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 instead.

 x auto-indent

This turns on/off the auto-indent mode.

Search and Replace

Jove CommandAction

<Ctrl-\>

Search forward, from the location of the cursor.
To find the next occurrence, press <Ctrl-\> and then press .

The search is case sensitive.
To make future searches case insensitive, issue the command  x set case-ignore-search on.

  Search in reverse, from the location of the cursor.

 q

Search and replace.

  • Press  q.
  • Enter the word you are searching for, then .

Enter the replacement word, then .

  • The cursor will move to the next occurrence of the word for which you are searching.
  • At the prompt, you can enter the following commands:
    • y
      • Replaces the word and moves to the next occurrence of the word for which you are searching.
    • n
      • Does not replace the word.  Skips to the next occurrence of the word for which you are searching.
    • u
      • Undoes the replacements made on the current line.
      • Moves to the previous replacement.
    • p
      • Replaces all remaining occurrences.
      • Stops search and replace.

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. 

First, define the boundaries of the region.

  1. Move the cursor to either the beginning or the end of the region to "mark" that end.
  2. Move the cursor to the other end of the region to mark that end; the second mark is called the "point". 
  3. 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:

Jove CommandAction

<Ctrl-@>

Set mark.
This places the "mark" at the current cursor location.
  Kill region.
Kills (deletes) the text in the defined region.  A copy of the deleted text is stored in the kill buffer.
Note:  the text can be restored back into the document at any location by repositioning the cursor and pressing .  Thus, you can use this "kill and restore" method to move a region of text.

w

Copy region.
Places a copy of the text from the defined region into the kill buffer
You may now restore it onto the screen at a new location by pressing .
 

Interchange the "mark" and the "point".
You can issue   repeatedly to move the cursor back and forth between both ends of the region.
This is handy if you forget where you placed the mark or you just want a way to move easily between two locations in a large file.

Canceling a Command

Jove CommandAction
  Cancels a command.
If you begin issuing a command but then change your mind, press to cancel it.

Repeating an Action

Jove CommandAction

 n

Repeats an action.
n: the number of times to repeat the command.  Not all Jove commands allow for this.

Examples
 12 and then will move the cursor down twelve lines. 
 20 and then will type the letter "a" into the buffer twenty times. 
 4  will kill (delete) four consecutive lines.

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.
The current buffer name is displayed in the mode line at the bottom of the screen.

Initially, each new buffer will be empty.  
You may edit a different file in each buffer.  If you want to bring in a file to edit, use the file visiting command.

And, you may copy a region of text in one buffer, then switch to another buffer and insert it there (see Working With Regions section). 

Jove CommandAction

 b

Switches to a buffer.
When prompted, type the buffer name and press .
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.

Note: Pressing  b and then without entering a name will switch to the most recently used buffer.

 

Displays the names of all the buffers you are using.
An asterisk shown beside a name means that that buffer contains unsaved changes.
Press to remove the list from the screen.

 

Saves all buffers to their respective files, without confirmation for saving each file.


 

Saves all buffers to their respective files; a confirmation for each file is requested before the save is executed.
Press then press  .

Getting Help

Jove has an online help system.  Follow the steps below to find help. 
Note: To return to your document after viewing any of the above help screens, press the .

  1. Press  x.
  2. The cursor will move to the bottom of the screen.
  3. Here you may type one of the following:
Jove CommandAction

apropos topic

Displays a list of Jove commands, variables, and shortcut keys pertaining to the topic you specify.
Examples:

  • apropos search 
  • apropos paragraph
  • apropos bind 
  • apropos spell

describe-command command

Displays a brief description of the Jove command you specify.
Examples:

  • describe-command write-region
  • describe-command ? 
    • Provides a list of all commands
      • Press to advance the list
      • Press  to cancel
  • describe-command filter-region

describe-key shortcut-key-sequence

Displays the name of the Jove command related to the shortcut keys.
Example:

  • Type describe-key
  • Press any shortcut key sequence, such as  

describe-variable variable

Displays a brief description of the Jove variable you specify.
Examples:

  • describe-variable case-ignore-search
  • describe-variable ?
    • Displays a list of all variables
      • Press to advance the list
      • Press to cancel

print variable

Displays the value of the Jove variable you specify.
Jove variables are set by issuing the command  x set  variable.
Example:

  •  x print right-margin

This article was updated: 03/17/2017