Code Editor
Code Editor is a full-featured source code editor for web programming languages. You can access it by clicking on Code tab at the bottom of the Work Pane.
Code Editor and Designer can be used combined, since both are synchronized: changes in one of them are immediately reflected in the other. This is what makes RadPHP such a powerful editor, because you can combine the ease of visual development with the flexibility of source code edition.
Contents |
Features
Code Insight
Code Editor’s code completion tool, Code Inisght, helps you write your code easier, faster, and with much more precision, by assiting you in the selection of properties and methods. You can trigger this tool pressing Ctrl+Space.
Code Insight can also be used to insert code templates on your code. Code templates are common code structures, mainly those inherent to programming language control structures such as conditional statements or loops. To get a code template printed, write the beginning of your code structure, and press Ctrl+J. For example, if you write for and then press the aforementioned key combination, you will get somethign like the following:
for($i=0;$i<=;$i++) { }
There are a lot of code templates available. To get a list of available code templates at a given point of the source code, use its key combination on an empty line there.
Error Insight
Error Insight checks your PHP code for syntax errors, and marks them, both on the Code Editor itself, by underlining the erroneous code in red, and on the Structure widget, listing the errors and their location.
Other
- Syntax highlighting.
- Undo and redo capabilities.
- Bookmarks, to ease code browsing.
- Code Folding.
Settings
You can customize Code Editor from Tools > Options… > Editor Options and any of its child items in the tree view. From them, you can change keystroke mappings, fonts, margin widths, colors, syntax highlighting, indentation styles and more. Once done, click OK to apply the changes.
Source
From Tools > Options… > Editor Options > Source Options you can customize the way Code Editor behaves for different types of files.
| Option | Description |
|---|---|
| Auto indent mode | When you press Enter, new line uses same indentation as preceding line. |
| Use tab character | Insert tabs (instead of white spaces) when pressing Tab. |
| Smart tab | When you press Tab, text cursor is moved forward to the first possible indentation level of a line above the current one. |
| Cursor through tab | Arrow keys can move text cursor through tabs as if they were white spaces. |
| Optimal fill | Begins every auto-indented line with the minimum amount of characters possible, using tabs and white spaces. For example, if tabs are 4 characters long (white spaces are always 1 character long), and a 10-character-long indentation is to be filled, it will be filled with 2 tabs and 2 white spaces (only 4 characters). |
| Backspace unindents | When you press Backspace, text cursor is moved back to the first possible indentation level of a line above the current one. |
| Keep trailing blanks | Prevents trailing white spaces from being truncated. |
| Show tab character | Displays a gray > at the location of any tab character. |
| Show space character | Displays a gray · at the location of any white space character. |
| Use syntax highlight | Use different font settings (color, boldness and more) to highlight different elements of the programming language associated to the file. |
| Show line breaks | Displays a gray ¶ at the location of any white space character. |
| Highlight current line | Highlights the line where the text cursor is located. |
| Block indent | Amount of indentation to be used when indenting several lines, which is done with Ctrl+Shift+I by default. |
| Tab stops | How many characters long tabs should be. |
Keyboard Layouts
Keyboard layouts determine the way your keyboard keys and shortcuts behave.
After working with a given IDE for a long time, you often get used to certain keyboard shortcuts that let you work faster. As silly as it might seem, having to stop using those shortcuts and learn brand new shortcuts is one of the most painful things to face when migrating to a different IDE. In RadPHP, we ease you the process by letting you completely customize your keyboard layout, so the Code Editor does what you expect it to do, and not the other way around.
From Tools > Options… > Editor Options > Key Mapping you can choose between different existing keyboard layouts, or even create your own personal keyboard layout from an existing one. The following default keyboard layouts are available:
- Default keyboard layout.
- Classic keyboard layout.
- BRIEF™ emulation, based on BRIEF’s keyboard layout.
- Visual Basic™ emulation, based on Visual Basic’s keyboard layout.
- Visual Studio™ emulation, based on Visual Studio’s keyboard layout.
Help Resources
- There is a video tutorial which covers some Code Editor features and settings.