1

One of the things I love about Vim is the leader key and the ability to create macros with it. The leader key concept is that it is a hotkey (I use ) that initiates a command based on the next keystrokes entered. It's very similar to a multi-key shortcut except the keys are not pressed together and the sequence of keys is what matters.

For example, I can set ,o,f to "Open File". Then I would press and release , then press and release 'o', then press and release 'f' and it would display an "open file" dialog. I find this much easier than remembering sometimes arbitrary shortcuts. For instance, I can use ,c,f to close a file and ,n,f for New file. Using sequences of keys opens up many more options to find something intuitive.

I bet a lot of people are wondering what about when you want to use the spacebar. I would set ^ or something as the leader key. Similar to how CMD brings up Spotlight.

Is there any utility for MacOS which allows me to specify such keystrokes to arbitrary commands? Keyboard Maestro looks very powerful but I haven't found a way to combine their triggers.

0

I found a few ways to do this with Keyboard Maestro. The best way I found so far is to assign all of my macros to use the hotkey I want to use for the leader key. When KM detects a conflict with the hotkey, it brings up a conflict palette which lets me narrow down the number of macros by typing them. Pretty neat

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.