17 comments

  • Tcepsa 508 days ago
    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!)
  • psacawa 508 days ago
    Please check out firenvim, which accomplishes this very useful trick in a site-configurable manner and is compatible with Tridactyl.

    https://github.com/glacambre/firenvim

    • exikyut 508 days ago
      That only replaces <textarea>s. Theoretically the OP project would also work in <div contenteditable>s.
      • OJFord 508 days ago
        And (more significantly surely?) outside the browser.
  • finnh 508 days ago
    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.

    [0] https://github.com/akahuku/wasavi

  • zvr 503 days ago
    Wow, that brings back memories...

    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).

  • noiwillnot 508 days ago
    Very interesting, I am sure that if something like this is packaged in Linux distros would become popular.
  • vthriller 508 days ago
    See also: vi keybindings for GTK2/3: https://github.com/polachok/gtk-vikb (not an active project though)
    • gandalfff 508 days ago
      Any experience with this? I would suspect that it would work with GTK2, but not for current GTK3/4.
      • vthriller 508 days ago
        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.

  • pinsl 508 days ago
    Tridactyl can also do this for text input fields in firefox (:editor).
    • dijit 508 days ago
      qutebrowser too; I have it bound to ^E
  • mihaigalos 508 days ago
    This is blackmagic. Nice work!

    Q: Why not publish it to crates.io (cargo publish)?

  • yewenjie 508 days ago
    How difficult would it be to port it to Wayland?
    • algon 508 days ago
      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.
  • colordrops 508 days ago
    This is brilliant. Now if I could only get IMEs to work for more than a few weeks before they break...
  • 3np 508 days ago
    Really cool; thank you for sharing!

    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.

    • algon 508 days ago
      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.

  • rnmp 508 days ago
    Looks so good. Is it compatible with Neovim?

    Thanks for sharing!

  • gigatexal 508 days ago
    Will this let me use vim bindings in Google docs?
  • jacob019 508 days ago
    Love it, and the video. Will install tomorrow.
  • fyresala 508 days ago
    I have been expecting this for long
  • leephillips 508 days ago
    Oh hell yes.
  • velox_neb 508 days ago
    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.
    • OJFord 508 days ago
      You say that like desktop Linux is new, or we only just switched to X11.