Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Pseudocode-i18nNew to Visual Studio Code? Get it now.
Pseudocode-i18n

Pseudocode-i18n

rod2ik

| (0) | Free
An Executable Multilingual Educational Pseudocode, with live Flowchart preview, step-by-step execution visualization, formatting, execution and Python transpilation
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

vscode-pseudocode-i18n

Resource Link Purpose
vscode-pseudocode-i18n — repository gitlab.com/rod2ik/vscode-pseudocode-i18n VS Code editing experience for .pseudo files, published on Open VSX and Visual Studio Marketplace
vscode-pseudocode-i18n — documentation rod2ik.gitlab.io/vscode-pseudocode-i18n Complete installation, usage and development documentation
pseudocode-i18n gitlab.com/rod2ik/pseudocode-i18n Multilingual parser, formatter, Python transpiler and semantic core
pygments-lexer-pseudocode-i18n gitlab.com/rod2ik/pygments-lexer-pseudocode-i18n Pygments syntax highlighting from the same multilingual vocabulary
mkdocs-pseudocode-i18n gitlab.com/rod2ik/mkdocs-pseudocode-i18n MkDocs rendering for multilingual pseudocode blocks

Current version: 0.5.2. License: GNU GPL-3.0-or-later.

Pseudocode brings the multilingual educational language from pseudocode-i18n directly into Visual Studio Code. Create a single algorithm.pseudo file, write in French, Spanish, Italian, Portuguese, German or English, and let the extension resolve the language automatically.

You get Python-like syntax highlighting, Ctrl+Shift+I formatting, validation, execution, bidirectional Python transpilation and Mermaid flowchart/image generation from the same semantic core.

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.

French pseudocode showcase

French flowchart showcase

# language: fr

age est un entier
age := 17

Si age >= 18 Alors:
    Afficher "Majeur"
Sinon:
    Afficher "Mineur"
Fin

The formatter keeps the same language and normalizes the source. The transpiler produces ordinary Python:

age: int
age = 17

if age >= 18:
    print("Majeur")
else:
    print("Mineur")

Install

Install the extension from the Visual Studio Marketplace or Open VSX, then install the semantic runtime:

python -m pip install 'pseudocode-i18n>=0.5.0,<0.6'

On an externally managed Python installation where you deliberately use user/system packages:

python -m pip install --break-system-packages 'pseudocode-i18n>=0.5.0,<0.6'

The extension invokes the pseudo command supplied by pseudocode-i18n.

One source extension: .pseudo

Every pseudocode source file now uses exactly the same extension:

algorithm.pseudo

There are no .pseudo-fr, .pseudo-es, .pseudocode-fr, etc. filename extensions.

VS Code still uses internal language IDs such as pseudocode-fr and pseudocode-es after the language has been resolved. Those IDs are an editor implementation detail and are also useful as explicit Markdown aliases; they are not file extensions.

Automatic language detection

For a normal .pseudo file, the extension asks the shared pseudocode-i18n runtime to resolve the language. It does not maintain an independent language detector in TypeScript.

Resolution follows this order:

  1. an in-file language directive;
  2. an explicit project language: / lang: in pseudocode.config.yml;
  3. automatic content detection by pseudocode-i18n;
  4. project fallback_language: when present;
  5. VS Code setting pseudocode.defaultLanguage;
  6. French (fr) if the setting itself is missing or invalid.

When the resolved language changes while you edit, the extension updates the internal VS Code language ID after a short debounce so highlighting follows the current source without constantly flickering.

Language directives

The canonical form is:

# language: fr

All four forms are equivalent:

# language: fr
# language fr
# lang: fr
# lang fr

language and lang are synonyms and the colon is optional. In 0.5.0, # is the only comment/directive marker; // is integer division.

Use Pseudocode: Set Language for Current File to insert or replace the canonical directive automatically.

Fallback language

The command:

Pseudocode: Select Fallback Language

updates:

"pseudocode.defaultLanguage": "fr"

This setting is deliberately a fallback, not a project-wide forced language. It is used when a file has no directive, the project does not force a language, automatic detection is ambiguous, and the project does not provide its own fallback_language:.

pseudocode.config.yml

Recommended project configuration:

language: auto
fallback_language: fr
index_base: 0

format:
  colons: true
  end_markers: true
  indent: 4

lang: is accepted as an alias for language::

lang: es

Use language: auto for normal multilingual projects. Set language: fr, lang: es, etc. only when you deliberately want to force an entire project.

Commands

Open the Command Palette and use:

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:

  1. the active pseudocode line is highlighted directly in the VS Code editor;
  2. the corresponding flowchart node and true/false branch are emphasized;
  3. variables and data structures show the state at that step, with changed values highlighted;
  4. 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

French pseudocode example

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

Español

Spanish pseudocode example

Repetir 3 veces:
    Escribir "Hola"
Fin

Italiano

Italian pseudocode example

Ripeti 3 volte:
    Mostra "Ciao"
Fine

Português

Portuguese pseudocode example

Repetir 3 vezes:
    Mostrar "Olá"
Fim

Deutsch

German pseudocode example

Wiederhole 3 mal:
    Ausgeben "Hallo"
Ende

English

English pseudocode example

Repeat 3 times:
    Display "Hello"
End

Flowchart previews

The same README also showcases static flowchart previews generated from pseudocode examples.

Français

French flowchart example

English

English flowchart example

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, keep pseudo-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.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft