TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Vim online editor using WebAssembly, storing files using IndexedDB

316 点作者 hassanahmad超过 2 年前

23 条评论

cassepipe超过 2 年前
That&#x27;s great ! I have been looking for such a quick online vim experience for quite some time.<p>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 <i>in</i> neovim <i>in</i> my browser!)<p>It&#x27;s not even a vim-like experience, it&#x27;s literally your configured neovim in the browser !<p>Somehow I haven&#x27;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)<p>I even get autocompletion and all coding niceties in the little code playgrounds that are all the rage in nowadays tutorials<p><a href="https:&#x2F;&#x2F;github.com&#x2F;glacambre&#x2F;firenvim">https:&#x2F;&#x2F;github.com&#x2F;glacambre&#x2F;firenvim</a><p><a href="https:&#x2F;&#x2F;addons.mozilla.org&#x2F;en-US&#x2F;firefox&#x2F;addon&#x2F;firenvim&#x2F;" rel="nofollow">https:&#x2F;&#x2F;addons.mozilla.org&#x2F;en-US&#x2F;firefox&#x2F;addon&#x2F;firenvim&#x2F;</a>
评论 #34266900 未加载
评论 #34272974 未加载
评论 #34266023 未加载
capableweb超过 2 年前
That&#x27;s pretty cool!<p>Wrote a file to test.js with the following:<p><pre><code> console.log(navigator) document.querySelector(&quot;#pastebtn&quot;).innerText = &quot;PASTE&quot; </code></pre> And then run it with `:!test.js` and it executes it in the current browser context. Editor editing itself :)
评论 #34264617 未加载
评论 #34264140 未加载
pyrolistical超过 2 年前
Is safari still evicting indexeddb after 7 days? <a href="https:&#x2F;&#x2F;web.dev&#x2F;storage-for-the-web&#x2F;" rel="nofollow">https:&#x2F;&#x2F;web.dev&#x2F;storage-for-the-web&#x2F;</a><p>If so, Indexeddb should only be used to store “unsaved” files for safari.<p>Chrome and Firefox support <a href="https:&#x2F;&#x2F;caniuse.com&#x2F;mdn-api_permissions_persistent-storage_permission" rel="nofollow">https:&#x2F;&#x2F;caniuse.com&#x2F;mdn-api_permissions_persistent-storage_p...</a><p>But that implies if the user denies persistent storage, then indexedb should be again only used to store “unsaved” files
评论 #34285937 未加载
dontchooseanick超过 2 年前
Does kinda work<p>Perfect :<p>* Using :left and V , set ts=4 sts=4 sw=4<p>* Recording macros with q<p>* Main vim combos - it&#x27;s definitely vim<p>Fails :<p>* Typing { or } on a MacBook Air under Firefox - don&#x27;t know which of this settings cause the bug. Reproducibly, { does not work<p>* Replaying a macro containing { or any error<p>Kudos for the compilation (emscripten ?) and Brace for impact (the incoming bugs) :)
DustinBrett超过 2 年前
Looks cool, if it wasn&#x27;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.<p><a href="https:&#x2F;&#x2F;dustinbrett.com&#x2F;?app=Vim" rel="nofollow">https:&#x2F;&#x2F;dustinbrett.com&#x2F;?app=Vim</a>
feklest超过 2 年前
That is very cool, nice to see vintage editors hosted in a modern environment.<p>What I&#x27;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&#x27;t have a hex editor to hand, though you had to use Alt+(numpad) for most characters.
colordrops超过 2 年前
Are there some opinionated keybindings configured with this? I find that typing ctrl puts it into visual mode immediately. ctrl-v doesn&#x27;t work.<p>Also, I use ctrl-[ as escape, and it seems to catch it sometimes, otherwise inserting an actual &quot;ctrl-[&quot; character.<p>On Firefox btw.
deafpolygon超过 2 年前
Interesting about the security note and WASM re: the Neovim version. (see here: <a href="https:&#x2F;&#x2F;github.com&#x2F;glacambre&#x2F;firenvim">https:&#x2F;&#x2F;github.com&#x2F;glacambre&#x2F;firenvim</a>. More specifically here: <a href="https:&#x2F;&#x2F;github.com&#x2F;glacambre&#x2F;firenvim&#x2F;blob&#x2F;master&#x2F;SECURITY.md">https:&#x2F;&#x2F;github.com&#x2F;glacambre&#x2F;firenvim&#x2F;blob&#x2F;master&#x2F;SECURITY.m...</a>)<p>Does this open up an attack surface on users using vim&#x2F;neovim? This page seems to indicate that neovim (and this) do not run in a sandbox <i>already</i>.<p>Can anyone with more knowledge on this expand on that?
naillo超过 2 年前
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.
评论 #34266109 未加载
rav超过 2 年前
It makes me sad every time I try a Vim with a non-zero &#x27;scrolloff&#x27; setting. Since I started using Vim I have learned to use H and L efficiently when navigating, but non-zero &#x27;scrolloff&#x27; changes where H and L move the cursor to - and somehow non-zero &#x27;scrolloff&#x27; is now the default in Ubuntu if a user hasn&#x27;t created a vimrc file (even an empty file will do).<p>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&#x27;t work).
miket超过 2 年前
Much easier to exit than standard vim!
jay-anderson超过 2 年前
Pretty cool. There&#x27;s a lot of vim nuances to implement. Everyone is going to have their subset that doesn&#x27;t work quite right. In my short experimenting with it &lt;shift&gt; in command mode moves the caret up a line which is incorrect.
csdvrx超过 2 年前
If you are into this, note there&#x27;s also a JavaScript online Vim: <a href="https:&#x2F;&#x2F;wang-lu.com&#x2F;vim.js&#x2F;emterpreter&#x2F;vim.html" rel="nofollow">https:&#x2F;&#x2F;wang-lu.com&#x2F;vim.js&#x2F;emterpreter&#x2F;vim.html</a>
评论 #34265590 未加载
varunkmohan超过 2 年前
Wow, very smooth to use! Would be extra neat if this could support plugins as well.<p>We&#x27;re building out a free AI code completion tool, Codeium that will support Neovim as an IDE and would love to hook into this as well.
john_the_writer超过 2 年前
IndexedDB can be purged at any time by the browsers. They all have different rates, but I believe Safari will dump a db if it needs space and that DB hasn&#x27;t been touched for a week.
andirk超过 2 年前
Am I the only person on earth who uses plain vi?
评论 #34270445 未加载
评论 #34268998 未加载
评论 #34268903 未加载
alberth超过 2 年前
Why can Vim be compiled to WASM but not VSCode?
评论 #34264992 未加载
评论 #34282957 未加载
评论 #34266742 未加载
zlatan99超过 2 年前
The only Vim which can be quit easily.
gloosx超过 2 年前
Real vim weirdos turn it way around and put the browser into vim!
评论 #34274515 未加载
mcbuilder超过 2 年前
Great, but how long before we get a proper emacs version in WASM.
donaldbough超过 2 年前
Wow this is amazing! Why not charge money for it?
hpen超过 2 年前
Yay, it&#x27;s like vim only shittier!
frankzander超过 2 年前
What&#x27;s the use case for that?
评论 #34264362 未加载
评论 #34266645 未加载