Add VIM emulation
GNOME Builder has a rudimentary Vim emulation layer that works by using GTK CSS and CSS selectors to create "modes". It was a compromise to doing it all in C (as it was done originally) so that we could share code with other keybinding emulations.
However, Vim is very complicated in it's state management and requires special detail in how it's supported from an accessibility standpoint.
This could all be done much better upstream in GtkSourceView if the abstractions are right. In particular, a GtkIMContext
can be used to filter input but still redirect input to the textview's input-method as necessary.
We'd like this in GtkSourceView 5.4 so that it gets a lot of testing before Builder moves to GTK 4.
A mostly complete implementation can be found on the https://gitlab.gnome.org/GNOME/gtksourceview/-/tree/wip/chergert/vim branch.