Ben Chuanlong Du's Blog

It is never too late to learn.

FireNVim Brings NeoVim into Your Browser

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Installation

  1. Install icon.

    curl -sSL https://raw.githubusercontent.com/legendu-net/icon/main/install_icon.sh | sudo bash -
    
  2. Install and configure NeoVim and SpaceVim using icon.

    icon nvim -ic
    icon svim -ic
    
  3. Install the FireNVim plugin for your browser.

  4. Run the command nvim and then inside NeoVim run the command :call firenvim#install(0).

  5. If you are using Linux, configure your brower to trigger FireNVim on the shortcut ctrl + e.

The above installation configures FireNVim to never automatially prompt up. You have to manually bring it up using the shortcut ctrl + e (Linux and Windows) or Command + e (macOS) . In case it doesn't work, please refer to Trouble Shooting Firenvim for instructions on how to trouble shoot it. Note: If you update the FireNVim plugin for your browser to a newer version, you will also have to repeat step 2 above.

Font Size

Use the following command to adjust font and its size.

:set guifont=Monaco:h16

Use the following commands to adjust the frame size for editing.

:set lines=80 
:set columns=100

Troubleshooting

Disable Hardware Acceleration

:set lines=30 is very slow due to hardware acceleration in browsers. Disabling hardware acceleration helps. Please refer to How to Turn Hardware Acceleration On and Off in Chrome and Hardware acceleration and WindowBlinds causes Firefox to crash on how to disable hardware acceleration in Chrome and Firefox.

References

Firenvim: Neovim inside Your Browser

FireNvim @ GitHub

Comments