10.02.2013 Views

SlickEdit User Guide

SlickEdit User Guide

SlickEdit User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

WORKING WITH FILES<br />

If no arguments are given, the current working directory is swapped with the directory at the top of the<br />

directory stack. After using pushd, you can use the popd command to remove the top directory from the<br />

directory stack and make it the new working directory.<br />

Working Directory in the Build Window<br />

The working directory in the editor is different from the working directory in the Build tool window. The Build<br />

window is a shell that displays build and compile output, and also allows you to type operating system<br />

commands and see the results. It is docked to the bottom tab group of the editor by default. It can also be<br />

displayed by clicking View > Toolbars > Build from the main menu.<br />

The working directory is shown in the prompt inside the Build window. When you first launch <strong>SlickEdit</strong>®,<br />

the window is blank. Type a command in the window for the prompt to be displayed.<br />

By default, when the directory is changed in the editor, it is also changed in the Build window. However, the<br />

reverse is not true: changing the directory in the Build window does not change the directory in the editor.<br />

To make the working directory completely independent so that a change directory does not affect the Build<br />

window, make sure the Process chdir option on the Change Directory dialog is off (not selected) and save<br />

the settings (see Manually Changing the Working Directory).<br />

Creating Files<br />

<strong>SlickEdit</strong>® provides four methods for creating new files:<br />

• Using the e Command<br />

• Using the New File Dialog<br />

• Using Code Templates<br />

• Using Write Selection<br />

Using the e Command<br />

One of the quickest ways to both create and open files in <strong>SlickEdit</strong>® is to use the e command on the<br />

<strong>SlickEdit</strong> command line, using the syntax e file, where file is the name of the file. If the specified file does<br />

not exist, a new buffer by that name will be created. If it already exists, the file will be loaded in a new<br />

buffer. The e command is just a shortcut for the edit command, so you can use edit instead, if you prefer.<br />

If you’re opening a file and the file is not in the current working directory, use the full path. Command Line<br />

Completion will help entering file names and paths.<br />

Using the New File Dialog<br />

If you prefer working with an interface, use the menu item File > New to create a new file. This displays the<br />

New dialog open to the File tab. First select the Document Mode for the new file (recently chosen modes<br />

are listed at the top). If a project is open, the Add to Project box is checked automatically. Specify a<br />

Filename, the Location, and Encoding, then click OK. See the section on the New dialog’s File Tab for<br />

more information about these fields.<br />

You can create a new, untitled buffer by unchecking Add to Project, then double-clicking on a language in<br />

the Document Mode list.<br />

Using Code Templates<br />

Code templates are pre-defined units of code that you can use to automate the creation of common code<br />

elements, like a standard class implementation or design patterns. See Code Templates for more<br />

information and details about this feature.<br />

To instantiate a predefined Code Template, complete the following steps:<br />

<strong>SlickEdit</strong>® <strong>User</strong> <strong>Guide</strong> 147

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!