6 ms·
Really want a way to have vi-mode input in all text inputs throughout the OS, hopefully that is a future possibility
by ivan888 6y ago
Really want a way to have vi-mode input in all text inputs throughout the OS, hopefully that is a future possibility
- wavesplash 6y agoYou 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.
- narwally 6y agoAnd 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.
- mkskm 6y agoIt's possible to customize these as well, see e.g. https://www.hcs.harvard.edu/%7Ejrus/Site/cocoa-text.html https://www.hcs.harvard.edu/%7Ejrus/Site/cocoa-text.html, http://www.deepsky.com/~misaka/MacOSX/DefaultKeyBinding.dict http://www.deepsky.com/~misaka/MacOSX/DefaultKeyBinding.dict.
- mkskm 6y agoThis is the most promising project I've come across: https://github.com/glacambre/firenvim 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.
- dbalatero 6y agoI 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 https://github.com/dbalatero/VimMode.spoon
- IggleSniggle 6y agoWow so cool! Hope to give this a go sometime soon