Live data from Hacker News

Vim.wasm

rhysd.github.io

251–260 of 291 posts

Re: Vim.wasm

#251

Earlier quoted context omitted.

> The actual issue is that Windows and Linux don't properly use a ‘super’ key―while the ‘Win’ key is sitting there uselessly. Some people do use the super key. I have it bound to a huge number of actions (WASD to switch workspaces, Alt+WASD to move window to adjacent workspaces, C to close window, X to pause/unpause media, Z to show workspace overview, tab to switch between workspaces like alt-tab does for windows, P…

> There are no worries about conflicting keybindings when you use super Aren't there conflicts on most desktops? - Windows, off the top of my head, has Win+R, Win+C, Win+V, Win+x, Win+D, Win+L, Win+E, Win+Directions - Linux (well Ubuntu/Gnome3) has Win+L, Win+R, Win+Mouse, Win+Directions - macOS (considering Ctrl to be super here) has Ctrl+Arrows, along with many common Ctrl+Letters from the unix world

On Windows you can't do anything with super (AFAIK); you are stuck with what Microsoft provides you and that's it.

Most Linux desktop environments (Gnome, KDE, etc.) provide default mappings that involve super, but they can all be changed freely by the user. So you can get rid of Win+L or change what it does (at least on KDE, or if you are using just a WM like i3).

macOS is just weird, with the cmd/ctrl split.

Re: Vim.wasm

#252

Earlier quoted context omitted.

Tap what?

They mean remapping capslock to: * Ctrl if held and used with other keys. * Esc if pressed and released on its own. There's no reason to press and release Ctrl on its own (minus games), and you never need to chord Esc with anything else, so they can both live on the same key.

Thank you for explaining. Didn't know you could do that. Will look it up.

Re: Vim.wasm

#253
post #135

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

The actual issue is that Windows and Linux don't properly use a ‘super’ key―while the ‘Win’ key is sitting there uselessly. Ironically, MS' own ‘ergonomic’ (cough) keyboards have gigantic Win keys, right under the thumbs which are the strongest digits. These keys are great to use on Mac, it's an eye-opener as to how the historical keyboard mutations ended up in just the wrong way for two platforms (and for Emacs). I…

>The actual issue is that Windows and Linux don't properly use a ‘super’ key―while the ‘Win’ key is sitting there uselessly.

>These keys are great to use on Mac

The use of the super key on Mac is horrible. It should sit there uselessly, until I tell it to do otherwise. On Mac, here are no safe hotkeys to bind anything to. On Linux, my WM configuration has a ton of actions bound to the super key, and I never have to worry that it will conflict with another application.

Re: Vim.wasm

#254
post #238
post #143

Earlier quoted context omitted.

I’d love to hear your take on the nonsensical shape and staggered key layout. Do you have suggestions for keyboards that do away with this? I have myself been looking at https://ergodox-ez.com/ but I’d love to hear of alternatives, especially if you have first hand experience on them.

> I’d love to hear your take Well, I guess you already noticed that regular keyboards are made for people with arms growing from the front of their chests. Some, like MS, now generously provide some angle between the halves so people with shoulder-mounted arms can curve them in more comfortably without keeping the wrists crooked. Now, let's take the flat profile, specifically crosswise the keyboard. It seems greatly…

> okay for the left hand where the key columns are staggered to the right

Got this one backwards on the phone. It's to the left, under both hands.

Re: Vim.wasm

#255
post #131

Earlier quoted context omitted.

Ctr+[ Vim-ing on devices with not physical Esc key makes you get used to this (default configured, no extra keymapping required) Esc alternative :P

I like that in spite of this requiring two fingers, each finger on it's own has to move less distance than one would in order to reach Esc.

Remapping Caps Lock to Control makes the motion even easier.

Re: Vim.wasm

#256

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

why do you block webfonts?

Font parsers are generally poorly written so avoiding untrusted fonts is more secure. Web fonts also slow down the web and are a privacy issue. All that for no gain because they are completely useless. I already have fonts on my computer and they are fine. That’s why I block web fonts.

Re: Vim.wasm

#257
post #241
post #174

Earlier quoted context omitted.

You should (look back). Mapping it to Ctrl is a much more sensible choice. Can’t imagine using backspace instead of Ctrl-h, or Ctrl-A/E to go to the beginning/end of line, or Ctrl-W to delete back one word etc. Of course, Ctrl-[ is also right under your finger tips with Caps Lock mapped to Ctrl.

> Ctrl-W to delete back one word That's one of the most commonly used shortcuts I use. Not just in vim, but also in the shell. When I screw up on my typing, the mistake is often 3 or more letters back. Instead of hitting backspace a lot or moving the cursor and retyping mid-word, I prefer to say "screw it", hit Ctrl-w, and retype the word. It's faster. My brain is just not optimized to type pieces of words. I can't u…

Speaking of Emacs key bindings: Alt+D, for when you've made a typo in the future.

Re: Vim.wasm

#258
post #241

Earlier quoted context omitted.

> Ctrl-W to delete back one word That's one of the most commonly used shortcuts I use. Not just in vim, but also in the shell. When I screw up on my typing, the mistake is often 3 or more letters back. Instead of hitting backspace a lot or moving the cursor and retyping mid-word, I prefer to say "screw it", hit Ctrl-w, and retype the word. It's faster. My brain is just not optimized to type pieces of words. I can't u…

Speaking of Emacs key bindings: Alt+D, for when you've made a typo in the future.

The equivalent of Ctrl-w in emacs is Ctrl-Backspace. It's more common to want to delete the word you just typed instead of the word to the right of the cursor.

Re: Vim.wasm

#259

Earlier quoted context omitted.

It would need to have its HTTP code gutted and replaced with something that uses JS's XMLHttpRequest or the request API, but I think that's all you'd need to change.

Or write a C function called http_request, refactor all of Lynx to use just this one function, and then do something like #if PLATFORM === 'WASM' then fetch() else the actual sockets and stuff end

It would not be that simple, but yes.

Re: Vim.wasm

#260
post #234

Earlier quoted context omitted.

:imap jk Will change your life man.

I have to shy away from using these remappings because I often work in Vim-emulation mode. It's easier to map CapsLock to ESC system-wide. It works across the several Vim-emulating editors I use.

I use quite a few as well and they all support it. Actually I don’t use vim much, mostly emacs and vscode but I know it works in IntelliJ, Eclipse and Visual Studio as well. What is annoying though is they all have totally different names and methods of configuration.
Post reply on HN