This is probably the most interesting part of the SED manual, we will learn how to quickly edit scripts with smart built-in shortcuts...
Commenting lines is very useful when you want the compiler in the engine to
skip a part of code.
To comment lines, select them and press the blue //...
at the toolbar. You can also press [Ctrl+Alt+C]. This
will add // before each of the selected lines.
To uncomment lines select them and press the red //...
at the toolbar button or press [Ctrl+Shift+C]. This
will remove // from each of the selected lines.
The code jumper can save you very much time, let's say you write a function
named "myfunction". Then when the script gets bigger you decide to
go back and change it, now you will use the code jumper.
As default it is located at the right, and contains all this script's functions/actions/strings
etc.
Just expand the functions section of the code jumper and click on myfunction.
The cursor position will take you to myfunction in directly.
We know that the elementlist contains all of the script's elements, such as
its wdl and pcx files that is included. To open these files, go to the element
list and click an item.
If it is a script it will be opened in SED, otherwise the associated application
will start.
Syntax Checking is a powerful way to check if there are any errors in your code. To provide you with the correct errors a Test Run should be made before syntax checking, however the Test Run function will automatically do a syntax check after the engine has been executed.
To quickly syntax check your code, use [F5] for Test Run and [F6] for syntax check.
While you writing you should notice the auto indent function that automatically
indents when pressing [Enter], also when pressing
[Enter] and if a { is located in the line, a } symbol
will be added automatically. A tab will be added to the line to indent the code
between the brackets.
Same thing happens with the ( symbol, when you add it, a ) symbol is added automatically.
All windows attached to SED is floating, which means they could be moved and the position will be stored. So use this and customize colors, located in the syntax menu, to get a nice interface for your needs.
Some shortcuts to keep in mind:
- [Alt+Left] jumps to the last edit position.
- [Ctrl+F6] switches between opened scripts.
- [F1] brings up a help file.