SIL™ Manager
The SIL™ Editor
The SIL™ editor is the central point where you develop your scripts. It offers basic text editing: syntax highlighting, autocomplete, and a source file management across all defined trees. For all scripts that reside in the virtual directories, this tool offers the power of Simple Issue Language™ or SIL™ at your crafty fingertips.
You can edit various files here, not only scripts, although this is the main view, and selected by default. Just click the View dropdown and select what you want to edit. Cprime Home points to our aliases files and templates, so you can switch between those views.
When you select a file in the script browser, its contents is loaded to the editor. When you are editing the script, two important actions are also available: Check button to checks the syntax of the script and Save that saves the script in the storage (either file or database).
Menus are all contextual. With the right click you open the contextual menu where you can perform actions related to that item:
New File / New Folder actions are available only for the folder nodes. Clicking them will ask you the name of the file or directory to be created on the server side.
Delete action is available for both directories (folders) and files. It deletes the file or directory. You cannot delete a directory unless it's empty.
Rename action is also available for both directories and files.
Refresh action is available for directories, and it rescans the virtual files below the selected levels, re-populating the tree with entries found on the server-side, either from disk or database storage.
Storage options for individual script files.
Access contextual menu from the Selection drop-down box.
Important
Note that delete and rename operations are performed without checking for usages. If your script is already used, for instance in a post function for a certain workflow, deleting or renaming it will break that workflow. Be careful when performing these operations.
The editor also offers basic search and replace facilities for the current selected file, as well as a full-screen mode, if you want to fully concentrate on your script.
File search
When you select a folder, you can start typing in the search box to find files by name. Note that it searches files and folders recursively and also looks inside folders under the currently selected one.
Usages
To discover usages of the current file loaded into the editor, click Show Usages. Now you can view the usages of the current script in includes, listeners, workflows, and so on. As you install other Cprime apps that can use scripts for their features, those usages show up here as well.
Note that a file A included (see Inclusions) into another file B is shown as being used only if B is being used directly for a feature. If B is not used directly, but is included into another file C that is used directly by a feature, file A is not shown as being used.
Keyboard shortcuts
We've implemented several keyboard shortcuts to make your life easier when working with SIL™ scripts.
Shift + Enter | Check the SIL code |
Ctrl + S | Save |
Ctrl + / | Toggle line comment |
Ctrl + Shift + / | Toggle selection comment |
Ctrl + Space | Show autocomplete suggestions |
Ctrl + K | Go to next occurrence of selection |
Ctrl + Shift + K | Go to previous occurrence of selection |
Ctrl + L | Jump to line |
Tab | Indent selection |
Shift - Tab | Outdent selection |
Alt - Up/Down | Move line up/down |
Alt - Shift - Up/Down | Copy line up/down |
Ctrl - D | Delete line |
Feedback
We're looking forward to hearing what you think of the SIL™ Manager and are happy to listen to your ideas for the new features too.