vscode-pseudocode-i18n
Current version: 0.5.2. License: GNU GPL-3.0-or-later. Pseudocode brings the multilingual educational language from You get Python-like syntax highlighting, The Marketplace/Open VSX description includes generated PNG showcase images so visitors can see real highlighting and flowchart output directly in the README. The editable showcase sources remain SVG files in the repository.
The formatter keeps the same language and normalizes the source. The transpiler produces ordinary Python:
InstallInstall the extension from the Visual Studio Marketplace or Open VSX, then install the semantic runtime:
On an externally managed Python installation where you deliberately use user/system packages:
The extension invokes the One source extension:
|
| Command | Purpose |
|---|---|
| Pseudocode: Run File | Execute the current .pseudo file |
| Pseudocode: Check File | Parse and validate the current file |
| Pseudocode: Format Document | Apply the canonical formatter |
| Pseudocode: Transpile Current File | .pseudo → Python or .py → pseudocode, opened beside the source |
| Pseudocode: Open Live Flowchart Preview | Open the graphical flowchart beside the source; Ctrl+K V |
| Pseudocode: Visualize Execution | Step through source + active flowchart node + variables + output + call stack |
| Pseudocode: Generate Mermaid Flowchart | Open Mermaid source beside the .pseudo source |
| Pseudocode: Export Flowchart as SVG | Render and open an SVG via the core Mermaid renderer |
| Pseudocode: Export Flowchart as PNG | Render and open a PNG via the core Mermaid renderer |
| Pseudocode: Set Language for Current File | Insert/update # language: xx |
| Pseudocode: Select Fallback Language | Change the VS Code fallback language |
F5 runs the current pseudocode file. Ctrl+K V opens the live flowchart preview beside the editor. The normal Linux VS Code formatting shortcut, typically Ctrl+Shift+I, invokes the native document formatter.
Live flowchart and execution visualization
Press Ctrl+K V in a .pseudo editor, or run Pseudocode: Open Live Flowchart Preview. The extension opens a side WebView and regenerates the graphical Mermaid/SVG flowchart after source edits. The source file can remain unsaved: the extension sends a temporary .pseudo snapshot to the shared runtime.
Switch the preview to Execution (or run Pseudocode: Visualize Execution) to use the 0.5 runtime trace. Each step synchronizes four representations:
- the active pseudocode line is highlighted directly in the VS Code editor;
- the corresponding flowchart node and true/false branch are emphasized;
- variables and data structures show the state at that step, with changed values highlighted;
- output and the function/process call stack follow the same timeline.
Controls include first/previous/next/last step, Play/Pause, Reset and a speed slider. Previous is a real historical navigation over trace snapshots: source highlight, flowchart, variables, output and call stack all move back together.
For functions, processes and subprocesses, the selector offers the whole program, an Auto-focus active function/process mode, and individual symbols generated by pseudo symbols.
If the source changes while an execution trace is open, the trace is deliberately frozen and marked stale; use Reset to trace the modified program. Input statements pause the trace and show a Provide input action.
The visualizer respects the project-wide index_base: list/string/tuple indices are displayed from 0 or 1 consistently, while negative indices retain Python semantics.
The graphical preview delegates to pseudo flowchart and pseudo render, so the same core Mermaid renderer and browser configuration are used by the CLI and VS Code.
Multilingual examples
The bundled documentation follows the project order: French, Spanish, Italian, Portuguese, German, then English.
Français

Répéter 3 fois:
Écrire "Bonjour"
Fin
Español

Repetir 3 veces:
Escribir "Hola"
Fin
Italiano

Ripeti 3 volte:
Mostra "Ciao"
Fine
Português

Repetir 3 vezes:
Mostrar "Olá"
Fim
Deutsch

Wiederhole 3 mal:
Ausgeben "Hallo"
Ende
English

Repeat 3 times:
Display "Hello"
End
Flowchart previews
The same README also showcases static flowchart previews generated from pseudocode examples.
Français

