×
Menu

Editing, Searching and Replacing

 
Editing GPC source code is done by simply using the keyboard to change the contents, inserting and deleting text as needed. The GPC editor supports all standard operations such as Undo, Redo, Cut, Copy and Paste. These operations can be found in most editors and perform in very similar ways. You can perform these operations by selecting the corresponding menu item in the Edit menu, by clicking its button on the toolbar or by using the keyboard shortcuts. Additionally these operations are also available in the context menu.
 
Editing, Searching and Replacing
 
 
Indentation
 
Indenting text is a common operation when dealing with source code editing, and the GPC editor includes full support. Indentation is the addition of extra white space at the start of a line to separate blocks of text, adding a hierarchy. Normally when editing, pressing the Tab key will insert a tab character at the current location. However, if some text is selected, pressing the Tab key (by default) will add additional white space at the beginning of each line that has any selected text, allowing to indent entire blocks of text at once. Pressing Shift-TAB will remove the indentation.
 
Overtype
 
You can enable and disable overtyping (that is, instead of inserting characters at the cursor, you replace them) by pressing the Insert key of your keyboard. The rightmost section of the statusbar will indicate the current mode: INS for inserting characters, OVR for overwriting them (overtype). The displayed cursor will also change shape accordingly.
 
Selecting Text
 
 As with any known text editor, you can select text using either the mouse or keyboard. Selected text can be moved to some other part of the same document, copied elsewhere in the same or another document, searched for text, deleted, and more. When using the mouse, the most basic way is to drag the mouse from a start point to an end point. You can also double click a word to select it, or triple click on a line to select it. The same effect is achieved by a simple click on the line number margin, when displayed. You can extend a selection by shift clicking its new insertion point. When using the keyboard, the expected procedure is to use navigation keys in conjunction with the Shift modifier.
 
To select a rectangle, use the above methods while also holding the Alt modifier key down. For example, the basic way with the mouse is to Alt-click the start point and Alt-move the mouse to the end point, and so forth. It is possible to combine a stream selection and rectangular selection, using the keyboard.
 
1
Undo/Redo
1. Undo/Redo
Undo is a command that erases the last change done to the GPC script file, reverting it to an older state. The opposite of undo is redo. The redo command reverses the undo or advances the buffer to a more current state.
2
Copy
2. Copy
This function copies the currently selected text in the editor to the systems clipboard.  The copied text can then be pasted into another file or on our Support Forums.
 
The Cut function also copies the selected text to the clipboard, however, it also deletes it from editor.
3
Paste
3. Paste
This function pastes the text from the clipboard into the active tab in the compiler.
4
Select All
4. Select All
Selects all the source code of a GPC script file
5
Searching and Replacing
5. Searching and Replacing
You can search text as in most programs using the Find dialog (Ctrl+F). The find dialog will always stay on top of the text, but you can still edit the text if it's opened.
 
In the 'Find what' field, type the text you want to find. 'Match whole word only' will only result in a hit if the match consists of an entire word, not if it's partial (for example, but not limited to, white space separated). 'Match case' enforces that search results have exactly the same case as the query. If this is disabled, the search is case insensitive. The search direction determines to what relative direction of the cursor will be searched. Up means text before the cursor will be searched, Down means text beyond the cursor will be searched. To find the (next) hit, press 'Find Next' (or Enter).
 
The 'Replace' dialog is a supplement to the Find dialog. All the same rules still apply, but now you can replace the found text with some other text., or nothing if you want to remove it. 'Replace All' will replace all occurrences of the query with the replacement text.