VIM's leader key for your terminal!

1 min read Original article ↗

Installation

Mac OSX

leader is available via brew:

$ brew install dhamidi/all/leader

Alternatively you can download the latest binary and place it in a directory on your $PATH

Linux (64bit)

Download the latest binary and place it in a directory on your $PATH

Configuration

  • Run eval "$(leader init)" to activate leader.
  • Paste the example configuration into ~/.leaderrc
  • Press \ in your terminal to trigger leader.
  • If you like it, add eval "$(leader init)" to your shell's initialization file (e.g ~/.bashrc, ~/.zshrc).
    Fish users should add leader init | source to ~/.config/fish/config.fish

Place the following in ~/.leaderrc to get started.

{
  "keys": {
    "h": {
      "name": "help",
      "keys": {
        "l": "leader help"
      }
    },
    "g": {
      "name": "git",
      "loopingKeys": [
        "s"
      ],
      "keys": {
        "p": "git push",
        "P": "git pull",
        "s": "git status"
      }
    }
  }
}

More information

See Guides for how to integrate leader with various other programs

Go to https://github.com/dhamidi/leader for more information.