Editing Scripts

 
 
 

You can use the editing pane in the script editor to create and edit a script. You can cut, copy, paste, move, and type text in the editing pane. You can use the history pane as a source for copying text or as a reference for command names and syntax.

NoteYou must keep the mouse pointer over the script editor window when editing scripts. Otherwise, your keystrokes are interpreted as commands in the viewport or any other Softimage window.

Commands in the Script Editor

You can use the commands in the Edit and View menus on the command bar as well as in the pop-up (context) menu that appears when you right-click in either the history or editing panes. The context menus are shown in the following figures:

 
 

A

Context menu in the history pane.

B

Context menu in the editing pane. You can access more editing options from the context menu than from either the command bar menus or keyboard shortcuts. For more information about these features, see the Making Coding Easier topic.

You can also use the standard mouse and keyboard commands as shown in the following table.

Action/Command

Description

Ctrl+A, or choose Select All from the context menu (right-click)

Select all of the content in the history or editing pane.

Double-click on a word.

Select a word in the history or editing pane.

Triple-click on a line.

Select a line in the history or editing pane.

Drag to a new location.

Move the selected text to the new location.

Ctrl+drag to a new location.

Copy the selected text to the new location.

Ctrl+X, or Shift+Delete

Cut the selected text into the clipboard.

Ctrl+C, or Ctrl+Insert

Copy the selected text into the clipboard.

Ctrl+V, or Shift+Insert

Paste the text from the clipboard.

Ctrl+Z

Undo the last edit.

Ctrl+Y, or Alt+Shift+Backspace

Redo the last undone edit.

Ctrl+right/left arrow

Go to the next/previous word.

Ctrl+Home

Go to the beginning of the script.

Ctrl+End

Go to the end of the script.

Shift+arrow keys, Ctrl+Shift+arrow keys

Extend the selection.

Shift+Home

Select from the cursor to the beginning of the line.

Shift+End

Select from the cursor to the end of the line.

Ctrl+Shift+Home

Select from the cursor to the beginning of the script.

Ctrl+Shift+End

Select from the cursor to the end of the script.

Insert

Toggle overtype mode on or off.

Tab

Increase indenting on the selected block.

Shift+Tab

Decrease indenting on the selected block.

Finding and Replacing Text

You can find and replace text in the editing pane.

  • To find text, select Edit Find in the command bar or press Ctrl+F. The Find dialog appears.

  • To replace text, select Edit Replace in the command bar or press Ctrl+H. The Replace dialog appears.

    NoteYou can set your preferences for the search feature. For example, you can set the search feature to continue searching from the beginning of a file and specify what action to perform when a search string is not found. See Find and Replace Features for more information.

Incremental Search

You can use incremental search to find all the occurrences of a word in the editing pane at the same time. As you type the word that you want to search, all the matching words in the editing pane are highlighted. To use incremental search, select Edit Incremental Search in the command bar or press Ctrl+I. The incremental search is shown in the following figure.

A

As you type a word to search, it appears in the Incremental Search field. For example, in the figure when the word menu is searched, all the instances of menu are highlighted in the editing pane.

Clearing the Editing Pane

To clear all of the text from the editing pane, select Edit Clear Script Editor.

Important Using the Clear Script Editor option does not create a new script file. If a saved script file is open and you clear the editing pane and save it, the file on the disk is replaced. To create a new script file, click the new icon or select File New.

Using Bookmarks

You can use bookmarks for easily navigating to certain script locations in the editing pane. You can move from a bookmark to another until you find the location that you need. For example, you might want to switch between a call to a function and the function definition in a script.

You can set, remove, and navigate between bookmarks using these commands:

Command

Description

Ctrl+F2

Set or remove a bookmark in the line where the cursor is placed.

F2

Move to the next bookmark.

Shift+F2

Move to the previous bookmark.

Ctrl+Shift+F2

Remove all bookmarks from the file.

By default, bookmarks are indicated using light blue highlighted text in the editing pane as shown in the following figure.

Instead of the blue highlighting, you can choose to indicate bookmarks with a light blue square in the margin using the Selection Margin scripting preference. This is shown in the following figure.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License