Turn your browser into a Neovim client.
For now, just click on textareas or input fields. When you want to set the content of the textarea to the content of the neovim frame, just :w
. When you want to close the neovim frame, just :q
.
Before installing anything, please read SECURITY.md and make sure you're OK with everything mentionned in there. If you think of a way to compromise Firenvim, please send an email (you can find my address in my commits).
Get the extension from AMO, get the native messenger from the releases page. Run the native messenger once in your shell and if it results in Native messenger successfully installed.
being printed, you're done.
Installing from source requires nodejs, npm and neovim v.>=0.4
First, install Firenvim like a regular vim plugin (either by changing your runtime path manually or by using your favourite plugin manager).
Then, run the following commands:
git clone git@git.sr.ht:~glacambre/firenvim
cd firenvim
npm install
npm run build
npm run install_manifests
These commands should create three directories: target/chrome
, target/firefox
and target/xpi
.
Go to about:addons
, click on the cog icon and select install addon from file
(note: this might require setting xpinstall.signatures.required
to false in about:config
).
Go to chrome://extensions
, enable "Developer mode", click on Load unpacked
and select the target/chrome
directory.
Other browsers aren't supported for now. Opera, Vivaldi and other Chromium-based browsers should however work just like in Chromium and have similar install steps. Brave and Edge might work, Safari doesn't (it doesn't support Webextensions).
Firenvim currently requires the following permissions for the following reasons:
Firenvim is configured by creating a variable named g:firenvim_config
in your init.vim. This variable is a dictionnary containing the key "localSettings". g:firenvim_config["localSettings"]
is a dictionnary the keys of which have to be a javascript pattern matching a url and the values of which are dictionnaries containing settings that apply for all urls matched by the javascript pattern. When multiple patterns match a same URL, the pattern with the highest "priority" value is used.
Here's an example g:firenvim_config
that matches the default configuration:
let g:firenvim_config = {
\ 'localSettings': {
\ '.*': {
\ 'selector': 'textarea',
\ 'priority': 0,
\ }
\ }
\ }
This means that for all urls (".*
"), textareas will be turned into firenvim instances. Here's an example that disables firenvim everywhere but enables it on github:
let g:firenvim_config = {
\ 'localSettings': {
\ '.*': {
\ 'selector': '',
\ 'priority': 0,
\ }
\ 'github\.com': {
\ 'selector': 'textarea',
\ 'priority': 1,
\ }
\ }
\ }
Note that it is not necessary to specify the priority
key because it defaults to 1, except for the .*
pattern, which has a priority of 0.
The main issue with Firenvim is that some keybindings (e.g. <C-w>
) are not overridable. I circumvent this issue by running a patched version of firefox.
:editor
command.