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

Those OS X keybindings come from Emacs! I bet some vimmers would refuse to use them just on principle. :)



I'm a vimmer and always use readline bindings in "insert" mode context. I find using vim bindings on the commandline to be infuriating.

On macOS, you need to add the following to $HOME/Library/KeyBindings/DefaultKeyBinding.dict to get ctrl-w and ctrl-u to work everywhere in macOS.

{ "^w" = "deleteWordBackward:"; "^u" = "deleteToBeginningOfLine:"; }


> I find using vim bindings on the commandline to be infuriating.

Some folks find vim bindings to be just as bad to edit text grin

I don't actually agree: I think that vim's text-editing language is actually nicer than emacs's is. But I use emacs — with its bindings, not vim's — because after almost thirty years it's what I'm used to.


Haha, I've never been interested in the whole vim vs. emacs thing. I just started with vim and a little too invested in it now. It definitely drives me nuts that it loads entire files into memory and that is the one thing that has made me tempted to switch. It rarely affects me but every once in a while when I accidentally open a massive file in vim and have to wait, I dream of emacs. I would use evil mode, OF COURSE :)


Oh, if you like those bindings in insert mode, you are probably already aware of Tim Pope's vim-rsi [1] plugin. If not, check it out, it might have some interesting bindings you aren't using yet.

[1] https://github.com/tpope/vim-rsi


I'm absolutely aware of it and was gonna mention it but figured I'd said enough :)

When I said "insert" I meant like, "insert mode" everywhere else but vim :)

But yes, RSI is a great plugin (as are most of tpope's plugins)


Also, you mentioning it made me realize I never starred the repo, so thanks, haha!


Thanks so much for this. I usually use Karabiner for the same thing.

Do you know anyway to get the same behaviour on Linux and Gnome at all?


I’m a heavy vim user and yet I add bindings to vim for Control-A and Control-E.


now that’s funny




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: