Zep
Zep - An embeddable editor, with optional support for using vim keystrokes.
Install / Use
/learn @Rezonality/ZepREADME
Zep - A Mini Editor
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --> <!-- ALL-CONTRIBUTORS-BADGE:END -->Zep is a simple embeddable editor, with a rendering agnostic design and optional Vim mode. It is built as a shared modern-cmake library, using a single header include, or as a static library. The core library is dependency-free (the demo application requires an installed package), and it is possible just to copy the files into your project and build it. Out of the box Zep can draw to a Qt Widget or an ImGui window - useful for embedding in a game engine. A simple syntax highlighting engine is provided, and can easily be extended. Basic theming support is included, and window tabs and vertical/horizontal splits are also available. Zep is 'opinionated' in how it does things, but is easy to modify and supports many common features. It is heavily influenced by Vim, but has a good notepad-style editing mode too. A simple search feature (Ctrl+P) is a powerful way to find things, and a Repl mode is useful for implementing a console for game scripting. Intended to eventually sit inside a live-coding environment, Zep also has a minimal mode and several configuration options which can be set in a simple toml-format file.
For an example of building Zep into a simple ImGui application, see the example project, which shows how to add Zep as a submodule and build it as a library or just include a single header file: Integrating Zep
Video Overview
Screenshot

Zep supports the standard editing keystrokes you'll find in most editors, along with a reasonable subset of modal Vim editing as an option. The demo project lets you switch between the editing modes on the fly. Zep is not meant to replace Vim. I don't have a lifetime spare to write that, but it has most of the functionality I use day to day, and anything missing gets added over time. A key-mapper enables configuration of Zep outside the standard modes offered.
Zep is ideally suited to embedding in a game engine, as an in-game editor, or anywhere you need a simple editor without a massive dependency on something more substantial like NeoVim. The core library is dependency free, small, and requires only a modern C++ compiler. Zep can be included in your project building a dependency-free modern cmake library, and setting Zep::Zep in target_link_libraries, or as a single-header include. A header-only implementation of the ImGui and Qt backends is provided as an addendum to the core library; this enables Zep to render in an ImGui or Qt environment. After building and installing Zep on your system, only 2 lines are required in your CMakeLists to use it. An alternative would be to just copy and build the source files for the core library into your project.
The demos for Qt and ImGui require dditional packages, but these aren't required to embed Zep in your application. The ImGui demo builds and runs on Windows, Linux and Mac OS. If you are a Vim user, you might often suffer the frustration of not being able to use Vim keystrokes in your tools. Zep solves that.
Key Features:
- Modal 'vim' or modeless 'standard' editing styles; built around a common core of functionality.
- Keymapper for extending existing modes or adding new commands
- Qt or ImGui rendering (and extensible)
- Terminal-style text wrapping and work in progress non-wrapped mode
- Splits and tabs
- A simple syntax highlighting engine with pluggable secondary highlighters
- Theme support
- A Repl for integrating a command/scripting language (the demo project integrates a Janet Lang interpreter - :ZRepl to get into it, try (+ 2 2))
- CTRL+P search for quick searching files with fuzzy matching
- Text Markers for highlighting errors, etc.
- No dependencies, cross platform, small library, single header, static library or installed library option.
- Builds on VC 2017, GCC 6, Clang. C++14 is the basic requirement
New Features, recently added:
- Support for tabs instead of spaces; display of tabs as whitespace arrows.
- UTF8 (Work in progress - not completely done yet).
- More generic keymapping for extensible modes
- /search support
Current Limitations:
- Vim mode is limited to common operations, not the extensive set of commands typical in Neovim/Vim. There are now a considerable number of commands, but notably ex commands are missing, such as %s///g for find/replace.
Though I have limited time to work on Zep, I do try to move it forward at York Developer's regular Code and Coffee sessions. Zep was my 2018 project but has already proved quite popular, and I try to throw more features in when I can. There are over 200 unit tests for the editing modes. This project started mainly as an experiment and a learning exercise. I like the idea of a programmer building programmer tools for their own use, just as carpenters used to build their toolbox.
One of my targets for Zep is to get it to the point where I can use it as a standalone editor for common tasks. It is almost equivalent to how I'd use NeoVim day-to-day. The other target is to use Zep in a live coding environment.
Pull requests are appreciated and encouraged ;)
Screenshots
Live Coding in 'Minimal' Mode:

Using the ImGui Renderer:

Using the Qt Renderer:

A light theme:

Embedded in a Live Coding tool:

Embedded in a Game Engine:

Design
Layers
Zep is built from simple interacting layers for simplicity.
Text
The text layer manages manipulation of text in a single buffer. At the bottom level, a gap buffer structure maintains the text information. The buffer layer is responsible for saving and loading text, and supporting simple search and navigation within the text. Much of the higher level mode code uses the buffer commands to move around inside the text. A GlyphIterator is used within the buffer in order to walk along it in UTF8 code-points.
A command layer supplies functions to add and remove text, and supports undo; all buffer modifications are done with these simple commands.
The Mode layer supports editing text using Vim commands, or using standard notepad-like commands.
A Syntax layer monitors the buffer and provides file-specific syntax coloring. Syntax highlighting can be easily extended
Display
Tab windows are like workspaces, each containing a set of windows arranged in splits. The window lass arranges the rendering and calls a thin display layer to draw the text. This makes it simple to draw the editor using different rendering code. Adding Qt took just an hour to do.
Vim & Standard Modes
Mode plugins provide the editing facility - currently that is Vim & Standard and modes for the Repl and the Search panels. The Vim mode has most of the usual word motions, visual mode, etc. The standard mode has the usual shift, select, cut/copy/paste, etc. See Vim Mode, or the top of the mode_vim.cpp file for a list of supported operations in Vim
Building
After every change, Zep is built on Mac, Linux and PC. You can see the script which does this in https://github.com/Rezonality/zep/.github/workflows/builds.yml. You can choose to build just a library using modern CMake, or the full demo, or just include the library in a subfolder without building it at all.
Here is an example of building the demo (and hence the library and tests). The build without Qt is easier, and it is recommended as a starting point, unless you are familiar with Qt and have it already installed.
Add extra packages
Below is the minimum; your system may indicate it needs extra packages.
Linux
sudo apt install cmake
sudo apt install git
Mac
brew install cmake
brew install git
Qt
Qt is only required if you want that version of the demo (there is little difference between the functionality of the Qt and ImGui demos - they are just different ways to achieve the same thing); it is better to start without it if you are just evaluating Zep, since it is just one more complication and installation... Here is an example of installing Qt on Linux
# for Qt/Demo support
sudo apt install qt5-default
# Adapt to your installation path - you will need to set this appropriately
set QT_INSTALL_LOCATION="/usr/include/x86_64-linux-gnu/qt5"
On Windows you would typically install the Qt library and then set an environment variable to point to it:
s
Related Skills
node-connect
338.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
338.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.6kCommit, push, and open a PR

