MAINEDIT User's Guide, Chapter 13

previous   next   top   contents   index   framed top   this page unframed


13. Miscellaneous Commands

13.1. <abort>

The <abort> key is used to terminate a multicharacter command before type-in of the command characters is complete. This includes commands that prompt for responses; i.e., the <abort> key may be typed to a prompt.

On some operating systems, the <abort> key may also be used to terminate:

When the <abort> key is used, MAINED rings the terminal bell. If you were in insert or overstrike mode, you are returned to command mode. For example, if you accidentally type a command such as .F (to edit another file), you can type the <abort> key in response to the prompt in order to terminate the command.

When <abort> is used to terminate a macro or other executing command, there may be some delay before the command is actually terminated.

The actual key (or sequence of keys) used for <abort> is terminal-dependent. Refer to the information in Appendix B of the MAINEDIT User's Guide on your display module to determine the <abort> key for your terminal.

<ecm> also terminates multicharacter command type-in and prompt response.

13.2. Again

Use the A (Again) command to repeat the most recently executed command. Modifiers to the A command allow you to repeat the previous command exactly as it was typed (including any modifiers) or change the direction and/or count. See Table 13–1.

Table 13–1. Forms of the Again Command
Command Do Last Command Again, With:
nA count = n, original direction
QA original count and direction
+nA count = n, + modifier
Q+A original count, + modifier
-nA count = n, - modifier
-QA original count, - modifier

The - direction is towards beginning of file, and the + direction is towards the end of file.

A alone is especially useful for commands like S (Skip). For example, to get to a particular instance of the character “,” in a line of text, you might type 3S, (skip to the third comma in the line). If the comma you want turns out to be the fourth in the line, typing A advances you to the next comma, since the omitted count for the A command defaults to 1; the effect is as if 1S, had been typed.

As another example, suppose you type 27K to delete 27 characters. If the next command is QA, another 27 characters are deleted. Typing 5A deletes only five characters; typing A alone deletes one character. -A deletes to the left.

13.3. Undo

The H (“Hoops!”) undoes the last change to the current buffer. A “change” is everything altered since the last command typed. For example, if you type a macro that makes many modifications, H undoes them all. Also, changes that affect contiguous text on the same line are treated as a single change; e.g., when KKK deletes three characters, all three are restored by a single H command. Some changes may be undone with H, then “redone” with -H if you did not really want to undo them. See Table 13–2.

Table 13–2. Undoing Previous Commands on the Current Line
Command Action
nH undo previous n changes
QH undo all changes on current line
-nH redo next n changes
-QH redo all changes on current line

There is currently a limit of 500 undos per buffer; i.e., only the most recent 500 changes can be undone.

The H command does not work in CMDLOG.

13.4. Status Report

The = command displays a brief status report in the message line at the top of the screen. The report looks something like:

B=MANUAL F=mainedit-manual.txt P.L=41.48 X=1 C=-1

The fields are described in Table 13–3. Another form of the = command is described in Chapter 11.

Table 13–3. Fields Displayed by the = Command
Field Name Meaning
B name of current Buffer
F name of current File (shown only if buffer name is not equal to file name, case not distinguished)
P.L current Page and Line
M current left Margin (shown only if scrolled left)
X current column (X-coordinate)
C decimal code for the current Character (-1 means there is no current character; the cursor is beyond the end of the current line)

13.5. Suppress Output

Many operating systems have a command to “suppress terminal output”. This is usually a control key, referred to here as the <suppressOutput> key. If you press the <suppressOutput> key, MAINEDIT continues to function internally as usual, but the screen is not updated. Typically, screen update remains inhibited until you press the the <suppressOutput> key again.

Suppressing terminal output is useful if the screen is filling up with text that you do not really want to see (e.g., you are immediately going to G (Go) to a different page). It can, however, have the effect of confusing MAINEDIT's screen update algorithm, so that the display is incorrect until the screen is refreshed (with the QN command).

13.6. Refresh Screen

The N command refreshes (rewrites) text on the screen. This is useful if the screen becomes garbled. For example, some operating systems write messages to the user without regard to what may already be on the screen. The <suppressOutput> key can also cause the screen to be updated incompletely. The N command can be modified with a direction, count, or emphasis, as shown in Table 13–4.

Table 13–4. Commands to Refresh Part or All of the Screen
Command Refresh:
0N current status line
nN n lines at and below in current window
-nN n lines above in current window
QN the entire screen
Q.N the current window

Display modules that are able to query the screen size do so when you issue the command to refresh the entire screen (QN); if you change the size of your terminal emulator, you should issue the QN command so that MAINED adjusts the size of its display accordingly.

13.7. Setting Tab Stops

The Q<tab> command allows you to specify the columns at which the <tab> command stops. Tab stops are specified as an increasing sequence of positive integers separated by spaces and terminated by <eol>. The integers specify successive 1-origin columns for tab stops. A tab stop is always assumed at column 1. Additional tab stops beyond the last explicitly specified tab stop are defined at increments of n columns, where n is the difference between the last two numbers in the tab stop sequence. For example, the sequence 5 17 23 40<eol> puts tab stops at columns 1, 5, 17, 23, and 40, as well as at 57 (40 + 17), 74 (57 + 17), and so forth, since 40 - 23 = 17. As another example, the sequence 5<eol> puts tab stops at every fourth column (5 - 1 = 4). Tab stops are initially set at every eighth column, starting at column one, i.e., the setting specified by the command Q<tab>9<eol>.

Typing <eol> in response to the Q<tab> prompt means to use the current line in the edit buffer as the tab sequence. The current line should contain a sequence of integers as defined above.

?<eol> in response to the tab stop prompt displays the sequence for the current tab stop setting. This sequence is also stored in the line buffer, and hence can be recalled with the RL command. The recalled line could then be edited, and used to reset tabs via Q<tab><eol> as described in the previous paragraph.

The <tab> command (in command, insert, and overstrike modes) uses the current tab stop settings to determine the target column.

13.8. Changing the Frequency of Save Reminders

MAINEDIT may periodically display a suggestion that you use the F command to save your buffers. MAINEDIT maintains a variable called autoSaveLimit, which is the number of keystrokes between these save reminders.

The +F command is used to change the value of autoSaveLimit. When the command is issued, MAINEDIT offers the old value as a default and prompts for a new value. You may type <eol> to leave the value of autoSaveLimit unchanged. The smaller the value of autoSaveLimit, the more frequent the save reminders.

An autoSaveLimit of 0 disables the autoSaveLimit feature.


previous   next   top   contents   index   framed top   this page unframed

MAINEDIT User's Guide, Chapter 13