JOVE(1B)

NAME
jove - EMACS style screen editor

SYNOPSIS
jove [-t tagname] [+line] [file1 file2 ... ]

DESCRIPTION

JOVE is an interactive display oriented editor which allows one to modify text easily. JOVE stands for Jonathan's Own Version of Emacs. This editor is modeled after the EMACS written at MIT by Richard Stallman. JOVE has tried to stick to the conventions of real EMACS, but has strayed away from them in several places. The real EMACS is extensible, which means the user can change the way the editor behaves to his own liking. He can do this by changing the commands that each key invokes or by writing new commands. Although new commands cannot be written in JOVE, existing commands can be bound to any key or commands can be combined into a macro that can be invoked like a standard command. There are several concepts a user needs to understand before he can use the editor to his full advantage. The three most important are buffers, windows, and command binding.

Buffers and Files

In most cases, JOVE is used to edit already existing files. JOVE reads files into buffers. A buffer is where JOVE stores its version of the file; changes made in the editor are made to the buffer, not the original file. If the user makes a change but wishes he did not, he can simply reread the file from the disk into a fresh buffer. If JOVE is given no files to edit it creates an empty buffer with no file associated with it. When the user has finished editing and is satisfied with his changes, he can save the buffer to a file with the write-named-file command. This command asks for a file name and writes the contents of the buffer to that file. Once a buffer is written to a file, the previous contents of the file are gone forever, so be careful!! JOVE complains if the buffer is modified and an attempt is made to leave before saving the changes. It says "Modified buffers exist. Leave anyway?". Answering no to this question will leave the user in the editor so that he can write the buffers. If he wants to exit, e.g. he made a mistake, he should answer yes. One note of caution, if you modify a buffer and then remove the change, JOVE will still consider the buffer to have been modified.

The current position in a buffer is indicated by the terminal's "cursor" and is called the "point". The cursor is normally a solid or blinking square or underline. The point should not be thought of as being on a character, rather as being between two characters, namely the character before the cursor and the character under the cursor. Most buffer-oriented commands apply to the buffer containing the point.

JOVE supports multiple buffers. This means that more than one file can be edited at a time, each file having its own buffer. JOVE remembers what each buffer looks like while it is not in use. This makes it possible to jump around from one buffer to another without losing any previous changes and without having to save the changes each time a new buffer is selected. Each buffer has its own set of characteristics that JOVE also remembers, so switching from one buffer to another can change the way the editor behaves. JOVE uses windows to show what the buffer looks like at any time.

Windows

Usually files are too large to fit on the terminal screen all at once. While in the editor, the screen acts as a window into a buffer, always showing what the buffer looks like. If the point is moved past the top or bottom of the window, the window moves to follow the point. When a line is too long to fit on the terminal, JOVE shows this by putting an ! at the end of the line. Moving the point to a position that is off the screen horizontally causes the line containing the point to be scrolled to the right or the left such that the point is visible. Only the current line is ever scrolled. If the line containing the point is scrolled and the point moves to a different line, the scrolled line automatically moved back to its normal position. The window reflects what is being done as it is being done, so what you see is ALWAYS what you get.

Initially there is only one window, but it is possible to divide a window so that there are two or more smaller windows. The smaller windows are exactly the same as the original window except for the amount of the buffer each can show at a time. Sometimes the same buffer will be shown in more than one window, and other times there will be a different buffer in each window.

Invocation

JOVE is invoked by simply typing jove to either the shell or the Berkeley C-shell. If arguments are provided on the command line, JOVE treats each as a file to be read, and reads it into its own buffer. The current buffer will be the first file read in, and the point will be at the beginning of the buffer. There is one exception. If JOVE sees a -t on the command line it takes the next argument to be a C language program tag and reads in the file containing that tag. The tag is looked up in the file "tags" in the current directory. The tags file is produced by the ctags program. This program may not be available on all systems. Inexperienced users need not worry about this option.

If a file is preceded by an argument of the form "+number", the cursor is initially placed on the specified line of the following file. For example, "jove +100 /etc/passwd" would edit /etc/passwd and JOVE would start up with the cursor sitting on line 100.

The Mode Line

