4. IDE¶
The VPL IDE is a web multi-file editor that supports syntax highlighter of the source code, run or debug code in text and graphic terminal, evaluate programs to get feedback, and more. The IDE aims to be as simple of use as possible, hiding options while not needed.
The IDE is organized into five panels that not always are visible.
- Actions menu at top.
- File list at left.
- Editing zone at midle.
- Info panel at right.
4.2. Editor¶
Other editor commands are available using “open command palette (F1)” or using a keyboard shortcut:
- Go to next error (Alt-E)
- go to previous error (Alt-Shift-E)
- 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 previous (Ctrl-Shift-K)
- Select or find next (Alt-K)
- Select or find previous (Alt-Shift-K)
- 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)
- Goto 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)
- 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)
- Del (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)
- Touppercase (Ctrl-U)
- Tolowercase (Ctrl-Shift-U)
- Expand to line (Ctrl-Shift-L)
- Open Command Pallete (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 to 25x80 chars. The terminal window can be moved by holding a click on the title bar, and resized by holding a click on a border. If the new size is less than needed 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.
4.2.1.1.2. Textual terminal clipboard¶
The terminal clipboard give a form to access two features. The text outputed from the terminal in each run is keep and is accesible from the upper text imput. The lower input allws to write text than can be sent as typewrited the the program. This text is keep from run to run.
4.2.1.2. Graphics terminal¶
The graphical terminal is a VNC client of a Linux X Window server. The default size is such that fits in the current browser window size. The terminal window can be moved by holding a click on the title bar, and resized by holding a click on 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: photo.jpg.b64 file in base64 becomes photo.jpg in binary.
4.5. Image files¶
VPL also supports the handling of popular types of image files. The image files are shown in the editor and when viewing submissions.
Currently supported image file extensions are gif, jpg, jpeg, png, and ico.
4.6. 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 write as filename “src/lib/util.c” 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.