glacambre / firenvim Goto Github PK
View Code? Open in Web Editor NEWEmbed Neovim in Chrome, Firefox & others.
License: GNU General Public License v3.0
Embed Neovim in Chrome, Firefox & others.
License: GNU General Public License v3.0
This is needed because Chrome can't handle SVGs. Most existing packages require other tools (e.g. inkscape) to exist in $PATH which seems completely absurd to me, so I'll probably need to write my own webpack loader.
We currently use a colored square which isn't very pretty.
We need to implement something similar to what Firefox does (global browserAction, window-local or tab-local).
Somebody on Matrix asked for Google Docs support.
Currently, fancy editors aren't supported.
Anything else?
Someone on reddit said they wanted that and it sounds really reasonable.
Hi.
I haven't spent much time thinking about how to implement this, but it seems to
me like there might be an argument to make that firenvim should always autosave
/ always write the buffer to the input box.
The argument is it's really low effort to delete the resulting text from the
textbox if you need to, but high risk if you throw away a really long comment.
I.e. the workflow I kind of expected was something like as soon as I left
focus from the input box, autoquit vim, autopopulate the input box, then if I
refocus, re-open.
Having an explicit save/quit via :q / :w / :x seems just a bit unnatural there
to me.
But yeah curious to hear what you think!
(I guess on the implementation side, even not having read yet how this works,
you just have JS always send :x or whatever at the end itself)
Input fields often are too small for the smallest possible neovim frame (3 lines). It'd be nicer if the iframe adujsted its size to that.
https://developer.chrome.com/extensions/commands
If you create a command, then go to the extension keyboard shortcut settings and map ctrl-w to it, that will override the close tab shortcut. This may also work with firefox.
It's rather annoying to have to :q!
these elements before being able to <Tab>
/<Enter>
.
hope this tool can be used in windows too.
As someone pointed out on reddit, this would probably be better.
After running close_server, nvim prompts Press ENTER or type command to continue
on stderr. This might be related to neovim/neovim#9358.
Could also be related to neovim/neovim#11166.
Getting permission denied.
> git clone [email protected]:~glacambre/firenvim
Cloning into 'firenvim'...
[email protected]: Permission denied (publickey,keyboard-interactive).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Would be pretty useful.
When running npm audit fix
I get this change:
diff --git a/package.json b/package.json
index 763936d..3b68478 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,7 @@
"tslint": "^5.13.1",
"tslint-sonarts": "^1.9.0",
"typescript": "^3.3.3333",
- "web-ext": "^3.0.0",
+ "web-ext": "^3.1.1",
"webpack": "^4.29.6",
"webpack-cli": "^3.2.3"
},
Just a suggestion: did you try TCP_NODELAY? This should probably be done on both ends.
Since Firenvim now supports both Firefox and Chromium, I should probably set up E2E tests to avoid breaking things for Chromium users.
Someone on reddit asked for Safari support, which seems doable but might require a very different background script.
Is it possible to support chrome ?
Should be easy to fix: listen for scroll events, add a 10ms timeout, grab the element's new position, reposition the iframe over it.
If I have a long multiline doc and hold down e.g. j
in the embedded nvim, only the first j reaches the editor seemingly, and the cursor stays on the second line down rather than scrolling line-by-line.
Not sure if there's anything I can provide for diagnosis or if this can be reproduced by others.
So, with the latest release, we have it finally working in my Firefox. Thank you!
I like this extension very much, but even I have to admit that using it for input fields seems like a bit too much. Could we get an configuration (compile-time even) option to use it for textareas only?
Thank you.
If there is already text in the textarea then it gets loaded into the vim buffer but changes dont get set on quitting the client
i get the following error in the console
NeovimFrame.ts:120 Uncaught (in promise) TypeError: Cannot read property 'match' of undefined
at NeovimFrame.ts:120
at Array.find (<anonymous>)
at NeovimFrame.ts:120
OS: Fedora 30
Browser: Chrome 1569574344
Nvim: 0.4.2
Probably just need a 10ms timeout and then calling .focus()
on the frame again.
The characters in this string get really tall rows. This can probably be fixed with a bit of CSS.
No idea why this might happen
Using firenvim from 9c810f0 with Firefox 67 from openSUSE/Tumbleweed package is rather flawless on Github, somehow manageable on Reddit (it doesn't activate every time), but complete disaster on Bugzilla.
When I click on "Reply" link, I get this:
What looks like nvim frame scrolls up over the actuall <textarea>
just to the one line height, which is really hard to use.
I had some trouble installing firenvim on Mac OS Mojave. I was wondering if anyone would be able to help me troubleshoot. I can post install logs, if that would help.
The font-size is a little bit too small. Not sure what it's dependent on, but I'd like to be able to configure it if possible. Maybe even fully customizable CSS for the #host
element?
Happens on https://drewdevault.com/donate/
This isn't currently possible because the content script assumes it's in the content - while the preference page is in the background script.
ps aux | rg firenvim
)This should be fairly easy to do:
This is probably going to make starting a new firenvim frame rather slow - we might want to instantiate one neovim process in the background in order to speed things up.
It would be nice to be able to use firenvim on Riot/Reddit.
There must be a way to fix this since Firefox doesn't.
Happens on master. Reproducible on github. Prevents writing buffer content to textarea.
Otherwise they fight over who gets the keyboard events.
The iframe should have disappeared but it didn't.
This happens because we use v:progpath
in order to get an absolute path to the neovim binary (this is needed because on OSX $PATH doesn't contain neovim).
Solving this requires detecting we're running in an appimage (checking if progpath points to somewhere in /tmp is probably enough) and finding the "real path" of that appimage.
Until this issue is fixed, a simple workaround is to just manually edit ~/.local/share/firenvim/firenvim
to make it point to the right path.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.