Advanced zyLabs provide a versatile cloud IDE where you can start servers to view web projects, open GUI applications on the desktop, select from multiple language options, and more.
There are more options available than a classic zyLab, detailed below.
Files
Settings
History
Run
Desktop View
Other Icons
IDE Menu
At the top left of the IDE is the Files menu.
Files
Click the file tree icon to open the file tree to create files and folders, re-arrange files, as well as upload, download, rename, duplicate, mark as read-only, and delete files.
Files can also be dragged and dropped into the file pane to upload.
The three-dot menu at the end of each file contains some of these options, including language specific options.
Settings
The settings menu provides options to change the workspace settings, restart the environment, reset the lab to the template, and restore lab data to the template.
History
Clicking History opens a playback timeline for everything done in the workspace.
Work can be checked keystroke-by-keystroke by clicking the forward and back arrows, or clicking anywhere in the timeline. If the workspace contains multiple files, the history for the active file will stop when the edits to that file stopped, and the timeline will continue in the next edited file. Scroll through the timeline and click the file you'd like to switch to in Files to continue moving through the timeline with that file active in the codepad.
When moving through the timeline, clicking Restore File will open a prompt to revert the code to the state visible in the codepad for the file visible in the timeline.
The event history in the bottom left of the History indicates changes made to the IDE or Files, like the creation of a new file, and restoration of the Main.py in the event history above.
Click the Legend in the bottom left to disable any of the options for the timeline.
For reference: file restores bring a file back to a previous state. Reset to template restores the code to the current template state.
Click the Exit History button to return to the code editor.
Run
Run will compile and run based on the default file. The drop-down menu, if available, allows selecting other files to run.
Desktop View
After running code in most languages, the Desktop tab will be active. Switch to the Desktop tab to open the virtual desktop view. Some languages open this view by default after clicking run.
The two icons along the right side will open the desktop view in a new tab, or a fullscreen view. Alternatively, enlarge the desktop view by adjusting the top edge of the frame.
Other Icons
A number of other icons are visible across the IDE and noted in the image below.
1. Tutorial
a. A tutorial button can be clicked at any time to see a walkthrough of the IDE
2. Sync All
a. Indicates if the most recent changes have been synced, and can be clicked to force a sync
3. Console
a. Use the console to see output, enter input, and enter other commands
b. Click the + to add another console tab where you can send commands for things like file management, process management, and environment variable management, especially when the first tab is busy
4. Expand Handle
a. Click and drag to expand or collapse the size of the IDE
If the IDE is disconnected from the internet, the connection indicator appears to indicate that your work is not being synced.
Hotkeys
There are a number of Hotkeys and shortcuts that can be used inside the IDE.
F1
- Open Command Palette
Right-Click Menu includes useful hotkeys like these:Alt + Windows + N
- Run
Ctrl + F2
- Change All Occurrences
Shift+ Alt+ F
- Format Document (Auto-indent)
Ctrl + K
- Add Comment
Ctrl + F
- Find
Ctrl + G
- Go to line
Ctrl + ,
- Make Font Smaller
Ctrl + .
- Make Font Larger
Ctrl + Shift + Enter
- Insert Line Above
Ctrl + Enter
- Insert Line Below
Ctrl + Shift + K
- Delete Line
Ctrl + Shift + [
- Fold
Alt + F8
- Go to Next Problem (Error, Warning, Info)
Using GitHub with Advanced zyLabs
The git
command is useable in the Advanced zyLab IDE. It's also useable in VSC and includes a GUI there. Learn more about VSC and GitHub here.
While VSC is highly recommended, using git
commands from the CR2 console does allow push, pull, clone, and other actions once it's connected to your repositories.
Typing git help
in the console reveals the full list of commands.