4. IDE
The VPL IDE is a web multi-file editor that supports syntax highlighting of the source code, running or debugging code in text and graphic terminals, evaluating programs to get feedback, and more. The IDE aims to be simple to use, hiding options when not needed.
The IDE is organized into five panels that are not always visible.
Actions menu at the top.
File list at the left.
Editing zone in the middle.
Info panel at the right.
Example of VPL IDE with all panels available
4.2. Editor
The editor displays a status line showing file name, cursor position (row and column), and programming language.
Note
Files appearing in both “required files” and “execution files” are viewed as read-only. Students can view the content but cannot modify it.
Other editor commands are available using “open command palette (F1)” or using a keyboard shortcut:
Show settings menu (Ctrl-,)
Go to next error (Alt-E)
Go to previous error (Alt-Shift-E)
Select all (Ctrl-A)
Go to line (Ctrl-L)
Fold (Alt-L|Ctrl-F1)
Unfold (Alt-Shift-L|Ctrl-Shift-F1)
Toggle fold widget (F2)
Toggle parent fold widget (Alt-F2)
Fold other (Alt-0)
Unfold all (Alt-Shift-0)
Find next (Ctrl-K)
Find previous (Ctrl-Shift-K)
Select or find next (Alt-K)
Select or find previous (Alt-Shift-K)
Find (Ctrl-F)
Select to start (Ctrl-Shift-Home)
Go to start (Ctrl-Home)
Select up (Shift-Up)
Go line up (Up)
Select to end (Ctrl-Shift-End)
Go to end (Ctrl-End)
Select down (Shift-Down)
Go line down (Down)
Select word left (Ctrl-Shift-Left)
Go to word left (Ctrl-Left)
Select to line start (Alt-Shift-Left)
Go to line start (Alt-Left|Home)
Select left (Shift-Left)
Go to left (Left)
Select word right (Ctrl-Shift-Right)
Go to word right (Ctrl-Right)
Select to line end (Alt-Shift-Right)
Go to line end (Alt-Right|End)
Select right (Shift-Right)
Go to right (Right)
Go to page down (PageDown)
Scroll up (Ctrl-Up)
Scroll down (Ctrl-Down)
Toggle recording (Ctrl-Alt-E)
Replay macro (Ctrl-Shift-E)
Jump to matching (Ctrl-|Ctrl-P)
Select to matching (Ctrl-Shift-|Ctrl-Shift-P)
Expand to matching (Ctrl-Shift-M)
Remove line (Ctrl-D)
Duplicate selection (Ctrl-Shift-D)
Sort lines (Ctrl-Alt-S)
Toggle comment (Ctrl-/)
Toggle block comment (Ctrl-Shift-/)
Modify number up (Ctrl-Shift-Up)
Modify number down (Ctrl-Shift-Down)
Replace (Ctrl-H)
Undo (Ctrl-Z)
Redo (Ctrl-Shift-Z|Ctrl-Y)
Copy lines up (Alt-Shift-Up)
Move lines up (Alt-Up)
Copy lines down (Alt-Shift-Down)
Move lines down (Alt-Down)
Delete (Delete)
Backspace (Shift-Backspace|Backspace)
Cut or delete (Shift-Delete)
Remove to line start (Alt-Backspace)
Remove to line end (Alt-Delete)
Remove to line start hard (Ctrl-Shift-Backspace)
Remove to line end hard (Ctrl-Shift-Delete)
Remove word left (Ctrl-Backspace)
Remove word right (Ctrl-Delete)
Outdent (Shift-Tab)
Indent (Tab)
Block outdent (Ctrl-[)
Block indent (Ctrl-])
Transpose letters (Alt-Shift-X)
To uppercase (Ctrl-U)
To lowercase (Ctrl-Shift-U)
Expand to line (Ctrl-Shift-L)
Open link (Ctrl+F3)
Open command palette (F1)
Add cursor above (Ctrl-Alt-Up)
Add cursor below (Ctrl-Alt-Down)
Add cursor above skip current (Ctrl-Alt-Shift-Up)
Add cursor below skip current (Ctrl-Alt-Shift-Down)
Select more before (Ctrl-Alt-Left)
Select more after (Ctrl-Alt-Right)
Select next before (Ctrl-Alt-Shift-Left)
Select next after (Ctrl-Alt-Shift-Right)
Toggle split selection into lines (Ctrl-Alt-L)
Align cursors (Ctrl-Alt-A)
Find all (Ctrl-Alt-K)
4.2.1. Terminal features
4.2.1.1. Textual terminal
The textual terminal is compatible with xterm with some limitations as the size is fixed at 25x80 chars. The terminal window can be moved by clicking and holding the title bar, and resized by clicking and holding a border. If the new size is smaller than needed, a scrollbar appears.
The buttons on the terminal title bar allow other features as changing the terminal theme and access to the clipboard.
4.2.1.1.1. Terminal theme
The terminal theme changes with every click on the button. The selection is saved for the next sessions in the user preferences.
Terminal theme example
4.2.1.1.2. Textual terminal clipboard
The terminal clipboard provides a form to access two features. The text output from the terminal in each run is kept and is accessible from the upper text input. The lower input allows you to write text that can be sent as typed to the program. This text is kept from run to run.
Terminal clipboard
4.2.1.2. Graphics terminal
The graphical terminal is a VNC client of a Linux X Window server. The default size fits within the current browser window size. The terminal window can be moved by clicking and holding the title bar, and resized by clicking and holding a border. The new size will be applied in the next graphical terminal use.
4.2.1.2.1. Graphics Terminal clipboard
The clipboard for the graphic terminal will be functional if VNC xclipboard tool runs in the X server.
4.3. Drag and drop
The IDE supports drag and drop external files into the editor. The effect is identical to the import files feature.
4.4. Binary files
VPL supports the handling of binary files identifying them based on the file extension.
Currently supported binary extensions are zip, jar, pdf, tar, bin, 7z, arj, deb, gzip, rar, rpm, dat, db, dll, rtf, doc, docx, odt, exe, and com.
For compatibility with older VPL versions, it is possible to use files in base-64 format. When files with extension b64 are sent to an execution server are decoded and extension removed. Example: A ‘photo.jpg.b64’ file in base64 becomes ‘photo.jpg’ in binary.
4.5. Multimedia files
VPL supports the handling of popular types of image, audio, and video files. These files are shown or played in the editor and when viewing submissions.
Currently supported file extensions are:
Images: gif, jpg, jpeg, png, ico.
Audio: wav, aiff, pcm, mp3, aac, ogg, oga, wma, m4a, flac, alac, ape, wv, amr.
Video: mp4, webm, ogv, avi, mov, wmv, flv, mkv, m4v, mpeg, mpg, 3gp.
Image file in the editor
4.6. File Renaming
The file editor supports renaming files, including cases where only the character case changes (e.g., renaming file.c to File.c).
4.7. Files in subdirectories
VPL supports storing files in directories. The way to indicate the directory is by writing the relative pathname as the file name in the editor. For example, you can set the filename to “src/lib/util.c” and the util.c file will be located in the “src/lib” subdirectory of the user’s home directory when running.
For more details about VPL, visit the VPL home page or the VPL plugin page at Moodle.