Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Pseudocode (Sobol Syntax)New to Visual Studio Code? Get it now.
Pseudocode (Sobol Syntax)

Pseudocode (Sobol Syntax)

lkolo-prez

| (0) | Free
Syntax highlighting, snippets, and validation for educational pseudocode based on Mariusz Sobol's notation
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Pseudocode (Sobol Notation)

VS Code extension providing syntax highlighting, snippets, and validation for pseudocode based on Mariusz Sobol's notation used at Pedagogical University of Krakow.

Features

Syntax Highlighting

Rich syntax highlighting for .alg files and pseudocode code blocks in Markdown:

  • Keywords: algorithm, if, then, else, for, to, do, while, return
  • Operators: ←, +, -, *, /, mod, div, <, >, ≤, ≥, =, ≠
  • Data types: int, float, string, bool, array, list
  • Built-in functions: length(), print(), read(), push(), pop()
  • Comments: // single-line
  • Braces: { } for code blocks (not "end" keywords)

Code Snippets

27+ intelligent code snippets for common patterns:

Prefix Description
alg Algorithm template
if, ife If/if-else statements
for, fore For loops (to/downto)
while While loop
arr, mat Array/matrix declarations
func Function definition
swap Swap two variables
max, min Find maximum/minimum

Type prefix + Tab to expand snippet.

Commands

  • Validate Syntax (Ctrl+Shift+V): Check pseudocode for syntax errors
  • Insert Arrow (Ctrl+Shift+A): Insert assignment arrow ←
  • New Algorithm File (Ctrl+Shift+N): Create new .alg file with template

Markdown Integration

Write pseudocode in Markdown code blocks with syntax highlighting:

```pseudocode
algorithm BubbleSort(A[0..n-1]) {
    for i ← 0 to n-2 do {
        for j ← 0 to n-2-i do {
            if A[j] > A[j+1] then {
                temp ← A[j]
                A[j] ← A[j+1]
                A[j+1] ← temp
            }
        }
    }
}
```

Syntax Rules

Based on Mariusz Sobol's notation:

  1. Assignment: Use arrow ← (not =)

    x ← 5
    
  2. Braces: Use { } (not "begin/end")

    if x > 0 then {
        print(x)
    }
    
  3. Algorithm structure:

    algorithm Name(parameters) {
        // declarations
        // body
        return result
    }
    
  4. Arrays: 0-indexed with range notation

    A[0..n-1]
    

Installation

From VSIX (Recommended)

  1. Download pseudocode-sobol-x.x.x.vsix
  2. Open VS Code
  3. Press Ctrl+Shift+P → "Extensions: Install from VSIX..."
  4. Select downloaded .vsix file

From Marketplace

Search for "Pseudocode Sobol" in VS Code Extensions (Ctrl+Shift+X)

Usage

Create Algorithm File

  1. Ctrl+Shift+N → New algorithm file
  2. Or create file with .alg extension
  3. Start typing snippets (alg, for, if, etc.)

Validate Syntax

  1. Open .alg file
  2. Ctrl+Shift+V → Validate syntax
  3. Check Output panel for errors

In Markdown

  1. Create code block with ```pseudocode
  2. Write algorithm with syntax highlighting
  3. Type pseudocode + Tab for template

Requirements

  • VS Code 1.75.0 or higher
  • No external dependencies

Extension Settings

This extension contributes:

  • Language: pseudocode (.alg files)
  • File associations: *.alg → pseudocode
  • Commands: 3 commands (validate, insert arrow, new file)
  • Keybindings: 3 keyboard shortcuts

Known Issues

  • Validation currently checks basic syntax only (algorithm structure, braces)
  • No IntelliSense/autocompletion for custom variables yet

Release Notes

1.0.0

Initial release:

  • Syntax highlighting for .alg files
  • 27+ code snippets
  • Markdown code block support
  • Basic syntax validation
  • Arrow insertion command
  • Algorithm file templates

About

Created for students at Pedagogical University of Krakow using Mariusz Sobol's pseudocode notation.

Based on materials from: github.com/lkolo-prez/algorytmy

License

MIT License - see LICENSE file

Contributing

Issues and pull requests welcome at: github.com/lkolo-prez/algorytmy


Enjoy writing algorithms!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft