6 ms·
> Because every editor worth its salt has an option to use vim keybindings. I'm not sure about this. For instance, I'm typing this message in a text box in my
by yodsanklai 6y ago
> Because every editor worth its salt has an option to use vim keybindings.
I'm not sure about this. For instance, I'm typing this message in a text box in my browser and I don't have access to vim keybindings. There are many cases where this happens (other example: google docs).
I do use vim whenever I can, but I'd say the most useful keybindings that one can learn are the ones from the OS.
- jbpnoy6fifty 6y agoI believe he meant code editors. Examples of which I have used Vim bindings - google chrome - sql server management studio - jupyter notebook - jupyter lab - visual studio code - ms visual studio - dbeaver - eclipse - sublime text 2 - hackerank, iirc
- justinator 6y agoBoth Chrome and FF have plugins to add vim key bindings - at least for navigating around the UI and the page. Which would support the argument to learn them. I guess your argument would be stronger if there were other $editor_of_choice key bindings for browser textboxes?
- oblio 6y agoThere are key bindings for other editors, they're called CUA :-) I can Ctrl-C/Ctrl-X/Ctrl-V to copy/cut/paste, Ctrl-arrows to move around one word at a time, Ctrl-shift-arrows to select words, Home and End to go to the start and end of the line, etc, Ctrl-Home/Ctrl-End to move to the start and end of the text input, etc.
- vmladenov 6y agoOn macOS a majority of UI text fields support readline bindings (^A, ^E, etc) which is really nice
- yodsanklai 6y agoI have a big issue with these bindings: there is no "right" ctrl on my MBP keyboard. If you touch type, I find ^A very cumbersome to type. I find it easier to use mac os default (cmd + arrow) which also opens variants such as option + arrow, shift + option + arrow. The only readline binding I do use is ^K (not as bad as ^A because k is on the right side of the keyboard, and there is no alternative anyway).
- jolmg 6y ago> support readline bindings (^A, ^E, etc.) Those are emacs bindings. Readline uses emacs bindings by default, but it can also use vi bindings. Unless you mean that it uses readline and so configuring it (i.e. ~/.inputrc) allows you to change the keybindings of macOS UI text fields. That'd be cool if it's the case.
- jjav 6y ago> I'm not sure about this. For instance, I'm typing this message in a text box in my browser and I don't have access to vim keybindings. There are many cases where this happens (other example: google docs). But both in this box and in google docs (and so many more places) you have access to the basic emacs C-* cursor movement and line manipulation bindings. One should really know both vi and emacs style basic movement bindings. Both work in many places, sometimes it's one or the other.
- youerbt 6y agoFor me, writing short prose like emails or internet comments doesn't really require vim keybindings. It mostly requires keyboard for what it was designed for - inserting text. Editing source code, on the other hand, benefits much more from vim, because inserting text is only part of it.
- randompwd 6y ago> I'm typing this message in a text box in my browser and I don't have access to vim https://github.com/GhostText/GhostText https://github.com/GhostText/GhostText GhostText extension for chrome/FF and listed $plugin for $editor means you can live edit a browser textarea in $editor with text sent in real time to browser. Unfortunately, Google Suite(docs etc.) does not play nice and does not work. Worth checking out. Also for a more embedded vim experience: https://github.com/glacambre/firenvim https://github.com/glacambre/firenvim
- m3at 6y agoHere, that will let you greatly expand where you can use vim: > Sometimes, you edit text outside of Vim. These are sad times. Enter vim-anywhere! https://github.com/cknadler/vim-anywhere https://github.com/cknadler/vim-anywhere
- Onawa 6y agoOh my god thank you so much for posting this!
- dbalatero 6y agoI'm working slowly on a Vim mode also that works in all text areas without kicking people into Vim: https://github.com/dbalatero/VimMode.spoon https://github.com/dbalatero/VimMode.spoon
- m3at 6y agoVery interesting! I will give it a go.
- LeonB 6y agoI read this comment 20 minutes ago and tweeted about it. I came back here to provide a link to a browser plugin for vi keybindings and found many other people had also commented with examples- only different ones. Here’s another: https://github.com/akahuku/wasavi https://github.com/akahuku/wasavi
- ybbond 6y agoI checked the comment before commenting, and turns out someone already mentioned wasavi. Very useful tool, too bad it does not support key mapping. I'd like to `nmap gj <ESC>` or the essential `nmap j gj`, because writing on small `<textbox/>` tends to wrap the content.
- deleted 6y ago[deleted]
- m463 6y agoI use macos and linux and the keybindings are compatible with emacs.
- apta 6y agoFor Chrome, there's wasavi: https://chrome.google.com/webstore/detail/wasavi/dgogifpkoilgiofhhhodbodcfgomelhe?hl=en-US https://chrome.google.com/webstore/detail/wasavi/dgogifpkoil... Firefox: https://www.reddit.com/r/firefox/comments/8y0q23/vim_mode_for_typing_and_not_navigating/ https://www.reddit.com/r/firefox/comments/8y0q23/vim_mode_fo...