Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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.



Both 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?


There 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.


On macOS a majority of UI text fields support readline bindings (^A, ^E, etc) which is really nice


> 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.


I 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).


I 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


I 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.


> 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.


Here, 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


I'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


Very interesting! I will give it a go.


Oh my god thank you so much for posting this!


> 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

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


I 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


For 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.


I use macos and linux and the keybindings are compatible with emacs.





Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: