Systemwide vim mode for OSX

No and yes!
macOS dosen't provide such kind of facility.

But,

you can use Karabiner's Vim's ubiquitous mode, it enables you to do vim mode editing in every textbox, no matter it's in a browser address bar or a stackexchange.com editor like I am typing now. and you can even use hjkl to replace UpDownLeftRight arrow when you are not in a textbox.

To install

Karabiner is a free software, you can simply install it by homebrew:

brew cask install karabiner

then, enable the Ubiquitous Vim Binding, you can choose the normal mode trigger as you like, and as for me I choose Ctrl-[ toggles Normal Mode. In addition, you can also setup system-wide Emacs Ctrl-PNBF.

If you have more questions, please leave a comment. Happy Vimming!


The accepted answer here is a bit out of date (as of macOS 10.12 Sierra). As you can see from the notes in the Karabiner repository, the newer versions of macOS require Karabiner-elements instead and does not provide a "Ubiquitous Vim Binding" out of the box.

However, it does support "Complex Modifications" which can be leveraged to provide Vim style keybindings using combination keystrokes. This article provides detailed instructions on how to setup Karabiner-elements with complex modifications to achieve Vim bindings in many different contexts. Of course, there are many additional resources available on the web as well.

Happy Vim-ing!

Tags:

Macos

Vim