A maintained fork of medit (also known as mooedit) — a light, fast GTK text editor with tabs, syntax highlighting, a file selector, find in files, ctags navigation, a terminal pane, language server support, spell checking and user defined tools.
Upstream stopped at 1.2.92 in 2017. Its author called the editor "rather dead than alive" [1], suggested gedit or vs code instead [2], and offered to help anyone willing to port it to gtk-3 [3]. Meanwhile, because medit needed python2 and GTK+2, it was dropped after Debian 10 and Ubuntu 20.04 — the Debian package is gone — and it is in none of the current releases of either.
This fork brings it back: it builds against GTK+3, needs no python at all, and ships packages for the distributions that lost it.
- original website: https://mooedit.sourceforge.net (old site, no longer updated)
- last upstream release: 1.2.92 (2017-11-12)
- current release of this fork: 1.3.10
Packages for Debian 12, 13, Ubuntu 22.04, 24.04, 26.04, Fedora and openSUSE — deb and rpm come from the same place, and the page walks you through adding the repository for whichever one you are on.
On deb, medit is a metapackage that pulls in medit-gtk3, or leaves
medit-gtk2 in place if that is what is already installed — install one of
those directly to pick the toolkit yourself. The two are mutually exclusive, and
only medit-gtk3 has the terminal pane. The rpm is a single medit package,
built against GTK+3.
Everything that kept medit out of the distributions is gone:
- GTK+3. medit builds and runs against gtk-3.24, which is what the build
defaults to; the gtk-2.24 build is kept for older systems and
-DGTK_VERSION=2selects it. - No python. The dialogs used to be generated from glade files by a python
script and parsed at runtime by a bundled copy of libglade. They are plain
.uifiles now, loaded by GtkBuilder from a GResource bundle, so neither the build nor the editor needs an interpreter. python2 was the reason medit left Debian, and none of it is left: no interpreter is started at build time, none at run time, and no package medit produces depends on one. The one python in the tree is the UI test harness undertests/, which is a developer's tool — it is not built, not installed, not packaged, andcmakenever looks for python unless-DENABLE_UI_TESTS=ONasks it to. - Language servers. A builtin client speaks the language server protocol to
whichever servers are installed: problems underlined in the text and listed in
a pane, a tree of what the document contains, go to definition, type
definition and implementation, find references, rename, format the document,
the fixes a server offers for what is wrong under the cursor, the signature of
the call being typed, the other uses of what the cursor is in, hover and
completion, and what a server is busy with while it is busy.
Which server handles which files is one small xml file, and
Tools → LSP Servers…opens your copy of it. It needs json-glib, which does not depend on gtk, so both builds have it (-DENABLE_LSP=OFFto leave it out). It is off until you switch it on inPreferences → Plugins, the same as the ctags module: it runs other people's programs, one per project, and that is not something to start behind your back. - Spell checking. Misspelled words are underlined in
.txt,.md,.rstand.texfiles (the list is in the module's page ofPreferences), and a right click offers up to five corrections, adding the word to your dictionary, and ignoring it for good or for the document;F7jumps to the next one. A word is judged by its own alphabet, so a text in English and Russian is checked against both dictionaries, and CamelCase and snake_case words are left alone. In source code it can check only what is a comment or a string. It uses Enchant, loaded at run time: nothing to build against, no dependency in the packages (they only suggest it), and no Enchant means no checking, not a broken editor. It is off until you switch it on inPreferences → Plugins. Linux only. - Zoom.
Ctrlwith the mouse wheel, orView → Zoom In,Zoom OutandReset Zoom(Ctrl++,Ctrl+-,Ctrl+0), changes the size of the text in all documents at once. It is not saved: the next run starts from the font of the preferences again. - The terminal pane is back. It used to be a python plugin on top of the
GTK+2 vte; it is a builtin C++ plugin on top of vte-2.91 now, with the same
shell, color schemes and context menu, plus an entry in the Tools menu bound
to
Ctrl+`; that key, and the pane's own copy and paste, are inEdit → Configure Shortcutslike every other command. The GTK+2 build does not get it — vte's last GTK+2 release is 0.28.2 from 2011 — and vte is optional either way (-DENABLE_TERMINAL=OFF). - CMake instead of autotools. The build is out of source, so a gtk-2 and a gtk-3 build directory can live side by side.
- C++ instead of C. Every source in the tree is compiled as C++ and named
.cpp, so what used to be a comment about who frees what is the type of the thing being freed, and a function with nine exits has no cleanup label at the end of it. The code carried in from elsewhere — gtksourceview, the XDG MIME implementation and ctags' tag reader — is kept verbatim undersrc/vendor/. - Windows, macOS, the python and lua bindings, the HTML widget and everything nothing called were removed, and the tree is smaller than 1.2.92 even with the language server client and the terminal pane added on top.
- Bug fixes on top of 1.2.92, including a crash in the user tools preferences and a set of leaks.
See NEWS for the full list.
git clone https://github.com/abbat/medit.git
cd medit
cmake -S . -B build -DGTK_VERSION=3
cmake --build build -j$(nproc)The binary is build/src/medit and runs straight from the build directory.
INSTALL has the dependencies, the build options and the details.
main carries the current state and every release is tagged (v1.3.10,
v1.3.9, ...), so git checkout v1.3.10 gets the sources of a given release.
The original sources up to 1.2.92, which this fork started from, are at
https://sourceforge.net/projects/mooedit/files/medit/.
Report bugs and file feature requests at https://github.com/abbat/medit/issues.
medit was written by Yevgen Muntyan. This fork only keeps it running on current systems; see AUTHORS and THANKS for everyone who made the editor what it is.
medit is free software, released under the GNU LGPL version 2.1. See COPYING for details.
medit is being kept alive in more than one place. If this fork does not fit your needs, look at these:
- fangq/medit — a GTK+3 port that keeps the
python plugins instead of dropping them, moving them to python3 (
gtk3andpython3branches). Under active development, with work on a gdb based debugger on top; announced on the upstream forum. - dark-penguin/medit — upstream 1.2.92
on GTK+2 with the python2 dependency removed and a
debian/folder to build packages from; last refreshed for Debian trixie. - cl0ne/mooedit-sources — not a fork but an archive of the upstream sources.
The Arch AUR package is maintained as well and carries a python3 patch of its own.