At the bottom of each window is the mode line associated with that window. A typical mode line might look like this:

   JOVE (RE-TE)   2: jove.1   "jove.1" *

The mode line always says JOVE. The RE-TE inside the parentheses means the editor has regular expressions enabled and is in text-fill mode (see Variables and Modes below). In this example the name of the buffer is jove.1 and the name inside the quotes is the file. In this case the file is jove.1; in general the buffer name and the file name are the same. The * at the end of the line indicates that the buffer has been modified but not saved.

The very bottom line on the screen is the message line, where JOVE prints any messages and where JOVE prompts the user for more input. For example, when the user wants to save the buffer, JOVE would ask on this line for a file name to use. Responses to JOVE prompts should be normally be terminated by a newline (the RETURN key). You can abort any input function by using the standard abort character, ^G (control-G).

When prompting for the names of commands, variables, or predefined macros, JOVE will provide a feature called "automatic command completion". If you have typed as much of the command as is necessary to make it unique, you can type a space and JOVE will fill in the rest of the command, variable, or macro name. If no additional input is necessary, JOVE will proceed to carry out the command.

Using JOVE

Once invoked, JOVE is ready to accept commands from the user. Many of the editor commands move the point around in the buffer and others change what the buffer looks like. These commands operate on single characters, words, lines, and regions. One of the more common editor commands is the self-insert command.

The self-insert command simply inserts the character that invoked it into the buffer at the point. Because the point is really between two characters, inserting a character at the point pushes all the characters, from the point to the end of the line, over to the right to make room for the new character. The point moves one to the right staying just ahead of the newly inserted character. This means that if the user wants to insert a word, he can just type the word. Characters which are not self inserting, for example those which are other editor commands, also can be inserted but must be quoted first. This is done with the quote-char command, which inserts the next character typed no matter what character it is.

Most commands in JOVE are invoked by either control characters or escape sequences. Control-F (that is the CTRL key held down while the F key is typed) is an example of a control character and is used for the forward-character function. ^F is shorthand for Control-F. Many of the editor commands are bound to control keys initially. Escape sequences differ from control characters in that they are typed in two keystrokes, namely the ESCAPE key followed by any other key. If there is not a command bound to the ESCAPE-<character> sequence, the editor will complain. The "ESCAPE" character is an example of a "command prefix" because it is the first part of a two-character command. The character Control-X is also used as the "prefix" for many commands. For example, ^X^F (control-X followed by a control-F) is normally used to run the command find-file. To sum up, there are three forms for commands for JOVE: 1) vanilla control characters like ^F, 2) commands prefixed by ESCAPE, and 3) commands prefixed by ^X.

Some Standard Commands

The commands forward-character and backward-character are bound to the keys ^F and ^B respectively. At the end of each line of text is an invisible NEWLINE character; moving forwards across this advances the point to the beginning of the next line. They move forward and backward one character position in the buffer. The commands forward-word and backward-word are bound to the keys ESCAPE-F and ESCAPE-B respectively. They are the same as the ^F and ^B commands except that they operate on words (words are continuous strings of alphabetic characters). The commands next-line and previous-line are examples of commands that operate on lines. There are commands that delete text in units of characters, words, and lines also. Delete-next-character deletes the character after the point and delete-previous-character deletes the character before the point. Delete-next-word and delete-previous-word are the same as the two delete character functions except that they operate on words.

Numeric Arguments

Sometimes it is useful to run a command a specific number of times. ESCAPE followed by a number, followed by a command, runs that command number times. For example: to move down 10 lines, the sequence ESC-10-^N will work, if ^N is bound to the next-line command. This is called giving the command a /fInumeric argument/fR. Some of the commands ignore numeric arguments, for example read-file, but most of the commands make use of the optional numeric argument. If a numeric argument is not given, a value of 1 is assumed.

Marks and Regions

A region is defined as all the text between two buffer positions. Marks provide a way to remember a position in the buffer other than the point. The set-mark command sets a mark to where the point is at the time the command is invoked. Once a mark is set, the user can move the point anywhere else and later use various commands to manipulate the mark. Each buffer can have any number of marks, but usually two suffice. Each mark has a number differentiating it from other marks. Providing a numeric argument to a mark command uses the mark whose number is the numeric argument. If no argument is given, the 0th mark is assumed. For example, to delete the region between mark 4 and the point, the command ESC-4-^X-^K will work (assuming delete-to-killbuffer is bound to ^X-^K).

