Introduction
Pragtical - The practical and pragmatic code editor.

Pragtical is a cross-platform code editor with a modern graphical interface, developed using C and Lua(JIT), powered by SDL for rendering and input management. It serves as a lightweight alternative to web-based editors like VSCode and can be easily extended or themed with Lua plugins.
It supports syntax highlighting for various programming languages, thanks to contributions from the community, and adding new languages is straightforward. Some of its core features include:
- Auto-completion
- Graphical and advanced configuration using Lua
- Support for multiple file encodings
- Multi-threaded project-wide find and replace
- A command palette for a keyboard-focused workflow
- Graphical and keyboard-driven file navigation
- Customizable key bindings
- Changeable color schemes with easy creation of custom schemes
- A flexible plugin architecture for extending functionality
Examples of functionality added as plugins:
- LSP (implementing Language Server Protocol support for intellisense)
- EditorConfig
- Ghostty Terminal (integrated terminal tabs and bottom drawer)
- Code Formatters
- Source Control Management (Git and Fossil)
- and more (https://github.com/pragtical/plugins)...
History
Originally, Pragtical was forked from Lite XL (which is also a fork of lite) with a focus on being practical rather than minimalist. Over time, it has gained its own identity with various features and improvements not available in its predecessors. If you're interested, some of the reasons for the fork are explained here.
Name
The name was chosen as a counter-response to the approach taken by its
immediate predecessor. It is a mixture of the words pragmatic and practical,
two words that properly define our development approach as follows:
- governed through practice or action, rather than theory, speculation or idealism
- willing to see things as they really are and deal with them sensibly
As a result we belief that new features introduced through pull requests should be evaluated taking a practical approach, without going into lengthy idealistic discussions that slowdown progress, merging code when logical.
Goals
We differentiate ourselves from our predecessors by striving to make Pragtical an editor that enhances the feature set, providing both you and us with a better out-of-the-box experience while maintaining a focus on performance and ease of extensibility. Additionally, we have simplified the release process by reducing the number of builds to choose from and adopting a more frequent release approach.
Performance
Over time, Pragtical has adopted various enhancements for better editor performance, some of them are:
-
Modular Renderer Backends - Pragtical includes multiple renderer backends in the same binary. The conservative surface renderer remains available, while SDLRenderer and SDL GPU can be selected in Settings > Core > Graphics or at startup with
PRAGTICAL_RENDERER. This makes renderer testing and deployment possible without rebuilding the editor. -
SDL GPU Renderer - the SDL GPU backend moves rendering toward GPU-native replay with GPU-backed frame textures, atlas-backed glyph rendering, and batched draw command replay for text, rectangles, canvases, pixels, and polygons. It is still opt-in, but already provides a faster path for users who want to test the new renderer stack.
-
JIT - Pragtical takes a LuaJIT first approach, meaning that our official builds use LuaJIT instead of PUC Lua for the performance benefits that come with it. Also having a LuaJIT first approach gives us FFI for free which allows easy interfacing with native C libraries for easier plugin development. LuaJIT has proven to be a mature Lua implementation that will provide a stable development ecosystem for the foreseeable future.
-
Threading - a supported feature inside the core on components where it is practical to use, like file searching and replacing, where performance gains are evident.
-
Improved Job Scheduling - internally the editor uses Lua coroutines to perform different types of task, the way these tasks are scheduled has been improved on Pragtical to provide better editor responsiveness.
-
Native Tokenizer - syntax highlighting can use a native module with compiled syntax rules, reusable states and optimized matching. Speedups vary with the language, rules and document; the Lua tokenizer remains available.
-
Idle Updates - views request work when their state changes, and the main loop can wait between events. Hidden panes, settled animations and unchanged widgets avoid unnecessary updates and redraws.
More Features
Some of the additional features and enhancements include:
-
Command Palette - run actions by name with command prompts at the bottom, top, or center of the editor.
-
Application Menus - access editor and plugin actions through a responsive menu bar with keyboard navigation.
-
Project Module Trust - project-local Lua modules are gated behind trust prompts, making it explicit when a project is allowed to execute editor-side Lua code.
-
Networking APIs - built-in networking support is available for runtime features and plugins through Pragtical's Lua APIs. For restricted or minimal builds, networking can also be disabled at build time, which skips network Lua APIs and network-sensitive features such as remote Markdown images.
-
Widgets - more tightly integrated as part of the core for easier gui development and reusability, also ensuring that plugin developers can with more ease develop user interfaces when in need.
-
Settings UI - if you are not using a terminal editor like n/vim it means you are looking for a more point and click approach which is why we include a graphical interface to adjust your preferences out of the box. But don't worry, configuring the editor through Lua will keep working because it is also pragtical 😉
Settings includes searchable Core, Colors, Plugins and Keybindings tabs, individual reset actions, and live previews while choosing fonts.
-
Font Ligatures - enable ligatures on compatible fonts to render operators like
!=,=>and>=as joined symbols, while keeping the original text intact. -
Automatic Font Fallback - use installed system fonts for missing writing systems and symbols while retaining explicit font priorities.
-
Color Emoji - display supported emoji sequences in full color using installed fonts or an explicit emoji fallback, for both code and interface text.
-
Unicode Editing - move, select, delete and wrap by displayed graphemes, keeping combining marks, variation selectors and composed emoji together.
-
Encoding - while UTF-8 has overtaken as the preferred encoding for text documents for its convenience, we can sometimes encounter a document in another encoding. Loading and saving documents with different encodings will be supported for when the need arrives, a feature that is also commonly found in other editors because it is pragtical.
-
IPC - shared memory functionality is part of the core and IPC plugin shipped by default to allow opening files and tab dragging between currently opened instances.
-
CLI - Integrated command line interface API that can be extended by plugins to provide new CLI flags.
-
Project Search - search and replace across project directories, open results in splits, and dock results on either side or use a centered popup.
-
Workspace Sessions - restore project layouts and unsaved buffers, choose saved sessions, and remove obsolete sessions from the File menu.
-
Line Wrapping - wrap at the configured column limit or viewport width, with word/letter modes, continuation indentation and a wrapping guide.
-
Code Folding - Built-in support for folding code regions, with gutter markers, keyboard shortcuts, persisted fold state, and settings for how folded regions are displayed.
-
Source Control Management - Review Git and Fossil changes, prepare commits, and manage branches, tags, and remotes from a repository workbench.
-
Built-in Diff Viewer - A file or strings diff viewer that lets easily navigate and synchronize the differences. The functionality is expanded by the Source Control Management where it will let you compare your current checkout file to an older version on the commit history.
-
Built-in Image Viewer - A basic image viewer powered by SDL_Image with support for a decent amount of image formats. Some of its features include zoom in/out and toggleable background mode (none, solid and grid) for transparent images.
-
Built-in Audio Player - Listen to local audio files inside the editor, or scan a folder and its subfolders into a playlist. Includes playback and volume controls, repeat, shuffle, and an optional waveform and level display.
-
Built-in Markdown Preview - Render Markdown documents directly in the editor with live updates, syntax-highlighted code blocks, tables, links, and local or remote images.