1. 30
  1. 5

    This is pretty rad! I really love that it keeps my .vimrc and all of my plugins. My only gripe is that it does not detect all text boxes (such as Slack’s message line). I don’t do much web work, but I will see if I can hack a solution when I get some free time.

    1. 4

      It’s usually just a matter of finding the right CSS selector to add to your config, I described the steps to do that here.

      1. 2

        That was easy, thanks for making such great tool! I have been looking for something that would let me use vim motions when writing messages or emails for a while now. The fact that it also uses my .vimrc is really amazing!

        1. 1

          Awesome, thank! I will give it a try this weekend.

      2. 4

        I’ve seen and used a lot of attempts to get a real vim experience into browser over the years, this is by far the best attempt yet.

        Instead of emulating keybindings and trying to replicate something in the browser or copying content back and forth from an editor in another window, it actually uses a headless Neovim instance and draws the external interface in the browser. This gives you your full editor including all plugins and bindings, natively anywhere there was a textarea.

        The only catch (and this only applies to Firefox and not Chrome) is that CTRL-W can’t be caught and mapped to vim’s default delete word, it closes the tab instead.

        1. 3

          Instead of emulating keybindings and trying to replicate something in the browser or copying content back and forth from an editor in another window, it actually uses a headless Neovim instance and draws the external interface in the browser. This gives you your full editor including all plugins and bindings, natively anywhere there was a textarea.

          I’m super-happy that Neovim chose to architect their project in this way, making these kinds of embeddings in software that is not primariy for text editing possible.

          1. 1

            this is by far the best attempt yet.

            These words motivated me to install Firenvim and give it a try.

            The plan was to just write here “this comment is written via Firenim” to see how it works, just to realize that Firenim works if I want to have ‘global comment’ (reply box at the top of the page), but the textbox for replying to an existing comment doesn’t trigger Firenim. (this is on Vivaldi, if that matters)

            1. 4

              Works for me on firefox, but it might be because I have disabled autofocusing elements. You can also manually enable firenvim on an element, you can use <C-e> (this can be configured in chrome://extensions or about:extensions, not sure what the equivalent is on Vivaldi). I should probably document this feature somewhere.

              1. 2

                It does not work for me on Firefox either, the same monkey business with focusing elsewhere and back is needed to make it show up. I’m going to guess whatever you’ve done to disable autofocusing elements has changed that behavior. By the way, how did you do that? That sounds like something I would like too!

                1. 2

                  I have browser.autofocus set to false is about:config and I also set tridactyl’s allowautofocus setting to false.

                  1. 2

                    Holy cow Tridactyl has come a long way since the last time I gave it a test drive! Thanks again for this tip, it is now by default Firefox UI and I’m working on configuring it to taste.

                    1. 1

                      I tried browser.autofocus already, that doesn’t affect this issue. I’ll have to look into what tridactyl is doing and either use it or try to replicate just that feature (I have most recently been using saka-key for vim-like navigation features).

                2. 2

                  This reply written in Firenvim (Chrome).

                  I actually had the same problem you describe initally and was surprised since the textarea has just about the same properties as the one above. Then I clicked away for a second and came back and it worked.

                  I suspect what is happening is the hook that’s grabbing focus events for texarea tags is not getting set on the dynamically generated textarea here in replies. It does eventually find it, just now when it is created.

                  I will open have opened this as a bug report on Firenvim’s issue tracker.

              2. 2

                Kinda cool, but every time I see stuff like this I wonder if I’m the outlier in that I absolutely do not want vim or emacs keybindings when writing normal text.

                I’ve been using vim bindings (or vim) for code for years now in my daily work and most private coding, but except for a few blog posts I write in markdown… every single time I tried

                • vim keybindings in a shell
                • using vim keybindings in my browser
                • writing my everyday notes in vim

                I hated it. I need this mental switch to code and have not fully accepted the vim lifestyle. But it’s the same thing with keyboard layouts. I use US-Intl at work and on my laptops and qwertz on my Logitech keyboard at home. 95% of days it works without a hitch, just switching the physical thing. (On the other hand I am unable to reliably type on a qwertz ThinkPad unless using up all my brain cycles…)

                1. 1

                  for me the mental switch is if I’m doing something confined to a single line, I want readline keybindings, but for anything longer than that vim is ideal.