Thank you for sharing this, and for providing a way to use other editors--I can't wait to try it with an Emacs client! (I had something similar in the past with just Firefox; I love the idea of being able to access it from anywhere!)
On OSX w/ Chrome I use wasavi[0], an extension that implements a nice subset of vim directly in the text area (much like OP's system, but not using actual vim). Works really well, better than other extensions I've tried that attempt to ~shellout to $EDITOR and then sync back to the input area.
Back in the '90s I had made an X Input Method that used vim -- essentially forked a gvim process on a temporary file and read the file upon termination. It was a nice learning experience, but not very useful.
Besides textareas in browsers (the main use, where a number of other solutions currently exist), a fun demo was to use vi for changing formulas in a spreadsheet (I assume it must have been StarOffice back then).
I was actually the one who submitted patches for GTK3 support! But, yes, it's never going to work with GTK4, at least not without complete overhaul.
I don't daily-drive it though, mostly because I never found time to update rather limited set of keybindings, a task that seems way more involving than a couple of little fixes that were needed to support GTK3.
I'm not familiar with how IMEs work in Wayland at the moment, but I guess it is possible by the similar way as XIM.
I would like to investigate the protocol later.
Curious: Did you consider neovim over vim and if so what made you stick with vim? AAUI neovim has these kinds of "embedded" use-cases in mind and intends to be smoother than vanilla vim.
Thank you for the information.
Actually I didn't so stick to vanilla Vim and have no intention to avoid Neovim at all!
FYI, since this IME embeds a terminal emulator it should be able to use with other terminal-based editors (including Neovim) by applying almost no changes to the editor's codebase.
Depressing to think that, even if you find a way to make this work, it'll be deprecated in a few years as most distros move to Wayland. Then if you figure it out in Wayland, it'll probably break again when they come up with some new backwards incompatible bullshit. Everything in desktop Linux is like this.
[1]: https://github.com/tecosaur/emacs-everywhere
https://github.com/glacambre/firenvim
[0] https://github.com/akahuku/wasavi
Back in the '90s I had made an X Input Method that used vim -- essentially forked a gvim process on a temporary file and read the file upon termination. It was a nice learning experience, but not very useful.
Besides textareas in browsers (the main use, where a number of other solutions currently exist), a fun demo was to use vi for changing formulas in a spreadsheet (I assume it must have been StarOffice back then).
I don't daily-drive it though, mostly because I never found time to update rather limited set of keybindings, a task that seems way more involving than a couple of little fixes that were needed to support GTK3.
Q: Why not publish it to crates.io (cargo publish)?
Curious: Did you consider neovim over vim and if so what made you stick with vim? AAUI neovim has these kinds of "embedded" use-cases in mind and intends to be smoother than vanilla vim.
FYI, since this IME embeds a terminal emulator it should be able to use with other terminal-based editors (including Neovim) by applying almost no changes to the editor's codebase.
Thanks for sharing!