This chapter contains these sections:
To start jot, open the Find menu in the Toolchest, select Applications, and click on the jot icon.
To start jot from a shell window, type jot.
jot is a fast, mouse-based, ASCII text editor tuned to run on Silicon Graphics workstations. jot offers many useful features:
jot can edit very large files.
jot documents are saved as standard ASCII text files.
jot allows you to use the mouse to cut, copy, and paste text throughout the file. In addition, text can be cut and pasted between mail utilities and shell windows.
Any ASCII text file can be opened with jot, regardless of how it was created.
An entire text file can be inserted into a jot document.
jot has many features to help with C and C++ source code editing.
A row of five pulldown menus (plus a help menu) contain most of the commands you use every day.
The File menu contains operations to change the file you're editing, insert text from another file, print, save, and quit.
The Edit menu contains commands that copy and paste, and perform other commands that modify text.
The View menu contains commands that let you show line numbers and move around in your file.
The Select menu contains commands that make it easy to select, mark, and search text.
The Options menu contains commands that let you change the layout of your jot file.
The Help menu contains files that explain how to work with the jot editor. It also contains a very useful tutorial for jot users.
If you are interested in learning how to use the vi text editor, see Appendix A, “vi Text Editor.”
The File menu contains most of the commands you need to change the file you're editing, insert text from another file, print, save, and quit. The File menu contains these choices:
| New | Opens a new file. | |
| Open | Opens an existing file. | |
| Insert from file | Inserts text from another file, such as another jot document, at the current text cursor location. | |
| Save | Saves your file. | |
| Save as | Lets you save your file as a new file with a different name. | |
Prints the file. | ||
| Quit | Quits jot. |
Most of jot's menu entries are followed by a special key name and then a letter. For example, under the File menu, the “New” command is followed by Alt + N. This is the keyboard shortcut. Hold down the <Alt> key and type n to invoke “New.” Do not capitalize the n unless the jot menu shortcut indicates that you should. For example, if the shortcut is Alt + capital N, jot lists the shortcut as <Shift + Alt + N>.
To protect your work, save your file periodically. To save your jot document to disk:
Choose “Save” from the File menu.
If your document is untitled, the first time you choose “ Save,” the “Save As...” dialog box appears. Enter a filename, or a complete pathname, for your new jot document. Using the Save command thereafter simply saves any modifications you've made to your document, and no dialog box appears.
Remember that capitalization is important: file and File are two different files.
Press <Enter>.
Choose the “ Save As...” command to save a copy of your document under a different filename.
If the file is too long to be completely displayed in the window, a scroll bar appears on the right side of the document window. The white section in the scroll bar indicates the size and position of the selection. If your file contains fewer lines of text than there are available lines in the jot window, only the white section appears, and there is no scroll bar.
You can scroll your document several ways:
Use your left mouse button to drag the scroll bar up and down.
To scroll one line of text, click on a scroll arrow.
For a continuous scroll, press and hold a scroll arrow.
To scroll one full page of text, click on a scroll arrow while holding down the <Shift> key.
To jump to a relative position in the document, click within the scroll bar.
The View and Select menus contain commands that let you move around in your file.
| Top of File | Moves the cursor to the top of the file. | |
| Bottom of File | Moves the cursor to the bottom of the file. | |
| Page Up | Moves up one page in the file. | |
| Page Down | Moves down one page in the file. | |
| View Only | Locks the file so it can be viewed but not edited. | |
| Show Line Number |
|
The Select menu commands make it easy to select, mark, and search text.
| Select All | Selects all of the text in the file. | |
| Jump to Line | Moves the cursor to the line in the file that you specify. | |
| Search Forward | Searches forward in the file from the cursor's location. |
| Wordwrap Lines |
| |
| Automatic Indent |
| |
| Search by Case | Allows you to search words with both initial and internal capitalization. | |
| Long Menus | Changes the commands in the File, Edit, View, Select, and Options menus to include advanced commands. See “Using Advanced Features in jot” for information on the Long Menu features. |
The Edit menu contains commands that copy and paste and perform other commands that modify text. You can display the Edit menu as a pop-up menu any place within the jot window by placing the cursor over the window and pressing the right mouse button.
These sections describe the other following functions available in jot:
You can select text three ways:
Hold down the left mouse button and drag the cursor over the desired text.
Click to position the cursor at the beginning of the desired selection, hold down the <Shift> key, and then click at the end of the selection.
Double-click on a word to select only that word.
The selected text appears highlighted.
You can duplicate selected text in another location by using the middle mouse button. You can duplicate the selected text in either another jot document window or in a shell window.
To duplicate text:
Select the text in the jot window.
Position the text cursor in the application window where you'd like the copy to appear.
Press the middle mouse button.
A copy of the entire selection appears at the text cursor.
Choose the “ Undo” command to undo the effect of the last action you performed. “Redo” reapplies the last action.
Choose the “ Cut” command to completely remove selected text and place it in a memory buffer.
To cut text:
Select the text.
Choose “ Cut” from the Edit menu.
Choose the “ Copy” command to copy selected text into the memory buffer. Copying text creates a second, identical version of the text and has no effect on the original text.
To copy text:
Select the text.
Choose “ Copy” from the Edit menu.
Choose the “ Paste” command to paste the contents of the memory buffer at the position of the text cursor. If the buffer is empty, choosing “ Paste” has no effect. You may use the Paste command to paste into the same jot document from which you cut or copied, or into another jot document window.
You may also paste into a shell window by clicking the middle mouse button.
To cut or copy text and paste it into a new location:
Select the text.
Choose “ Cut” or “ Copy” from the Edit menu.
Position the cursor where you want the text.
Choose “ Paste” from the Edit menu.
Choose the “ Select All” command to select the entire contents of your jot document.
Follow these steps to insert a file into your jot document:
Place the text cursor at the appropriate location within the jot document you're working on.
Choose “ Insert File...” from the File menu.
A dialog box appears.
Enter the pathname of the text file you want to insert.
Click Insert.
The text file is pasted into your document at the text cursor location.
Choose “Long Menus” from the Options menu to access the advanced editing features in jot. When you select “Long Menus,” more choices appear in each of the menus. What follows is a basic reference to the features that are added with the “Long Menus” option, including:
For more programming-oriented information on jot, its advanced features, and customization, see the jot reference page. You can also gain a better understanding of these features by opening the Help menu in jot and selecting “Tutorial.” After you open the tutorial, go to its “Advanced Topics” section.
Once you develop an awareness of the advanced menu commands you use often, you will find the keyboard shortcuts to be a quick option to actually using the menu. See “Using Keyboard Shortcuts” for more information.
The jot long menu option adds four File menu choices: “Reopen,” “Reopen Next,” “Forget Reopen Entry,” and “Exit with no Save.”
| Reopen | Allows you to reopen recently opened files. This command triggers a rollover menu of filenames for you to choose from. | |
| Reopen Next | Reopens files in the order that you last opened them. For example, if you opened file A, then file B, then file C, and you are currently in file C, “Reopen Next” will reopen file A. If you choose “Reopen Next” again, file B will be opened. | |
| Forget Reopen Entry |
| |
| Exit with no Save |
|
The jot long menu option adds nine Edit menu choices: “Append to Copy,” “Newline and Indent,” “Indent,” “Exdent,” “Transpose,” “Uppercase,” “Lowercase,” “Initial Caps,” and “Reformat.”
| Append to Copy |
| |
| Newline and Indent |
| |
| Indent | Indents current or selected lines by four spaces. | |
| Exdent | Reverses indentation by four spaces. | |
| Transpose | Transposes the characters on opposite sides of the cursor, or reverses selected characters. | |
| Uppercase | Tranforms all letters in a text selection to uppercase. | |
| Lowercase | Tranforms all letters in a text selection to lowercase. | |
| Initial Caps | Capitalizes the first letter of a selection of text. | |
| Reformat | Reformats block of selected text to the right margin. This command cleans up the ragged paragraphs that can develop as a result of having the “Wordwrap” feature turned off. Note that this feature does not align the text to the right margin, the text alignment will still be with the left margin. |
The jot long menu option adds two View menu choices: “Show Cut Buffer” and “Split Window.”
| Show Cut Buffer |
| |
| Split Window | Creates another jot session of the file you are currently using. The original window is reduced to half size and the new jot window is started directly below it. The new session is a “View Only” mode duplicate of the first one. You can cut from the “View Only” session and paste into the original session. Changes made to one window will not be reflected in the other. |
The jot long menu option adds ten Select menu choices: “Select Line,” “Select Paragraph,” “Get Selection Info,” “Search Back,” “Search and Replace,” “Paste and Search,” “Set Mark,” “Delete Mark,” “Jump To Mark,” and “Jump To Tag.”
| Select Line | Selects the entire line in which the cursor is currently placed. | |
| Select Paragraph |
| |
| Get Selection Info | | |
| Search Back | Searches backward in the file from the cursor's location. | |
| Search and Replace |
| |
| Paste and Search |
| |
| Set Mark | Sets a mark at the location of your cursor. This mark is indicated in blue in the scroll bar to the right of your text. | |
| Delete Mark | Deletes the mark you set with “Set Mark.” | |
| Jump to Mark | Moves your cursor to the mark you set with “Set Mark.” | |
| Jump to Tag | Brings up your tags file, indicating the source code for the function you specify. This feature is for people who use the IRIX ctags command to create a tags file; jot can use the information in that file to access procedure names in C or C++ programs. |
The jot long menu option adds eight Options menu choices: “Search Reopen List,” “Electric C Mode,” “Define Macro,” “Perform Macro,” “Save Macros,” “Filter,” “Shell Command,” and “Short Menus.”
| Search Reopen List |
| |
| Electric C Mode | Helps you type C or C++ source code by making some adjustments to your current jot session. These are the basic Electric C Mode characteristics:
| |
| Define Macro | Programs any user-specified sequence of keystrokes into the F1 through F12 keys. You choose which “F” key to define from the “Define Macro” rollover menu. After you choose the key, type in the definition you want. Then, go back to the Options menu and select “End Macro Definition.” | |
| Perform Macro | Performs the macro of your choice, which you select from the “Perform Macro” rollover menu. | |
| Save Macros | Saves all your current defined macros to your ~/.jotmacs file. Every time you open jot, the .jotmacs file is read. | |
| Filter | Allows you to apply an IRIX command to a selected section of text. For example, you could use “Filter” to apply the sort command to a text list. The sorted list will then be stored in your “Cut” buffer. To replace the old list with the sorted list, use the “Paste” command. | |
| Shell Command | Allows you to apply an IRIX command to a selection of text, which is printed out in your console window. The original text selection stays the same, but the console printout of your selected text reflects the command you entered. | |
| Short Menus | Changes jot's menus to the shortened versions, which leave out the more advanced commands. |