Vim’s GTK 4 GUI backend is now available in the master branch, providing a new build-time option for users who want to use the editor’s graphical interface with the latest GTK toolkit.
Introduced in Vim patch 9.2.0501, the GTK 4 backend joins the existing GTK 2 and GTK 3 GUI options. It’s important to note that this update targets GUI-enabled Vim builds (GVim), not the standard terminal-based version.
Currently, GTK 4 support is opt-in. Users can enable it by configuring Vim with the --enable-gui=gtk4 option. GTK 3 remains the default backend when compiled with --enable-gui=auto, so existing build setups will continue to function as before.
The new backend uses GTK 4’s native platform support, enabling Vim’s GUI to run on both X11 and Wayland, providing a modern GUI foundation while maintaining compatibility with existing GTK-based builds during the transition.
Keep in mind, however, that GTK 4 support is considered an early stabilization step, not an immediate replacement for GTK 3. In light of this, keeping it optional allows maintainers to test the new backend without affecting default behavior for distributions or existing GVim installations.
The GTK 4 backend is now available in Vim’s master branch for users building from source. GTK 2 and GTK 3 GUI backends remain available, with GTK 3 continuing as the default automatic GUI option.
For additional details, see the announcement.
