Anvil Community Forum

Neovim in the browser

If this were an option in the ide, I’d have to go have a little lie down to recover my composure…

1 Like

Nice! Codemirror also has vim support (albeit not maintained) - and the anvil ide uses codemirror so… ive tried a couple of times (in vain) to make it work.

Wouldn’t it be great if there was a check box that said vim mode. I think if we ask enough the anvil fairies :fairy:‍♀ might make it happen.

That’s slightly different (but would still be nce to have). Codemirror has vim key bindings but you’re still running codemirror and not vim itself.

Neovim can run in headless mode with any ui driving it, so this would be your own local installation of neovim being driven from within the browser. (vscode has this ability to drive neovim too).

I’ve gone for a little lie down…


All my local neovim plugins and settings work too - so I’ve got async linting and autocomplete, formatting with black, import sorting, code folding etc. etc.

I am a happy man.


Much to my surprise, even my tag browser works!

Hang on, you’ve replaced the Anvil IDE editor with vim?

That’s even cooler than I first thought!

1 Like

Yep. And it turned out to be a breeze to setup. I just followed the firenvim instructions (install the neovim plugin, install the browser extension) and it all just worked.

1 Like

I guess you lose things like dynamic code linking (ctl-click) for functions, etc.?

Yes, but I can toggle between neovim and codemirror very quickly and easily

I have firenvim set not to take over by default. I hit ctrl-e if I want neovim and :q to get back to codemirror.

So I tend to read in codemirror first and then switch to nvim for editing.

Even just having my key binding for Black formatting is a major win!

1 Like

Holy smokes… This is amazing. Thanks for posting this. I just installed it and it is working great!

1 Like