LispWorks IDE User Guide > 13 The Editor > 13.8 Basic Editor commands

NextPrevUpTopContentsIndex

13.8.1 Opening, saving and printing files

When you first start up the Editor, the first thing you must do is open a file.

Use file extensions .lisp or .lsp for Common Lisp files. The Editor recognizes these extensions and places the buffer in Lisp mode. Lisp mode provides special features for use in Lisp editing, as described in Lisp mode.

You can create a new Lisp buffer by choosing File > New or clicking on . The new file is automatically in Lisp mode, and the buffer is called "Unnamed". When you try to save this buffer, the Editor prompts you for a filename.

As you have already seen, you can open an existing file by choosing File > Open... or clicking on . A dialog appears from which you can select a file to edit.

To save a file, choose File > Save or click on . If the file has not been saved before (that is, if you created the file by choosing File > New and this is the first time you have saved the file), you are prompted for a directory and a filename.

You can also save a file by using the keyboard command Command+S or Ctrl+X Ctrl+S .

If you want to make a copy of the file (save the file under a different name) choose File > Save As... and specify a name in the dialog that appears.

Choose File > Revert to Saved to revert back to the last saved version of the file. This replaces the contents of the current buffer with the version of that file which was last saved on disk. This command is useful if you make a number of experimental changes which you want to abandon.

As well as saving whole files to disk, you can save any part of a file to disk under a different filename. To do this:

  1. Select a region of text by clicking and holding down the select mouse button, and dragging the pointer across the region of text you want to save. The text is highlighted as you drag the pointer across it.
  2. With the text still highlighted, choose File > Save Region As... .
  3. In the echo area, specify the name of a file to save the selected text to.

Note that the selected text is copied into the new file, rather than moved; it is still available in the original buffer.

To find out more about selecting regions of text, see Marking the region. To find out more about operating on regions of text, see Using Lisp-specific commands.

To print the file in the current buffer to your default printer, choose File > Print... . The printer can be changed or configured by using the standard Mac OS X Print Center utility.


LispWorks IDE User Guide (Macintosh version) - 22 Dec 2009

NextPrevUpTopContentsIndex