Searching

It is sometimes necessary to get from one place in a buffer to another quickly. Using the primitive motion commands would work but would be rather slow. Search commands provide a quick and easy way to move over large portions of text. The user is prompted for a string to search for. The search starts from the point, so forward searches will not find any matches that are before the point, and reverse searches will not find any matches after the point. If the search was forward and the editor manages to find the string, the point moves to the end of the string. If the search was backward and the editor finds the string, the point moves to the beginning of the string. Otherwise the user will be informed of the failure and left where he was. JOVE supports regular expressions also which provides a powerful pattern matching facility; for complete documentation see the article for ed in the Unix Users Manual, section 1. Another useful command is the query-replace-search command (ESC-q). This command prompts the user for a search string, then prompts for a replacement string, and then searches the buffer for the search string replacing selected occurrences with the replacement string; at each occurrence, the user is prompted; the user can choose to replace this occurrence, skip this occurrence, exit query-replace, recursively edit, or replace all remaining occurrences without further prompts. There is another version of the replace command called replace-search (ESC-^E) which prompts for a search string and a replacement string and then replaces all occurrences without further ado.

Binding Commands

There are many commands built into JOVE, many of which are not bound to specific keys. The command handler in JOVE is used to invoke these functions and is activated by execute-extended-command function (ESC-x). When the name of a command typed in is unambiguous, that command will be executed. Since it is very slow to have to type in the name of each command every time it is needed, JOVE makes it possible to bind commands to keys. When a command is bound to a key any future hits on that key will invoke that command. All the printing characters are initially bound to the function self-insert so that typing any one of the printing characters causes it to be inserted into the text. Any of the existing commands can be bound to any key. (A key may actually be a control character or an escape sequence as explained previously under "Using JOVE".)

Since there are more commands than there are keys, two keys are treated as prefix commands. When a key bound to one of the prefix commands is typed, the next character typed is interpreted on the basis that it was preceded by one of the prefix keys. Initially ^X and ESC are the prefix keys, and as you will see, many of the built in commands are initially bound to these "two stroke" keys. (For historical reasons, the ESCAPE key is often referred to as "Meta".)

Users will likely want to modify the default key bindings to their liking. Since it would be quite annoying to have to set up the bindings each time JOVE is started up, JOVE has the ability to read in a "startup" file. Whenever JOVE is started, it reads commands from the file .joverc in the user's home directory. These commands are read as if they were typed to the command handler (ESC-x) during an edit. There can be only one command per line in the startup file. If there is a file /usr/lib/jove/joverc, then this file will be read before the user's .joverc file. This can be used to set up a system-wide default startup mode for JOVE that is tailored to the needs of that system. For more information on using .joverc files and tailoring in general, see the document "Tailoring the JOVE Editor".

The source command can be used to read commands from a specified file at any time during an editing session, even from inside the .joverc file. This means that a macro can be used to change the key bindings, e.g. to enter a mode, by reading from a specified file which contains all the new bindings.

Command Descriptions

Here is a list of all the commands, with a short description of each and the key that the command is initially bound to. If the key is listed as "[unbound]", then that function is not initially bound to any control or escape key. Any of the functions could be bound to keys of the user's choosing by his own ".joverc" file.

