Live data from Hacker News

Vim.wasm

rhysd.github.io

71–80 of 291 posts

Re: Vim.wasm

#71

Earlier quoted context omitted.

Caps lock is right on the home row.

Oh, right. I have control remapped on caps lock, so it's caps lock + [.

This is where https://github.com/alols/xcape is amazing.

I'm not sure, but I think Karabiner can be configured to act the same way.

Re: Vim.wasm

#72

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

At this point, the easier route to getting a text-based browser to support something like this would be creating a new one based on WebKit/Blink.

It would probably need to get the engine to draw to a fake screen buffer and run an OCR algorithm over that. And even if the OCR and layout worked well, there would be a lot other work necessary to get reasonable text based interactivity, though that's probably partially solved by projects like Vimium. Some interactions like dragging would likely never be supported.

Not easy at all, but somehow more reasonable than updating lynx to support all of today's new technologies. I wonder if anyone's already tried something like it.

Re: Vim.wasm

#73
post #42

Earlier quoted context omitted.

Or just use regular Vim and not think that everything needs to run inside of a web browser, especially if you value user privacy and computer resources.

Would be nice to be able to use vim (or any other editor of your choice) in web text boxes.

This is the logic that makes everyone move their workflow into emacs. A lot of what we do is text editing, so having a good text editor everywhere makes sense. Some programs like mutt can also drop in to your editor of choice when composing an email. Imagine if we all had vim for typing up these HN comments. I'd like something like this to be more feasible. Maybe there could be a standard for forums that gives you vim editing in the same way many give you markdown. It could also be cool to support org-mode syntax.

Re: Vim.wasm

#74

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

I think this is why a lot of people still handle issues via email. It integrates well with the classic text editors.

Re: Vim.wasm

#75
post #14

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!"

It is a text editor, not a file server.

It is similar to CodeMirror, Ace, and Monaco.

CodeMirror: https://codemirror.net/

Ace: https://ace.c9.io/

Monaco: https://microsoft.github.io/monaco-editor/index.html

Re: Vim.wasm

#76
post #14

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!"

I haven't tried it yet, but that should still make it as useful as pasting text into vim to make changes quickly. Things like highlighting a sentence and making it all lowercase or uppercase is very simple. (v/V/C-v for one of the visual mode selection types, then pressing u after the select makes it all lowercase, and ~ can swap case if you had capslock on and typed "sOMETHING LIKE THIS"). There's also :sort for quick alphabetizing and the classic :s/word1/word2 text replacement.

Re: Vim.wasm

#77

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

At this point, the easier route to getting a text-based browser to support something like this would be creating a new one based on WebKit/Blink. It would probably need to get the engine to draw to a fake screen buffer and run an OCR algorithm over that. And even if the OCR and layout worked well, there would be a lot other work necessary to get reasonable text based interactivity, though that's probably partially so…

I just found Browsh[1] which seems to be basically this but with Gecko. It seems they don't need to do OCR which makes sense thinking about it more. Cool stuff. Haven't gotten to try it yet.

[1] https://www.brow.sh/

Re: Vim.wasm

#78

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

At this point, the easier route to getting a text-based browser to support something like this would be creating a new one based on WebKit/Blink. It would probably need to get the engine to draw to a fake screen buffer and run an OCR algorithm over that. And even if the OCR and layout worked well, there would be a lot other work necessary to get reasonable text based interactivity, though that's probably partially so…

I did! See brow.sh

It uses Firefox as a backend so can in fact run Wasm. However it doesn't use OCR, it uses the DOM to get precise coordinates for text nodes, this recreating a pure text representation of the page, using nothing but spaces and carriage returns for "formatting".

Re: Vim.wasm

#79
post #66
post #56

Earlier quoted context omitted.

Who is RMS?

Someone from the era of short usernames on unix boxes, along with "esr" and "rob". To more directly answer, it's Richard Stallman. Known for the free software movement and emacs among other things.

Let's not forget "ken" and "dmr".

Re: Vim.wasm

#80

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

is this a common key binding? I've seen it before and it makes a lot of sense but I'm wondering if I will run into issues. I don't want to disrupt my flow and muscle memory and later regret it.
Post reply on HN