English

The generated grammars also understand the shared 0.5 vocabulary for Vide/None, localized types, arrays/lists, dictionaries, sets, tuples, :=, ∈, ∉, not in aliases, repeat-until loops and generic Fin-style terminators.
Markdown
Prefer the generic fence when the source should choose its own language:
```pseudo
# lang es
Mostrar "Hola"
```
The generic pseudo / pseudocode fence uses a multilingual TextMate grammar. When you deliberately know the language, explicit aliases remain available:
```pseudo-fr
Afficher "Bonjour"
```
```pseudo-es
Mostrar "Hola"
```
The MkDocs 0.3.2 modifiers are also recognized as pseudocode Markdown fences by the editor grammar:
```pseudo flowchart
Si x > 0 Alors:
Afficher "positif"
Fin
```
pseudo mermaid is equivalent. mkdocs-pseudocode-i18n turns these blocks into standard Mermaid fences for the site's Mermaid renderer.
So the rule is simple:
- files: only
.pseudo; - Markdown: prefer
pseudo, keeppseudo-fr,pseudo-es, etc. for explicit forcing; - VS Code internals:
pseudocode-fr,pseudocode-es, etc. remain valid language IDs.
Highlighting model
TextMate grammars are generated from pseudocode-i18n; they are not hand-maintained copies of the language. The scopes intentionally track Python-style roles as closely as practical so existing VS Code themes produce familiar colors for:
- control-flow keywords;
- built-in functions such as display/input aliases;
- constants such as localized true/false/null values;
- types including integer, float, string, boolean, array/list, dictionary, set and tuple;
- operators, including
:=,∈and∉; - function/class declarations, numbers, strings and punctuation.
The generic grammar merges all bundled languages, while the language-specific grammars remain available for resolved .pseudo files and explicit Markdown fences.
Development
yarn setup
yarn bfc
yarn setup uses a sibling ../pseudocode-i18n checkout when available; otherwise it installs pseudocode-i18n>=0.5.0,<0.6.
yarn bfc synchronizes the version from package.json, regenerates TextMate grammars, compiles/bundles TypeScript, runs tests, synchronizes and validates the documentation, builds the MkDocs site and packages the VSIX.
For local extension testing:
yarn reinstall
# exactly equivalent:
yarn ext:reinstall
The reinstall command rebuilds the VSIX, uninstalls the currently installed rod2ik.vscode-pseudocode-i18n, removes only stale extension directories belonging to that extension, installs the new VSIX with --force, and verifies the installed version. It deliberately does not wipe VS Code global caches. If VS Code is already open, run Developer: Reload Window afterward.
For documentation development:
yarn docs:dev
or on the LAN:
yarn docs:dev:lan
Documentation and versioning policy
package.json is the single source of truth for the extension version. yarn version:sync updates the README marker, and MkDocs pages use __VSCODE_PSEUDOCODE_VERSION__, replaced automatically from package.json during the documentation build.
README.md is also the source of the MkDocs home page. yarn docs:sync copies it to site/index.md and regenerates the six language reference pages directly from the core vocabulary.
Documentation is part of every functional change.
Release workflow
Normal pushes update the repository and GitLab Pages without creating a release. Tagged vX.Y.Z pipelines package one VSIX and must publish that exact artifact to both Open VSX and Visual Studio Marketplace before the GitLab Release is created. Release tags fail explicitly if either required CI credential is missing.
License
GNU General Public License v3 or later (GPL-3.0-or-later).
AUTRES PROJETS de ce développeur
The Pseudocode ecosystem is designed as four cooperating projects:
pseudocode-i18n— semantic core, parser, formatter, execution, bidirectional Python transpilation and flowcharts;pygments-lexer-pseudocode-i18n— Pygments highlighting;mkdocs-pseudocode-i18n— MkDocs rendering and educational documentation integration;vscode-pseudocode-i18n— the editor extension described here.