The next character typed will be interpreted on the basis that it was preceded by the command Prefix-1. This is one of two such commands whose purpose in life is to increase the number of commands that can be bound to keys and thus easily invoked. If you are too slow to supply the second character, JOVE displays "M-" on the message line as a reminder that it wants another character. The default ESC-? sequences are case insensitive (ESC-b = ESC-B). The user is of course free to change this. The next character typed will be interpreted on the basis that it was preceded by the command Prefix-2. This is one of two such commands whose purpose in life is to increase the number of commands that can be bound to keys and thus easily invoked. If you are too slow to supply the second character, JOVE displays "C-X" on the message line as a reminder that it wants another character. The default ^X-? sequences are case insensitive (^X-b = ^X-B). Appends the region bounded by the point and mark to the named file. If the file does not exist it is created. This command prompts for a keyword (or partial string) and lists all the commands that contain that string at the top of the screen. Moves the point backward one character in the buffer. If the point is at the beginning of the line, it moves it to the end of the previous line. This moves the point to the matching open parenthesis (brace) of the close parenthesis (brace) just before the point. If there is no match, an error is reported (with a "bell") and the point remains unchanged. If in the middle of a word, the point moves to the beginning of the word. Otherwise it moves the point to the beginning of the previous word. Moves the point to the beginning of the current buffer so that the character after the point is the first character of the buffer. Moves the point to the beginning of the current line. Moves the point to the beginning of the current sentence. Moves the point to the first character in the window. Binds a macro to a key so that future hits on that key will run the macro. Binds a command to a key so that future hits on that key will run the command. For example, the command next-line is normally bound to the key ^N. Prints the line and column of the point in the current buffer. Changes the next character to upper case if it is a character, and in any case, moves forward one character. Changes all the letters between the point and mark to lower case. Changes all the letters between the point and mark to upper case. If the point is in the middle of a word, it capitalizes the letter after the point and changes the rest of the word to lower case. Otherwise it capitalizes the first letter of the next word and changes the rest of the word to lower case. In any case the point is left at the end of the word. If the point is in the middle of a word, it changes the rest of the word to lower case. Otherwise it changes the next word to lower case. In either case the point is left at the end of the affected word. If the point is in the middle of a word, it changes the rest of the word to upper case. Otherwise it changes the next word to upper case. In either case the point is left at the end of the affected word. Reads a character from the terminal and inserts its octal ASCII value preceded by a back-slash '\' into the text at the point. For example if the character ESC is then typed, the string "\033" is inserted. Clears and redraws the screen without changing the screen contents or position. This is useful if the screen gets garbaged by output from another program or by someone writing to you. Saves the region bounded by the point and mark in the kill stack. The next call to yank will yank (insert) the region just saved. When in c-mode, the command c-tab is automatically bound to the tab key, and when invoked, the point is tabbed to the "right" place for C programs. The character after the point is deleted and the right-hand portion of the line moves one position to the left, leaving the point unchanged. If at the end of the line, the line boundary is deleted, thereby joining the current line with the next line. If the point is in the middle of a word, it deletes to the end of the word. Otherwise it deletes the entire next word. In either case, the point doesn't move, and the deleted text is saved in the kill stack. Makes the current window (the window the cursor is in) the only window by deleting all the other windows. The window grows to fill the screen as it is when the editor starts up. Deletes the character before the point and moves the right-hand portion of the line one position to the left. If the point is at the beginning of a line, the current line is joined with the previous line and the point is positioned after what used to be the end of the previous line. (DELETE may be labeled RUBOUT on some terminals) If the point is in the middle of a word, it deletes to the beginning of that word. Otherwise it deletes the entire previous word. In either case, the deleted text is saved in the kill stack. (DELETE may be labeled RUBOUT on some terminals) Deletes all the text between the point and mark, saving it in the kill stack. This is one of the the ways to move text from one place in the buffer to another. The yank command will insert the most recently deleted text at the point. JOVE remembers 10 separate kills in a kill stack. The yank-pop command can be used to go through the stack one at a time. Deletes all tabs and space around the point on the current line. This does not cross line boundaries. Prompts for the name of a command and puts a description of what the command does into a buffer. Prompts for a key and prints the command that is bound to that key. If there is more than one window on the screen, the current window is deleted and the cursor is moved to a neighboring window. The space from the deleted window is given to the new current window. Moves the point to the end of the buffer (just after the the last character in the buffer). Moves the point to the end of the current line. Moves the point to the end of the sentence. Moves the point to the last character in the window. Prompts for a buffer name, and deletes all the text in that buffer. If the buffer is modified, the user is asked for confirmation. Sets the mark to the point location and the point to the mark location. Typing this command twice is a handy way to see where the mark is without modifying anything. Prompts for a command to run using command completion. This is how all commands would be run if not for the bind-to-key command. (Space will cause auto-command-completion, RETURN will execute the command) All the characters that were remembered with the start-remembering command are executed as if they were typed at the keyboard. This is the same as execute-keyboard-macro except that it prompts for the name of a macro to execute. Exits JOVE. It asks for confirmation if there are any modified buffers which have not been written to files (except for SCRATCH buffers). Prompts for a UNIX command to send a region to. The region will be replaced with the output from the command. For example to format a C procedure, a region around the procedure could be defined and the filter-region command used to send the region through the UNIX C beautifier. Prompts for a file to find. If that file is not already in a buffer, it creates a new buffer and reads the file into that buffer. If the file is already in another buffer, that buffer will be selected instead. In any event the current buffer becomes the buffer with that file in it. Do a find-file into another window. If there is only one window, it is split. If there is more than one window, one of the windows that is not the current window is used instead. Finds the file with the C tag which is prompted for. The UNIX program ctags(1) should be used to create a database with the necessary information to find the file which contains the tag. If the tag cannot be found, the point and buffer are unchanged and no new files are read in. Moves the point to the first non-blank character in the current line. Moves the point forward one character in the buffer. If at the end of the current line the point is moved to the beginning of the next line. Moves the point to the matching close parenthesis (brace) of the open parenthesis (brace) right after the point. If there is no match, an error is reported and the point remains unchanged. If the point is in the middle of a word, it moves to the end of the current word. Otherwise it moves to the end of the next word. Multiply the numeric argument by four. The sequence ^U-^U-^N runs the command next-line 16 times. Moves the point to the numeric argument line in the buffer. If no argument is supplied, the point moves to the first line in the buffer. Makes the current window one line larger if it can. There has to be more than one window, and the window which would get smaller has to be big enough to get smaller. Incremental search forward. This is an interactive search command. It prompts for a search string (without containing search patterns) and starts searching forwards with each character typed to find the next line with that (growing) pattern. Once started, ^S or ^\ will search forward for the next occurrence of the current pattern, ^R will search backward for the previous occurrence of the current pattern, ^H or DELETE will shorten the pattern, ^G will end the search and return to the starting point, and any other character will stop the search without returning to the starting point. Carriage return will terminate the search and leave the cursor at its current position. Incremental search reverse. This is an interactive search command. It prompts for a search string (without containing search patterns) and starts searching backwards with each character typed to find the next line with that (growing) pattern. Once started, ^S or ^\ will search forward for the next occurrence of the current pattern, ^R will search backward for the previous occurrence of the current pattern, ^H or DELETE will shorten the pattern, ^G will end the search and return to the starting point, and any other character will stop the search without returning to the starting point. Carriage return will terminate the search and leave the cursor at its current position. If the named file exists and can be read, its contents are inserted into the current buffer at the point. Otherwise an error is reported and the point is unchanged. Initialize the bindings to the way they were at the beginning of the edit session. Justifies a paragraph surrounding the point. Paragraphs are bounded by blank lines or lines that begin with a period (such as NROFF control lines). The margin-length variable determines the length of each line in the paragraph. Deletes a named buffer. This command is not reversible; once the buffer is deleted, it is gone forever. It is useful when the editor runs out of space and there is a buffer which you no longer need. Kill all the text from the point to the end of the line. If the point is at the end of the line, the current line is joined with the next line. If a numeric count is given, the next count lines are deleted. The saved text can be yanked back with the yank command (see delete-to-killbuffer). If this command is run several times in a row all the kills are merged into the same kill stack entry; thus running the yank command will yank all of them back instead of just the last one. Creates a buffer called Buffer list that contains a list of all the buffers that JOVE currently knows about. Each line tells each buffer's number, type, associated file, name, and a * if the buffer has been modified. Writes all the modified buffers and runs the UNIX program make with output captured in a buffer called Errors. After the make is completed, the buffer is parsed for CC-style error messages to be used by the next-error command. Makes the editor forget that the buffer has been modified. The * on the mode line will disappear. A new macro is defined with the name supplied by the user. The current definition of the keyboard macro is copied into this new macro, making it possible to then change the keyboard macro without losing the old version. Now it is possible to run the new macro by binding the macro to a key, or with the execute-macro command. Note that only named macros are saved with the write-macros-to-file command, so to remember macros from one JOVE execution to another, one must give the macro a name, execute the write-macros-to-file command, and upon invocation of a new JOVE the read-macros-from-file command should be executed. Divides the current line at the point moving the point to the beginning of the newly created line. It is usually bound to the RETURN key. Divides the current line at the point like the newline command, but leaves the point unchanged. Sometimes called "opening" a line. Same as newline except that it inserts white space at the beginning of the newline copying the indent of the previous line. Takes the next error message (as returned by the commands parse-C-errors and parse-LINT-errors), finds the file in which the error occurred, and sets the the point to the line on which the error occurred. The error message will be displayed at the top of the Errors buffer. (The make command automatically runs the parse-C-errors and the next-error commands). Moves the point to the next line keeping the column as close to the "current" column as possible. Puts the bottom line of the window at the top of the window, moving the point to the top of the window and to the beginning of the line. Moves to the next window in the screen. If the current window is the last window, it moves to the first window. It is an error to attempt to move to the next window when there is only one window on the screen. Each line in the current window is displayed with its line number to the left. The line numbers are not part of the buffer and will disappear when this command is executed again (it toggles). This command does a next-page on the next window. If there is only one window the editor complains. When the variable show-match is non-zero, the close parenthesis/brace keys are bound to this command. When invoked, this command inserts the character typed and temporarily moves the cursor to the matching open parenthesis/brace for about one second. This command takes C compiler (or similar in format) errors and sets the editor up for subsequent invocations of the next-error command. Giving the UNIX command grep(1) the -n option prints its output in the same format as C compiler error messages, thus running grep -n into a buffer makes it possible to parse its output. This is a very useful way to look at all the occurrences of certain strings in several files. This is the same as parse-C-errors except that it parses lint(1) errors. If the system has the Berkeley job control features, control is returned to the superior shell. Otherwise an inferior shell is spawned. Moves the point to the previous line trying to keep the column the same. Moves the top line of the window to the bottom line, leaving the point at the top of the window and at the beginning of the top line. Move to the previous window in the screen. If currently in the first window, moves to the last window. It is an error to attempt to move to the previous window when there is only one window on the screen. Prompts for a variable name and prints its value. (See "Variables and Modes" later in this document.) Upon receipt of a search and a replacement string, the editor replaces all occurrences of the search string with the replacement string. For each occurrence the editor asks the user what to do. The choices are:

	' ' or 'y'	to replace this occurrence.
	'.'	to replace and stop.
	DELETE or 'n'	to skip this occurrence.
	'r'	to recursive edit.
	'p'	to proceed to replace all occurrences.
	RETURN	to stop.

