Hacker News new | past | comments | ask | show | jobs | submit login

Really want a way to have vi-mode input in all text inputs throughout the OS, hopefully that is a future possibility



I made this! It's not perfect but it's most of the way there in terms of Vim motions and operators, and works in any text field. It uses the Accessibility API when available, and then falls back to raw keypresses (like alt + right arrow to simulate `w`, etc).

In the fallback mode, not all motions are available, because we can't read cursor position or text field value without accessibility support.

https://github.com/dbalatero/VimMode.spoon


Wow so cool! Hope to give this a go sometime soon


You may know this already but emacs keys are supported in all text input areas on Mac. Carl-a (start of text), Carl-e (end of text) Carl-k (cut Text to end of line) Carl-y (yank/paste cut text) and many more.


And the Mac kill ring is separate from the clipboard so that means you can have two things copied at once and insert them with separate keybindings. Unfortunately the kill ring only contains a single element, so has no history.

some other useful ones are C-h/C-d (backwords/forwards delete), C-o (insert line), and the main Emacs movement keys C-n, C-p, C-b, C-f. Remapping Capslock to be a second Control makes using these regularly much more natural. Karabiner is a good app for easily remapping keys on macOS.



This is the most promising project I've come across: https://github.com/glacambre/firenvim, although it only applies to the browser. The last time I tried it out it had some performance issues though.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: