# Basic Editing Functions

This page describes basic editing functions of the JDE source editor.

- Creating a new file
- Opening an existing file
- Saving files
- Inserting text
- Deleting text
- Selecting text
- Finding and replacing text
- Keyboard Commands
- Editing multiple views of the same file

## Creating a New File

There are two ways you can create and edit a new file:

- Choose File -> New. This opens a new file in the main source editor window (after prompting you to save changes in the current file).
- Choose File -> New Editor Window. This opens a new file in a new editor window.

## Opening an Existing File

There are three ways you can open an existing file:

- Click the Open file button in the editor.
- Choose File -> Open.
- Choose a file from the picklist in the File menu.

## Saving Files

There are two ways to save the file you are currently editing:

- Click the Save Current File button .
- Choose File -> Save.

If you want to save the current file to a different file name:

- Choose File -> Save As.

To save all the files currently being edited in all open editors:

- Choose File -> Save All.

## Inserting Text

Move the cursor to a location in the text and start typing. You can move the cursor using either the mouse or the arrow keys.

## Deleting Text

There are a number of ways to delete text:

- Delete one character to the left of the cursor using the Back Space key.
- Delete one character to the right of the cursor using the Delete key.
- Delete selected text using the Delete key.
- Delete the current line using Control+D.
- Delete the next word to the left using Control+BackSpace
- Delete the next word to the right using Control+Delete

## Selecting Text

You can select text in the following ways:

- Drag through the text you wish to select.
- Click at the beginning of a selection and Shift-click at the end of the selection.
- Double-click on a word to select it.
- Triple-click on a line to select it. You can also select a line by clicking next to it in the left margin.
- Use Shift and the arrow keys to select text.

You can perform the following actions on selected text:

- Copy the text to the clipboard. Choose Edit -> Copy or use Control+C.
- Cut the text and place it on the clipboard. Choose Edit -> Cut menu item or use Control+X.
- Paste copied or cut text to a new insert point. Choose Edit -> Paste or use Control+V.
- Type-to-replace the selected text. If you type while text is selected, the selected text is replaced with the characters you type.

## Finding and Replacing Text

To find a text string | Choose Edit -> Find or use Control+F to open the Find dialog box
To find and then replace a text string | Choose Edit -> Replace or use Control+T to open the Replace dialog box
To repeat a find operation | Choose either the Edit -> Find Forward or Edit -> Find Backward menu item, press F3, Shift + F3, or click on the Find Backward checkbox in the dialog box.

- Both the Find and Replace dialog boxes automatically place text selected in the editor window in the Find text box.
- Both the Find and Replace dialog boxes maintain a list of the 20 most recent strings. You can move up down the list using the arrow keys when the Find text box has focus.
- Regular expressions (substitution characters) are not supported in this release.

## Keyboard Commands

You can use the keyboard to execute many source editor commands and to navigate within the source editor window. See Keyboard Actions for a list of these commands.

You can customize the keys that are assigned to these commands. Use the Keyboard Preferences dialog box (Preferences -> Keyboard) to view, add, or delete key assignments.

## Editing Multiple Views of the Same File

There are two ways to edit the same file in multiple editor windows:

- Choose File -> Clone Editor Window.
  - A new editor window is loaded with the same file.
  - The cursor in the cloned editor is positioned at the same location.
  - This process can be repeated multiple times.
- Use File -> Open to open a file that is already loaded in another editor window.

Things to be aware of when editing files in multiple editors:

- The multiple editors all operate on the same copy of the file in memory.
- When you change the contents of the file in one of the editors, the displays in all of the other connected editors are updated.
- When you save the file in one of the editors, the file is considered saved in all of the editors.

See also:

  Editing Source
  Editor Controls
  Version Control