When there are no more occurrences, the point is moved back to its initial position. Recursive edit makes it possible to temporarily suspend the query-replace-search, let the user go off and do some editing, and then return to the search after the editing is finished. Executing the command exit-jove returns from the recursive edit. Quotes the next character typed for insertion. This is used to insert special characters which otherwise would be interpreted as commands. The second version (^~) is included for terminals that may usurp ^Q for flow control purposes. Prompts for a file to read into the current buffer. It will erase the old contents, so if the buffer has been modified but not saved JOVE complains and asks for confirmation. Prompts for a file that was previously written with the write-macros-to-file command, and reads the macros back into the editor. Redraws the window with the current line in the middle of the window. If a numeric argument is provided the current line is moved to the argument line. If the current line is in the same place as before, the window is cleared and redrawn. If the value of the variable allow-^S-and-^Q is changed, this command should be called to make the necessary changes to the terminal. This is the same as query-replace-search except the editor does not ask whether to replace matched strings; it always does. Exactly what is says. It is useful when it is not apparent what the editor is currently doing. If a prompt or prefix is active, this key also aborts the command in progress. Scrolls the current window down one line. If the current line moves off the bottom of the window, the cursor is moved to the middle of the window. Scrolls the current window up one line. If the current line moves off the top of the window, the cursor is moved to the middle of the window. Prompts for a string to search for and searches for the next instance of that string in the buffer (see Searching above). The second version (^\) is included for terminals that may usurp ^S for flow control purposes. Prompts for a string to search for and searches for the previous instance of that string in the buffer (see Searching above). Prompts for a buffer name and makes that buffer the current buffer. If the buffer does not exist, a new buffer is created with nothing in it. If a number is supplied instead of a name and a buffer exists with that number, that buffer is selected. Otherwise, a new buffer is created with that number as a name. This is bound to all the keys that should be inserted when typed. This command does not work unless bound to a key. Running this command manually will probably cause a random character to be inserted. Prompts for a variable name and a value, and sets the variable to that value. Sets the mark to the current buffer location. Which of the two commands you use will depend on your terminal. Prompts for a string of characters to be used as the quote characters that will invoke the function "quote-char". The characters ^Q and ^~ are the default quote characters. Prompts for a UNIX shell command to be run, placing the output from the command into a buffer called the name of the command. If a numeric argument is provided, the buffer is left alone before the UNIX command is started. Otherwise the buffer is emptied. The same as shell-command except that it asks for a specific buffer to place the output in instead of a buffer called the name of the command. This prompts for a file name which contains editor commands. These commands typically set variables or bind commands to keys. Running source on a file which does not have editor commands in it will very likely cause the editor to crash. Shrink the current window by one line if the resulting window would not be too small. It is an error to run this command when there is only one window. Sends the entire buffer to the UNIX spell program. JOVE will go through the list of spelling errors and asks whether or not a word is spelled correctly. If it is not, JOVE remembers where each occurrence of the misspelled word is. The point in the buffer being spelled is positioned at the end of the current misspelled word. The next-error command moves to the next occurrence of the current word, or to the first occurrence of the next word. Splits the current window into two smaller windows, if the resulting windows would not be too small. The two windows have the same buffer associated with them, namely the one that the original window had. This tells JOVE to start remembering all the following keystrokes until the stop-remembering command is executed. The saved commands are saved as the keyboard macro, and can be re-executed with the execute-keyboard-macro command. This is useful when it is necessary to run the same command lots of times. This terminates the definition of a macro. See start-remembering for more details. Prints, on the message line, the number of characters between two quotes. The point must be between two quotes or the editor complains. Causes JOVE to suspend and fork an interactive subshell. When the subshell exits, JOVE will redraw the screen and pick up where it left off. If the SHELL environment variable is set, the program referenced by it will be used as the shell to be run, otherwise /bin/sh will be used. Same as pause-jove. When the variable text-fill is non-zero, the self-insert keys are bound to this command. This inserts characters like self-insert does but when the line gets to a certain length, a newline is automatically inserted before the word being typed. This makes it possible to type in a paper without having to remember to hit return, i.e the editor does it automatically. Exchanges the characters on opposite sides of the point, namely the character before the cursor and the character under the cursor. The unbound function is bound to all the keys that don't run commands. It is essentially a no-op. This makes the arrow keys work on the vt100 terminal. This is a special command that looks at the next character and performs the appropriate action. Users of terminals other than vt100's will not need to use this command and vt100 users will only use it implicitly via the arrow keys. This writes the current buffer to the file associated with the buffer, without asking. If there is currently no file associated with the buffer, the editor complains. (See the write-named-file command below). The second version (^X-^\) is included for terminals that may usurp ^S for flow control purposes. Prompts for a file and writes all the currently defined macros to that file. The macros can be read back into the editor with the read-macros-from-file command. Writes all the buffers that have been modified but not been saved. Prompts for a file name and writes the current buffer to that file. If the file already exists and is not the current file name, the user is informed and asked if he really wants to do it. Writing a file erases the old contents of the file. Takes the region between the point and the mark and writes it to a named file. Inserts, at the point, all the text that was most recently deleted with a delete command that saves the text it deleted to the kill stack. The point moves to the end of the inserted region. Goes through the kill stack inserting each entry one at a time, substituting it for the previous yank-pop insertion. The previous command has to have been the yank command or the yank-pop command.

