I used to use KWrite, but the maintainers of the QT and KDE projects kept breaking it in ways that make it unusable without running the full KDE
bloatware desktop. So out of frustration in having to continuously kick KWrite and look for obscure workarounds, I wrote my own editor
that only depends on having an OpenGL 4.4 capable gpu and a couple basic system libaries. It's fast, and lean, and has little more than the
features that I personally use, at least at the moment.
While gpuedit is aimed at my personal preferences, it is intentionally designed to be as agnostic as possible to the various tech religions
surrounding editors and inputs. You can use multiple panes, or not. You can use multicursor, or not. You can use VIM mode, or configure it to
act like emacs, or even choose a sane, normal, modern input style if you so desire.
GPL 2 licensed.
Features
- Complete configurability of all user interactions and commands in one simple(-ish) JSON file.
- Tabs and panes
- Fuzzy-matching file name searcher within git repos and regular folders
- Grep-matching file contents searcher within git repos and regular folders
- Undo/Redo that usually works
- Autocomplete based on word frequency within the document
- Command recording and playback (like macros in Excel)
- Multiple cursors
- Find/replace powered by libpcre
- VIM-style input mode, if you hate your finger joints and want arthritis
- All the usual basic features of a text editor
- Various bugs, lest you get complacent
Features get added and bugs get fixed when they rise up my priority list among other work. Donations, kindly appreciated, will rapidly
raise gpuedit's priority since first and foremost I have to put food on the table.
Currently supported syntax highlighters
- C (not C++)
- GLSL (uses the C highlighter)
- Lua
- JS (used for JSON files too)
- Python
Repos
Github
Notabug (Currently down due to the Goddamn AI scrapers. Fuck Sam Altman.)
Gitlab
Codeberg
Installation
Requirements
- Linux 2.6+
- A reasonably modern CPU.
- OpenGL 4.4+ capable hardware and drivers.
- Note that some integrated Intel devices are capable of running gpuedit despite claiming to
only support OpenGL 3.0, but with sub-optimal performance.
- Will eventually support a Vulkan option (the gui toolkit has a working Vulkan fork in another project), but not yet.
Install
- https://github.com/yzziizzy/c3dlas symlinked as src/c3dlas
- https://github.com/yzziizzy/c_json symlinked as src/c_json
- https://github.com/yzziizzy/sti symlinked as src/sti
- Dependencies on apt-based distros:
sudo apt-get install libx11-dev libglew-dev libfreetype6-dev libfontconfig1-dev libpng-dev libpcre3-dev
- Optional Dependencies: sudo apt-get install libjpeg-turbo8-dev alsa-source
- Compile the parser generator: cd src/sti/parser/ && ./build.sh
- For each highlighter in src/highlighters/:
- ./build.sh
- Copy or symlink the .so to /usr/local/lib/gpuedit/highlighters/
- Build gpuedit: ./build.sh -cr
Configuring
Most configuration happens in
~/.gpuedit/commands.json. User input is compared to the list of commands and
every matching
command is run in order. Commands also exist in the concept of "modes". Only commands from the current mode are considered. Modes can
be changed with commands or by certain events inside the editor. Mode numbers below 100 are reserved but everything else is open to use.
Certain reserved modes trigger internal actions like showing the find/replace bar. Overlays are a special category of mode that do not replace
the existing mode, rather are scanned first and unmatched inputs are cascaded to the underlying mode. Multiple overlays can be active
at once, such as the go-to-line bar and the find/replace bar being open at the same time.
Each command entry in the config file has certain standard fields:
{
mode: 10,
elem: "Buffer",
cmd: "ACReplaceWithSelected",
mods: "C",
key: "XK_Return",
flags: ["rehighlight", "undoSeqBreak", "resetCursorBlink"]
},
- mode: Which mode this entry applies to. Modes are specific to individual elements, and mode numbers are specific to element types; each
buffer and pane control tracks its own mode independently, and mode numbers can harmlessly overlap between the two types.
- elem: Which part of the UI this entry applies to, such as the buffer editor, the main tab control, etc.
- cmd: One of the internal commands to run. All supported commands should have an entry in the default config file, but the full list
can be found in src/commands.h.
- key: Which key activates this entry. It can be an ASCII letter or a key name which can be found by running xev.
- mods: Which modifier keys must also be down:
- C - Control
- S - Shift
- A - Alt
- T - Tux/Windows/Super
- amt: A command-specific argument which usually is a count of lines or characters, or specifies some strings of relevance ti the command.
- setMode: The mode to enter or overlay to activate after this command.
- flags: Various extra actions the editor should take, mainly relating to the gui. They should be reasonably self-explanatory
by examining which commands use which flags.
- cmd_list: An array of commands which when used with mode allows you to apply a mode to all contained commands at once.
Note that all configuration files are loaded by c_json which is extremely flexible in formatting. Single quotes are permitted, and string values without
whitespace or leading numbers can omit quotes altogether.
General options and theming can be found in ~/.gpuedit/options.json.
Highlighter color config files are also located in ~/.gpuedit/.