A VS Code-style editor in under 200kb and compatible with Windows XP.
No Electron, and no Chromium - all Win32 C, built with Tiny C Compiler.
Download installer .msi
Download standalone .exe
- Integrated terminal – a real
cmd.exein the bottom panel, with multiple terminals, command history, Tab completion of file names, Ctrl+C to interrupt the running program, mouse selection, copy/paste, and scrollback. Killing a terminal also kills every process it started. - Problems panel – compiler errors printed in the terminal (
file:line: error: …from TCC/GCC,file(line) : error …from MSVC, Python tracebacks) are collected into the Problems panel and the status bar; click one, or Ctrl+click the line in the terminal, to jump to it. - Editor – syntax highlighting for C/C++, Python, JavaScript, Batch, INI, HTML/XML and Markdown; line numbers, indent guides, bracket matching, auto-indent, auto-closing brackets and quotes, multi-level undo/redo, move/copy/delete line, toggle comment, find and replace, a minimap, and automatic reload when a file changes on disk.
- Workbench – activity bar, Explorer file tree (create, rename, delete, reveal), Search across files, tabs with unsaved-change markers, breadcrumbs, status bar, resizable side bar and panel.
- Command Palette (Ctrl+Shift+P / F1), Quick Open (Ctrl+P) and Go to Line (Ctrl+G) with fuzzy matching.
- Run and build – F5 runs the active file in the terminal (
.cis compiled with TCC first,.pyruns with Python,.batwithcall,.jswithcscript); Ctrl+Shift+B runs the folder'sbuild.bat. - Remembers the open folder, open files, window layout and zoom level between sessions.
Download XPCode-1.0.0.msi from the releases page and run it. The installer puts XP Code in
Program Files\XP Code, adds a Start Menu shortcut and an optional desktop shortcut, and registers
in Add or Remove Programs. Installing a newer version upgrades the old one in place.
Silent install and removal work the usual Windows Installer way:
msiexec /i XPCode-1.0.0.msi /qn
msiexec /x XPCode-1.0.0.msi /qn
Tested on Windows XP Professional (32-bit).
Is this vibe-coded? Yes.
Am I proud of this project? I cannot be given I lazily vibe-coded this.
Is it cool and useful though? Undeniably, so I am sharing it.
I did the logo though, so I did do something.
XP Code does not ship a compiler. For F5 and the terminal it adds these to PATH when they exist:
- Tiny C Compiler in
<XP Code folder>\tcc,Program Files\tcc,C:\tccorC:\dev\tools\tcc - Python in any
C:\Python*folder
Other locations can be listed in the settings file (%APPDATA%\XP Code\xpcode.ini):
[tools]
path=D:\tools\tcc;D:\Python34| Action | Keys |
|---|---|
| Command Palette | Ctrl+Shift+P, F1 |
| Quick Open file | Ctrl+P |
| Go to line | Ctrl+G |
| Toggle terminal / new terminal | Ctrl+` / Ctrl+Shift+` |
| Toggle side bar / panel | Ctrl+B / Ctrl+J |
| Explorer / Search / Run | Ctrl+Shift+E / Ctrl+Shift+F / Ctrl+Shift+D |
| Run active file | F5 |
| Run build task | Ctrl+Shift+B |
| Find / replace | Ctrl+F / Ctrl+H |
| Toggle line comment | Ctrl+/ |
| Move / copy line | Alt+Up/Down / Shift+Alt+Up/Down |
| Delete line | Ctrl+Shift+K |
| Next / previous editor | Ctrl+Tab / Ctrl+Shift+Tab |
| Open folder / save all | Ctrl+K Ctrl+O / Ctrl+K S |
| Zoom in / out / reset | Ctrl+= / Ctrl+- / Ctrl+0 |
Help → Keyboard Shortcuts Reference lists every command.
Requirements:
- Tiny C Compiler 0.9.27 for Win32
(
tcc-0.9.27-win32-bin.zip) with the full Windows headers fromwinapi-full-for-0.9.27.zipcopied over itsincludefolder - Python 3.4 to 3.12 (used for the resource and installer steps; standard library only -
the installer needs
msilib, which was removed in Python 3.13)
build.bat [C:\path\to\tcc.exe] -> build\xpcode.exe
python installer\build_msi.py -> dist\XPCode-<version>.msi
python tools\make_icon.py -> res\icon.ico from res\icon.png (only when changing the icon)
build.bat uses tcc.exe from PATH when no path is given. A running build\xpcode.exe is moved
aside before linking, so XP Code can rebuild itself from its own terminal with Ctrl+Shift+B.
The version number lives in one place: APP_VERSION in src/xpcode.h. The resource embedder and
the installer both read it from there.
src/ the application (C, Win32 API)
main.c main window, layout, activity bar, status bar, commands, shortcuts, settings
editor.c text engine, syntax highlighting, tabs, breadcrumbs, minimap, find/replace
explorer.c side bar: file tree, search across files, run view
terminal.c panel: integrated terminal, problems, output
palette.c command palette, quick open, go to line, input prompts
xpcode.h shared declarations, colours, command IDs
res/ icon.svg (artwork source), icon.png (1024 px export), icon.ico (16-48 px)
tools/ make_icon.py, embed_resources.py
installer/ build_msi.py
docs/ screenshot
build.bat build script
- Drawing. Everything except the menu bar and the text boxes is drawn with GDI into off-screen bitmaps: the activity bar icons are vector paths, the file-type badges are text, and the minimap draws each token as a small coloured rectangle.
- Terminal. Windows XP has no pseudo-console API, so each terminal runs
cmd.exewith redirected pipes and its own hidden console. Output is read on a background thread and parsed for carriage returns, backspaces, form feeds (cls) and error locations. Ctrl+C attaches to the hidden console withAttachConsoleand sendsGenerateConsoleCtrlEvent. Each terminal runs inside a Job Object, so killing it, or closing XP Code, also ends its child processes. - Resources. Tiny C Compiler cannot compile
.rcscripts, sotools/embed_resources.pybuilds the icon, version and manifest resources and appends them to the linked executable as a new.rsrcsection. - Installer.
installer/build_msi.pywrites the MSI database directly through Windows Installer, using Python's standardmsilibmodule, so it needs neither WiX nor .NET.
- Programs run in the terminal see a pipe rather than a console. Many buffer their output until
they exit (use
python -u), and full-screen console programs such aseditdo not work. - Text is single-byte Windows-1252; UTF-8 and UTF-16 files are not decoded.
- TCC stops at the first error, so a build reports one problem at a time.
- One editor group (no split view), no word wrap, no language server or debugger.
