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.]
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).
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.
|
|
<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.
<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. |
<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. |
<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.) |
<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. |
<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 right-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). |
<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:
|
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. |
<Ctrl-g> | If you begin issuing a command but then change your mind, press <Ctrl-g> to cancel it. |
<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. |
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>. |
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>.