A lightweight, standalone code editor with full Vim keybindings, an interactive tutorial system (:tutor), and multi-language REPL integration.
# Build
mkdir build && cd build
cmake -G "Visual Studio 17 2022" -A x64 -DENABLE_LUA_REPL=ON -DENABLE_DUKTAPE_REPL=ON ..
cmake --build . --config Release
# Run (Windows GUI)
./Release/pzep-gui.exe [filename]Keybindings:
iβ Enter insert modeESCβ Return to normal mode:qβ Quit current window;:q!β Force quit:wβ Save buffer:tutorβ Launch interactive tutorial:lua/:duktape/:quickjsβ Open REPL buffer (if enabled)Ctrl+Qβ Quit application (with dirty buffer check)
The built-in tutorial guides you through pZep's core features with hands-on demos:
- Basic Navigation & Modes β Normal, Insert, Visual
- Window Splits β
:split/:vsplit, navigating panes - Tab Management β
:tabnew,gt/gT - REPL Integration β Try Lua, Duktape, or QuickJS inline
- Buffers & Files β Managing multiple files
- Advanced Commands β Search, replace, macros
Each lesson opens a dedicated tutorial buffer with explanatory text and embedded demo commands. Press the suggested keys to try features live.
pZep supports multiple scripting language REPLs that run in dedicated editor buffers:
| REPL | CMake Flag | Example Usage |
|---|---|---|
| Lua | -DENABLE_LUA_REPL=ON |
:lua β 1+1 β Enter β 2 |
| Duktape (JS) | -DENABLE_DUKTAPE_REPL=ON |
:duktape β Math.sqrt(16) β Enter |
| QuickJS | -DENABLE_QUICKJS_REPL=ON |
:quickjs β const x = 42; x |
REPL Keybindings (inside REPL buffer):
Enterβ Evaluate current line or selected expressionCtrl+Enterβ Evaluate outer expressionShift+Enterβ Evaluate and insert result
ZepEditorβ Main editor controller, manages tab windows, buffers, and global stateZepTabWindowβ Container for editor panes (splits) and file tabsZepWindowβ Single editor pane with text area, line numbers, minimap, and scrollbarsZepBufferβ Text buffer with undo/redo, syntax highlighting, and file I/OZepModeβ Input modes (Normal, Insert, Visual, Command, Ex)ZepDisplayβ Rendering and input abstraction (Raylib backend)
βββββββββββββββββββββββββββββββββββββββββββββββ
β Tab Region (top) β β File tabs
βββββββββββββββββββββββββββββββββββββββββββββ€
β Tab Content Region (center) β
β βββββββ¬βββββ¬βββββββββββββββ¬ββββββββββββ β
β βLine βGit β Text β Scrollbar/β β
β β numsβ β β Minimap β β
β βββββββ΄βββββ΄βββββββββββββββ΄ββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββ€
β Command Region (bottom) β
β Vim | NORMAL | 100% | file.txt | 12:5 β β Status bar
βββββββββββββββββββββββββββββββββββββββββββββββ
| Mode | Key | Description |
|---|---|---|
| Normal | ESC |
Navigation, commands (:w, :q) |
| Insert | i, a, o |
Text editing |
| Visual | v |
Character-wise selection |
| Command | : |
Ex commands and search (/pattern) |
mkdir build && cd build
cmake -G "Visual Studio 17 2022" -A x64 \
-DENABLE_LUA_REPL=ON \
-DENABLE_DUKTAPE_REPL=ON \
-DENABLE_QUICKJS_REPL=ON \
..
cmake --build . --config ReleaseThe main library (Zep.lib) builds by default. The GUI app (pzep-gui) and REPL plugins are built as separate targets when their respective options are enabled.
mkdir build && cd build
cmake -DENABLE_LUA_REPL=ON -DENABLE_DUKTAPE_REPL=ON ..
make -j$(nproc)Dependencies: Lua, Duktape development headers (or use bundled sources).
pzep/
βββ apps/
β βββ pzep-gui/ # pZep-GUI application (Raylib)
βββ include/zep/ # Public headers
β βββ mode_tutorial.h # Tutorial mode
β βββ commands_repl.h # REPL command wrappers
β βββ repl_plugin.h # Plugin ABI for external REPLs
βββ src/
β βββ mode_tutorial.cpp # Tutorial implementation
β βββ commands_repl.cpp # REPL command registration
β βββ mode_lua_repl.cpp # Lua REPL provider
β βββ mode_duktape_repl.cpp # Duktape REPL
β βββ mode_quickjs_repl.cpp # QuickJS REPL
β βββ repl_plugin_loader.cpp # Dynamic plugin loading
β βββ mode_vim.cpp # Vim keybindings & ex commands
β βββ window.cpp # 4-corner layout, line numbers, minimap
β βββ ... # Core editor (buffer, syntax, etc.)
βββ plugins/ # Plugin build configuration
βββ tests/ # Unit tests
βββ README.md
:tutorcommand β Guided interactive tutorial- Multi-language REPLs β Lua, Duktape (JavaScript), QuickJS
- Dynamic plugin system β Load external REPL providers at runtime
- Vim-style tilde indicators β
~for lines beyond EOF in line numbers - Filler line rendering β Correct viewport filling and minimap alignment
- Ex command
!support β:q!,:w!work without space - Windows GUI β No console window, native Win32 subsystem
- Cursor line/column display β May show
-1in rare edge cases after certain edits. A defensive clamp ensures the UI remains usable. (Tracking issue: investigate stalem_windowLinesafter buffer modifications.) - REPL plugin loading β QuickJS plugin may require external library on Windows. Use bundled sources via CMake options.
Fork of Zep. Originally based on nzep (Notification Editor). See repository for full license details.