Vim.wasm

  • I thought I was getting stuck in insert mode, and I got fairly frustrated before realizing my Vim keybindings browser extension was grabbing ESC and keeping it from this weird browser-Vim.

    We brought this abomination on ourselves.

  • Does anyone know if lynx plans on supporting wasm? I'd like to try this editor in a terminal.

  • The GitHub readme has a bunch of great content on it. https://github.com/rhysd/vim.wasm

  • This is absolutely incredible. I never thought this would be possible-- wasm opens a new phase of software development and deployment.

  •   :colorscheme
      unknown                       "that's weird
      :set file^I^I                 "I guess tab autocomplete doesn't work
      :set filetype=cpp
      i#include <iostream><Esc>     "I guess syntax highlighting doesn't work either
      :set tabstop=4 softtabstop=4
      i^I^I                         "at least that worked!

  • Where’s the escape key on my iPhone?

  • This is pretty dope, but I'm terrified about the fact that Firefox lets it take over Ctrl+L, Ctrl+1, or any other way (that I can find, at least) of breaking out of Vim with a keyboard aside from closing the tab with Ctrl+W - which is even more terrifying since I use that in Vim a ton, too :O

    ...but this is pretty cool :D

  • I wonder if this will be useful for electron based editors like vscode's vim plugin. I know the plugin is "good" but I always find something that works in vim and doesn't in the plugin and end up going back to my terminal.

  • The timing on this is really interesting for me. I've been working on a full web vim product (plugins, multi-session, cloud storage, backup, etc.) and I'm pretty close to a beta product (POC is fully functional, just polishing a few rough edges). If anyone is interested in hearing more, email me at webvimbeta@gmail.com

  • Running on Firefox and `Shift` generates a `^P` character.

  • Not sure if it's a bug or user error (not sure if writing is supposed to be supported yet), but after doing the following, the page becomes nonresponsive:

    :o test.tx :wq I get an fsync failed error and I'm told to press enter or type a command to continue.

    I can't do either.

  • I am impressed that

        :imap jk <Esc>
        :imap kj <Esc>
    
    works great. However it seems like outer and inner text objects aren't working at all. E.g. daw, ci)

  • Perhaps it’s because I block web fonts but once I start typing little turds remain where the intro text was.

  • :! cat /etc/passwd

    [blocked]

    sorry can't help myself trying this. but good job!

  • I see many comments on broken key combinations. Obviously, we need to somehow overcome a UI/UX limitations of the applications that run inside a browser if we're moving into browsers with the consumer apps. I wrote a dedicated article on this: https://database.blog/trello-hot-keys/

  • sorry for being dense, but I can't seem to save files or do anything seemingly practical. Is there any practical use cases for this library, or is this purely along the lines of "Hey checkout this cool hack!"

  • My test for "non-native" Vim is always 'q:' which should open a command line window of previous commands at the bottom of your screen - unfortunately that does not work.

    Furthermore I can't use 'Ctrl-v' that let's you select a column of text (EDIT: correction, this does work).

    'q:' should not be captured by the browser? Nevertheless impressive work.

  • <ctrl-w>w closed my browser window. Should have seen this one coming.

  • I was hoping :w with filename would download the contents :D

  • Unfortunately it's not working on my android phone with hacker keyboard (full keyboard with esc). There are also horizontal lines across the screen that should not be there.

  • Good work. Almost there.

    Things that doesn't work starts from where you might need to change word "ciw", visually select word "viw".

  • undefined

  • My take on vim web version: http://exitvim2.win

  • Now I really can't quit the internet

  • Trying to save errors out with "E667: Fsync failed" and then it gets stuck.

  • How do Emscripten cross-compiled things and WASM compiled things handle the display? Is it a framebuffer they blindly draw to, do they need shim layers added to interpret normal output to window-scaled in-browser output?

  • Also see previous discussion about the code on the GitHub repo https://news.ycombinator.com/item?id=17487936

  • Any plug-in support? Could I upload my vimrc to a server, then download it, apply it, and run :PlugInstall to get my vim setup in any web browser?

  • very cool, some of the set commands don't seem to work for me... set softtabstop for example didn't appear to work. also i might have a local setting but tab complete with set wasn't working... again probably local settings. and :w wtf didn't work :D seems to crash it. This is super cool

    [update] ah i see from the readme write support is in the todo list.

  • Why does it completely freeze on :w foo ? It asks for ENTER or any key but that doesn't work at all at that point.

  • pretty fun as an experiment. It would be so cool if someday github/gitlab had this as an option for editing files

  • On mobile I see a blank gray page. Perhaps this only works on desktop browsers. I still have no idea what it is.

  • Think I crashed it. Did a :w foobar and got an error and the page was stuck, with the computer fan ramped up.

  • i had to turn off adblock plus and ublock origin to get this to work for some reason

  • Will wasm ever use html/css properly? Or will it just be more like flash?

  • I can't save.

    :w test

    "test" E667: Fsync failed Warning: original file may be lost or damaged.

  • :q! is not working! Help, I can't exit.

    But seriously, this is great work.

  • Try inputting some diacritics, it breaks spectacularly.

    Just tried Ä… Ä™ Å‚ etc ;)

  • Next step will be to bundle this in an electron app.

  • Does this get us any closer to being able to edit text fields using vi keybindings? I've tried some of the plugins (long ago) and was underwhelmed with the experience.

  • Is there a good iOS port of Vim available?

  • What is the use case for this?

  • Vi, the original roguelike.

  • This is so cool! Well done!

  • How can i save a file ?

  • Lol. Why no :Explore?

  • Fucking touchbar.

  • Don't do :wq

  • Sounds like a great fun little project. Shame it doesn’t work.

  • diw or ciw doesn't seem to work :(

  • Looks good!

    How can I close it?

  • Why was wasm used for this? It's not a javascript replacement as stated by webassembly.org.