Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
  Previous   Contents   Next 
   
 
Chapter 12

Using Text Editor

This chapter describes how to create and edit short documents such as memos, mail messages, or resource files using Text Editor.

Opening and Closing Text Editor

There are several ways to start Text Editor from your desktop.

To Open Text Editor

  1. Open the Applications subpanel in the Front Panel and click the Text Editor control.

Text Editor can also be started from the command line by typing this command in a Terminal window:

dtpad filename &

The file name is optional.


Note - If the path /usr/dt/bin has not been set in your .cshrc file, then type /usr/dt/bin/dtpad to run Text Editor from the command line.


To Close Text Editor

  • Choose Close from the File menu or press Alt+F4.


Note - If your keyboard does not have an Alt key, ask your system administrator to identify the corresponding key.


Text Editor Window

You create and edit a document in the Text Editor window. The title bar displays the name of the current document. A new document is named (UNTITLED).

Figure 12-1 Text Editor window

You can optionally display a status line that reports the number of lines in your document and enables you to go to a specific line number.

To Display the Status Line

The status line displays the line number where the insertion cursor is located and the total number of lines in the document. It also reports Text Editor messages and indicates whether Overstrike mode is active.

  • Choose Status Line from the Options menu. To remove the status line, choose Status Line again from the menu.

Opening and Saving Documents

You can create a new document or open an existing document. Opening a document displays the contents of a selected file in the Text Editor window.

Saving a document stores the edited contents into a file. You can save a document to its original file or to a new file.

You can choose that Text Editor maintains a file containing the previously saved version of a file each time it performs a save during the current session.

To Create a New Document

A new document named (UNTITLED) is created when you start Text Editor. To enter text in your document, see "Entering Text". You provide a new file name when you save the document.

After finishing a document, you can create another document using the New command.

  • Choose New from the File menu.

The Text Editor window is cleared and a new document is created. If you have not saved your current document, a dialog box is displayed that enables you to save your document.

To Save a Document to a New File

  1. Choose Save As from the File menu.

    The Save As dialog box lists files and folders located in your current folder. You can store your document in the current folder, a subfolder, or a folder that you specify.

    If you used Wrap To Fit, the dialog box includes an additional choice about handling line endings. If Wrap To Fit is set off, the dialog box omits this choice (see "Using Wrap To Fit").

    Figure 12-2 Save As dialog box

  2. Optional. If you do not want to save the file to the current folder, choose a subfolder or indicate a different folder.

    • For a subfolder, select the subfolder in the Folders list and press Return.

    • For a different folder, use the .. (go up) icon to change to a folder or type its path name in the Enter path or folder name field.

  3. Type a new file name in the Enter file name field.

  4. Press Return or click OK.


Note - To save your document to a diskette that has been mounted, choose /floppy/floppy_name through the menu button at the end of the text field, Enter path or folder name. Type a name in the Enter file name text field and click OK.


 
 
 
  Previous   Contents   Next