Variables and Modes

The following is a list of variables which change the way the editor behaves. All the variables and the effect they have on the behavior of the editor are listed below. Some variables contain numeric values such as the tab stop spacing, while other variables simply act as flags to indicate whether modes or features are on or off. When certain variables are set to non-zero values, JOVE prints their abbreviations (in parentheses) on the mode line. For example, the line

   JOVE (C-SM-AI)   2: jove.c   "jove.c" *

indicates the variables c-mode, show-match, and auto-indent are all non-zero which enables their respective modes.

To put the editor in one of these modes, use the set command. The set command prompts for one of the mode variables to set. A non-zero value means the mode is on, and a value of 0 means the mode is off. To find out what the value of a particular variable is, you can use the print command.

When set to non-zero, JOVE disables the ^S (XOFF) and ^Q (XON) flow control characters, thus making it possible to bind editor commands to those keys. When this variable is set, search-forward can be bound to ^S, and quote-char can be bound to ^Q, like they are in real EMACS. Some terminals require flow control in which case this mode must remain off (e.g. DEC VT100). This variable affects the way the RETURN key works. Normally typing RETURN divides the current line at the point moving the point down to the next line. That still happens in this mode but the line is also automatically indented the same as the previous line. This is useful for block-structured programming languages such as C and PASCAL. This is integer variable that controls the making of backup files. If backup-files is 0, no backup files will be made. If backup-files is 1, JOVE will ask if the user wants a backup file whenever a file is written out and a copy of the file already existed. If backup-files is 2, then JOVE will always make backup files when possible (and without asking). The effect of a value of backup-files other than those listed is undefined. This mode affects the behavior of the tab character, the ')', and the '}'. Instead of just inserting the tab, the editor determines where the tab "ought" to be for the C language and tabs to there instead. The same thing happens with the close brace and close parenthesis; they are tabbed to the "right" place and then inserted. This mode is automatically entered if the file being edited ends in ".c" unless the c-mode variable is negative. This affects the way search works. When in this mode, JOVE ignores the difference between upper case and lower case so that a matches A as well as a. When this variable is non-zero, JOVE will not delay before printing the prompts "M-" and "C-X " below the status line. This variable is normally 0 (disabled) so that the efficiency of only updating the bottom line once for the prefix and the following character will speed up screen updates. This causes JOVE to ensure that edited files end with a newline. This is the default behavior and is recommended for normal use. To disable this feature, set the variable to 0. This tells JOVE how many spaces a tab should take up when it is printed. The default is 8. Tells the editor to run make with the -k option when running the JOVE command make. This allows detecting more errors in the make process. This defaults to off. This mode changes the way self-inserting characters work. Instead of pushing the rest of the line over, the character after the point is replaced. This tells JOVE how big the tab stops are for the specific terminal. When the terminal is in tabs mode (see stty(1)), JOVE will take advantage of that fact and optimize the cursor motion using hardware tabs. This mode makes regular expressions available. This is not the default for new users because certain characters in regular expression search strings do not do what one might expect. This is used by the justify-paragraph command and text-fill mode, and says how long it should try to make each line. The default right-margin is 72. This affects the close parenthesis (brace) characters. When one of those is typed in this mode it is inserted normally. Then the cursor flashes to the matching open parenthesis (brace) for one second and then moves back to the point. If the match was not on the screen, nothing happens. If there is no match in the buffer, the user is informed of the error. This changes the way the editor behaves when the point moves out of the range of a window. Instead of centering the line containing the point, the editor scrolls the screen by the number value of scroll-step and leaves the cursor on the line that was just off the edge of the screen. This is useful if the terminal is being used at a slow baud rate. When in this mode, the editor will automatically insert line breaks when lines reach the right margin. When using this mode, JOVE will try to use the "visible bell" feature of a terminal if it has that capability. When non-zero, JOVE writes all the modified buffers when the make command is invoked (default is non-zero).

FILES
/tmp	where the temporary files are stored.
/usr/lib/jove	help files, documentation and system-wide joverc
$HOME/.joverc	user's personal JOVE tailoring file

SEE ALSO
ed(1), "A JOVE Primer", "Tailoring the JOVE Editor"

DIAGNOSTICS
JOVE diagnostics are meant to be self-explanatory.

BUGS
It doesn't garbage-collect the tmp file so it could run out of tmp space when it doesn't have to.

There should be one bind-to-key command that works for both macros and built in commands.

There should be a way to abort read-file and the non-interactive search commands.

JOVE should not blow up when it tries to source a file which doesn't have editor commands in it.

Parse-LINT-errors does not work well with some newer versions of lint(1).