The editor
The PaskalCPP Editor: an Electron application whose editing surface is Monaco, driving the compiler's own language server and debugger.
Starting
pcpp editor [files] starts the editor, res\editor\editor.exe beside pcpp.exe, and opens the files given.
- The editor runs one
pcpp --lspfor its whole lifetime: every language feature comes from the compiler's own frontend. See The language server. - Everything the editor keeps lives in
data\beside editor.exe, never in AppData:state.json(the explorer's folders, open tabs, window and layout, the toolbar's level and target, the debug host per dll) andsettings.json. - File > Show Examples shows the bundled examples folder (
res\examples) in the explorer; it is on by default.
Menus and keys
| Menu | Commands |
|---|---|
| File | New (Ctrl+N), Open (Ctrl+O), Open Folder, Close All Folders, Show Examples, Save (Ctrl+S), Save As (Ctrl+Shift+S), Save All, Rename, Quit |
| Edit | Undo, Redo, Cut, Copy, Paste, Select All, Find (Ctrl+F), Replace (Ctrl+H), Format Document (Shift+Alt+F) |
| Go | Go to Symbol in Workspace (Ctrl+T), Show Call Hierarchy (Shift+Alt+H) |
| Build | Build (Ctrl+B), Run (Ctrl+F5), Stop (Shift+F5) |
| Debug | Start Debugging / Continue (F5), Step Over (F10), Step Into (F11), Step Out (Shift+F11), Pause (F6), Stop Debugging |
| View | zoom, full screen, developer tools |
| Preferences | Format Settings |
| Help | Report Issue, About PaskalCPP |
Build and Run
Build and Run take a saved .pcpp file (an unsaved one is refused) and run pcpp <file> -opt <level> -t <target> --defaults --progress in pcpp.exe's folder, so the program builds into the same output folder as a console build there. The command line is the first line of OUTPUT.
- The toolbar's optimize level is one of
debug,safe,fast,small, and its target one ofx86_64-windows-gnu,x86_64-linux-gnu; the first of each is the default. With--defaultsthe source's own@optimize/@targetwins over the toolbar. A level saved under a retired name (release_fast) is read back as its new one (fast). - Run adds
-r --terminal <pipe>: the program's terminal is the TERMINAL tab (its keys, its size), while pcpp's own lines stay in OUTPUT. - One build or run at a time, and none while a debug session runs; Stop ends the compiler and the program it started.
Panels
The bottom panel has the tabs OUTPUT, TERMINAL, PROBLEMS (with a count), CALL HIERARCHY and DEBUG. OUTPUT shows pcpp's text without colour codes and redraws its in-place progress line.
Settings
Preferences > Format Settings opens settings.json in a tab, created with the defaults the first time; saving it applies it at once.
| Key | Default | Range |
|---|---|---|
indentSize | 2 | 1..8 |
useTabs | false | |
spaceAroundAssign | true | |
spaceAroundOperators | true | |
spaceAfterComma | true | |
spaceBeforeColon | false | |
spaceAfterColon | true | |
maxBlankLines | 1 | 0..9 |
trimTrailingWhitespace | true | |
finalNewline | true | |
maxLineLength | 80 | 60..200 |
formatOnSave | false |
Reporting an issue
Help > Report Issue opens the form at paskalcpp.org/report in its own window, with the editor's version and platform filled in. A right-click on a PROBLEMS row offers Report This Error, which also fills in that row's diagnostic code.
The report window stays on the form's site; a link to github.com opens in the browser. When the form cannot be reached the editor says so and gives the address.