Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
12.  Using Text Editor Opening and Saving Documents To Save a Document to a New File  Previous   Contents   Next 
   
 

To Save a Document to the Original File

  • Choose Save from the File menu to save your work and continue editing your document.

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

Opening an Existing Document

You can open an existing document in these ways:

  • Open the document in Text Editor.

  • Select the file icon in File Manager and choose Open from the File Manager Selected menu.

  • Double-click the file icon in File Manager.

  • Drag the document's file icon to the Text Editor control in the Front Panel.

To Open an Existing Document from Text Editor

  1. Choose Open from the File menu.

    The Open a File dialog box lists files and folders in your current folder. You can browse the documents listed, or change to a new folder to locate other files on your system.

    Figure 12-3 Open a File dialog box

  2. Select the name of the document you want to open, or type the document name in the Enter file name field.

  3. Press Return or click OK.


    Note - You can also use this shortcut: double-click the document name in the dialog box.



    Note - To save a file from a CD-ROM or diskette that has been mounted, choose /cdrom/cd_name or /floppy/floppy_name through the menu button at the end of the text field, Enter path or folder name. Select the file name and click OK.


To Open an Existing Document from File Manager

  1. Display the document's file icon in a File Manager window.

    Figure 12-4 Document file icon

  2. Open the document in one of the following ways:

    • Double-click the document.

    • Select the document, then choose Open from the File Manager Selected menu.

    • Drag the document file icon to the Front Panel and drop the icon on the Text Editor control.

Working with Backup Versions

You can choose that Text Editor maintains a file containing the previously saved version of a file each time it performs a save. You do this using the Backup on Save menu item on the Options menu. The default setting is un-selected, so each time you run Text Editor, the setting reverts to the default.

When performing a save with Backup on Save selected, Text Editor first copies the original file to a new file name (the old file name with a percent character "%" appended), and then saves the edited file to the original file name.

To Recover the Backup Version of a File

You can revert to the previously saved version of a file in which you are interested as follows:

  1. Choose Open from the File menu.

    Text Editor displays the Open a File dialog.

  2. Browse to the folder containing the file in which you are interested, and select the corresponding file name with a percent character "%" appended.

    Text Editor opens the file.

  3. Use the Save As command in the file menu to overwrite the original file.

    The original file now contains the contents of the previous version.

Entering Text

As you create a document, you type and edit text. A cursor (I) shows your current position. Characters are inserted unless you set Overstrike mode (see "To Set Overstrike Mode").

To Enter New Text

  • Click in the document and start typing.

To start a new line, press Return. Or, you can use the Wrap To Fit option to automatically wrap text at the edge of the window.

To start a paragraph, press Return twice.

Using Wrap To Fit

Wrap To Fit controls whether lines are automatically wrapped to fit the width of the window. When Wrap To Fit is set on, lines are broken automatically at the edge of the window. Because these line breaks are dynamic, you can resize the Text Editor window and the text automatically adjusts to fit the new window width.

When you save your document, you decide whether to add a line break to each of the wrapped lines, or to discard the dynamic line endings. When you save your document, you choose one of these options:

  • Add a newline character (hard return) to the end of each wrapped line to preserve each line ending as it currently appears.

  • Or, preserve only line breaks that were created by pressing Return.

To Set Wrap To Fit On or Off

  • To set Wrap To Fit on, choose Wrap To Fit in the Options menu. To set Wrap To Fit off, choose it from the menu again.

 
 
 
  Previous   Contents   Next