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.
I really dislike shortcuts with `[` and similar keys. Design software also tends do use them. On a Portuguese keyboard layout[1], I need to press ⌥8 to get `[`. So shortcuts like ⌃[ become ⌃⌥8, which in vim produces `8`.
RMS is the Terence McKenna of open source: a fundational figure whose ideas where way ahead of the curve, but also a too extreme to attract the mainstream.
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.
Consciously I know that jk is a better shortcut, but I've been using jj for so long that it's ingrained in the muscle memory, when I started using emacs the first thing that I did with evil was replicate all the shortcuts that I am used to in vim, the first one was jj.
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.
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".
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.
Hey, dial back the blasphemy there. HTML is not PDF, it's usually made from text in the first place.
I'd guess you could force all text to use a monospace font, with fixed measures and line-height, and limit the width of the page. Then mostly dump the resulting text arrangement into the terminal.
Now, layouts from the various elements and CSS are probably a lot trickier, but snapping all margins and padding to multiples of a symbol's size should go a long way.
It seems that this could even be embedded at different levels in the browser: the layout engine or just the user's JS. (If JS can obtain the exact layout of text lines and elements―likely not, though, especially in forms. Maybe via devtools.)
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.
Wasm is company and technology independent and went through the proper process for becoming a standard rather than being forced in by some corp hoping to take over the internet.
It also doesn't have any of the security issues because its limited to things JavaScript can do.
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.
Don't immediately hand wave away the value of these sorts of things. I don't think anyone would use this as their primary editor, but I'd love something like this in our merge request / code review process, as that's currently entirely browser based already.
I'd love to have my VIM with my config just available as a web service to use it on every device! That's what I already love about NextCloud and the likes - just one install and every device can access it. If you know how you can also make it secure enough for every day stuff - I think to be really secure going offline is not enough anymore.
The latency in Safari on a MacBook is better than VSCode. Which makes total sense, but is impressive and demonstrates how much better electron could be.
Actually I wonder how hard it would be to run node in a browser, given that it's already JavaScript. You obviously have to have to implement some amount of API surface at a minimum and it's possible that browsers are geared to be servers and clients, but it certainly sounds plausible at a first pass.
: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!
I missed the lowercase i on first read. I'll comment anyway in case this helps others. Hacker's Keyboard from f-droid has an escape key. If using the compact layout you can get to it by holding the tab key. I think on the full layout it has a more traditional placement.
I'm not sure what alternative keyboards iOS has.
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
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 could also say some things about the nonsensical shape of keyboards and the moronic replication of the typewriters' staggered key layout...
> 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 and ; to invert colors, F and T to control window tiling, / to bring up the dropdown terminal, and the 4x4 grid from '6' to '.' to go to one of my 16 workspaces).
It would be a shame if applications started using 'super' in their keybindings - having a key that is effectively globally reserved for user-configurable actions is very useful. There are no worries about conflicting keybindings when you use super; the same cannot be said of keybindings that use ctrl or even ctrl+alt+letter - for example, many IDEs use ctrl+alt+letter to do stuff, which would mess with global user-configured shortcuts. Perhaps the position could be optimized though.
>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.
This is a problem. The browser wants to be a computing platform, so it's injecting itself between the actual OS and the software you'd like to run. But it's still an userland program, so it uses regular keyboard shortcuts. Shortcuts the software you'd like to run needs as well.
I had a similar problems with Emacs in the browser (I stumbled upon it a long time ago). The keys I needed the most were also the keys intercepted by the browser.
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.
I recently found Oni, which aims to be a web-tech UI for neovim. (The new version should even support the full VSCode extension API / ecosystem) https://github.com/onivim/oni2
We brought this abomination on ourselves.
[1]: https://en.wikipedia.org/wiki/File:KB_Portuguese.svg
Vim would be a particularly good editor since most operations are simple and elegant with only an occasional exit of insert mode.
but emacs... probably not as fun.
RMS means well but GNU is a bloated mess.
Will change your life man.
inoremap uu <esc>
Deleted Comment
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.
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".
[1] https://www.brow.sh/
Hey, dial back the blasphemy there. HTML is not PDF, it's usually made from text in the first place.
I'd guess you could force all text to use a monospace font, with fixed measures and line-height, and limit the width of the page. Then mostly dump the resulting text arrangement into the terminal.
Now, layouts from the various elements and CSS are probably a lot trickier, but snapping all margins and padding to multiples of a symbol's size should go a long way.
It seems that this could even be embedded at different levels in the browser: the layout engine or just the user's JS. (If JS can obtain the exact layout of text lines and elements―likely not, though, especially in forms. Maybe via devtools.)
As if Flash (http://adobe-flash.github.io/crossbridge/), PNaCL (https://developer.chrome.com/native-client/reference/pnacl-b...) never existed.
It also doesn't have any of the security issues because its limited to things JavaScript can do.
I'd love to have my VIM with my config just available as a web service to use it on every device! That's what I already love about NextCloud and the likes - just one install and every device can access it. If you know how you can also make it secure enough for every day stuff - I think to be really secure going offline is not enough anymore.
here's a VNC server in your browser:
https://github.com/novnc/noVNC
or an x window system tutorial, with an in-browser x server
https://magcius.github.io/xplain/article/index.html
personally I think this will lead to more hiding of what internet sites are doing, and prevent blocking of undesirable behavior.
This will enable doing full web development in browser only
Ctrl and [
That should send the same as Esc (ASCII 27).
I seem to remember this working on a new iPad Pro keyboard.
Very useful for SSH and termux.
...but this is pretty cool :D
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 could also say some things about the nonsensical shape of keyboards and the moronic replication of the typewriters' staggered key layout...
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 and ; to invert colors, F and T to control window tiling, / to bring up the dropdown terminal, and the 4x4 grid from '6' to '.' to go to one of my 16 workspaces).
It would be a shame if applications started using 'super' in their keybindings - having a key that is effectively globally reserved for user-configurable actions is very useful. There are no worries about conflicting keybindings when you use super; the same cannot be said of keybindings that use ctrl or even ctrl+alt+letter - for example, many IDEs use ctrl+alt+letter to do stuff, which would mess with global user-configured shortcuts. Perhaps the position could be optimized though.
>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.
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.
For me (Gnome) the super-key shows an overview of my windows and let's me enter a command which is fairly convenient.
I had a similar problems with Emacs in the browser (I stumbled upon it a long time ago). The keys I needed the most were also the keys intercepted by the browser.