Get the top HN stories in your inbox every day.
cassepipe
antonmosich
Wow I just looked into that project and it really seems to work great. I really struggled a lot when typing longer responses in my Browser when trying to input my vim commands, so hopefully that will help.
lvncelot
Love Firenvim. Although I think there are different usecases for a vim-in-a-website and something like firenvim (or emacs-anywhere[1], which is what I'm using nowadays, after I've crossed over to the evil side) - as you can use vim-in-a-website from another machine without any setup, like vscode.dev for vscode, for instance. Self-hosting something like this could mean you could add your dotfiles, or maybe even have the website be able to pull a .vimrc from a publicly available dotfile repository, that would be pretty neat.
finnh
Ah thank you! I've been using wasavi on Chrome but real-vim may be enough to pull me back to Firefox.
glacambre
Firenvim is also available on Chrome (although I do recommend using Firefox for browser monoculture avoidance :) ) : https://chrome.google.com/webstore/detail/firenvim/egpjdkipk...
spurgu
Please give your vote here: https://connect.mozilla.org/t5/ideas/macos-allow-custom-keyb...
If that simple feature gets implemented there'll be at least one more FF user in yours truly. :)
capableweb
That's pretty cool!
Wrote a file to test.js with the following:
console.log(navigator)
document.querySelector("#pastebtn").innerText = "PASTE"
And then run it with `:!test.js` and it executes it in the current browser context. Editor editing itself :)alex_smart
That's very Emacs of Vim.
espadrine
I am impressed that it even supports pasting with "*p
pyrolistical
Is safari still evicting indexeddb after 7 days? https://web.dev/storage-for-the-web/
If so, Indexeddb should only be used to store “unsaved” files for safari.
Chrome and Firefox support https://caniuse.com/mdn-api_permissions_persistent-storage_p...
But that implies if the user denies persistent storage, then indexedb should be again only used to store “unsaved” files
davely
If I recall (need to Google it but am out and about at the moment), Safari won’t evict if you’ve installed it as their version of a progressive web app (share button -> “add to Home Screen”).
(I say “their version” because they still lack a number of things most PWAs use, like more robust service workers for background operations, notification support, etc)
A few months ago, I decided to play around with IndexedDb (for the first time) and PWAs and created a Stable Diffusion web interface that stores data in your browser. [1]
I have thousand of images stored as base64 strings in Safari on iOS since the beginning of October and it’s all still there!
Granted… this is a web app installed as an “app” on my iPhone’s Home Screen. So, IndexedDb inside Safari itself may still behave as you say.
It was recently written up in PC World [2] as part of an article about a distributed cluster of Stable Diffusion instances [3].
[1] https://tinybots.net/artbot
[2] https://www.pcworld.com/article/1431633/meet-stable-horde-th...
dontchooseanick
Does kinda work
Perfect :
* Using :left and V , set ts=4 sts=4 sw=4
* Recording macros with q
* Main vim combos - it's definitely vim
Fails :
* Typing { or } on a MacBook Air under Firefox - don't know which of this settings cause the bug. Reproducibly, { does not work
* Replaying a macro containing { or any error
Kudos for the compilation (emscripten ?) and Brace for impact (the incoming bugs) :)
DustinBrett
Looks cool, if it wasn't for the SharedArrayBuffer usage I would use this one over the current one I used for my desktop environment in the browser. I have Vim on there if anyone is interested in checking out a different version.
feklest
That is very cool, nice to see vintage editors hosted in a modern environment.
What I'd really like to see return is an online version of EDIT.COM, and maybe also its host binary QBASIC.EXE, not just for the nostalgia but because it was a pretty decent editor for the time, it even supported editing binary files if you didn't have a hex editor to hand, though you had to use Alt+(numpad) for most characters.
colordrops
Are there some opinionated keybindings configured with this? I find that typing ctrl puts it into visual mode immediately. ctrl-v doesn't work.
Also, I use ctrl-[ as escape, and it seems to catch it sometimes, otherwise inserting an actual "ctrl-[" character.
On Firefox btw.
deafpolygon
Interesting about the security note and WASM re: the Neovim version. (see here: https://github.com/glacambre/firenvim. More specifically here: https://github.com/glacambre/firenvim/blob/master/SECURITY.m...)
Does this open up an attack surface on users using vim/neovim? This page seems to indicate that neovim (and this) do not run in a sandbox already.
Can anyone with more knowledge on this expand on that?
naillo
Really cool! Excuse me for my naivete but is there a benefit to writing normal JS but then compiling it to wasm? Does that make it faster? Was kinda expecting C or some other language when viewing through the source on github.
brrrrrm
I believe the vim.wasm is pre-compiled and checked in as a "binary." The javascript written is a runtime wrapper
rav
It makes me sad every time I try a Vim with a non-zero 'scrolloff' setting. Since I started using Vim I have learned to use H and L efficiently when navigating, but non-zero 'scrolloff' changes where H and L move the cursor to - and somehow non-zero 'scrolloff' is now the default in Ubuntu if a user hasn't created a vimrc file (even an empty file will do).
Note that this seems to work much better in Chrome than in Firefox - when I press Ctrl in Firefox, it activates Visual Block mode (so e.g. Ctrl-D, Ctrl-U, Ctrl-O, Ctrl-I won't work).
miket
Much easier to exit than standard vim!
jay-anderson
Pretty cool. There's a lot of vim nuances to implement. Everyone is going to have their subset that doesn't work quite right. In my short experimenting with it <shift> in command mode moves the caret up a line which is incorrect.
Get the top HN stories in your inbox every day.
That's great ! I have been looking for such a quick online vim experience for quite some time.
A month ago I did find what I consider to be even better : make of any textarea on any page a neovim instance with the firenvim extension (thanks to which I am writing this comment in neovim in my browser!)
It's not even a vim-like experience, it's literally your configured neovim in the browser !
Somehow I haven't managed to get it to the front page (this is not my creation but I am a big fan since I have been looking for this for so long)
I even get autocompletion and all coding niceties in the little code playgrounds that are all the rage in nowadays tutorials
https://github.com/glacambre/firenvim
https://addons.mozilla.org/en-US/firefox/addon/firenvim/