
The next step is to take these key combos sent from your terminal and trigger the right actions in Vim. Load the profile from geovim/conf/iTerm2.json In the menu bar click on iTerm2 -> Preferences and then click on the Profiles tab. Grab the iTerm2 profile from geovim/conf/iTerm2.json. If you don’t want that, make sure to delete or re-map the Cmd+T and Cmd+Shift+ hot keys. Note: my default config overrides new tab/switch tab hot keys to work in the Vim window. Because the profile can be automatically activated, you won’t need to use the GeoVim launcher for Vim in iTerm2. You can edit this in Advanced -> Automatic Profile Switching after loading the profile. If you aren’t using TMUX with this setup, you may want to edit the profile in iTerm2 to not trigger when TMUX is run. ITerm2 has a nifty automatic profile switching feature that allows it to activate our custom key bindings only if Vim or Neovim is open, so it won’t interfere with your normal shell usage. This is sent by the terminal as sequential key presses.Ĭonfiguring iTerm2 to Send macOS Custom Hot Keys ^[ is the ESC (hex 0x1b) key (which is the same as pressing Ctrl+[), followed by a string of [1 6A. Certain key combos won’t work this way, such as Ctrl+C, but if I type Ctrl+V followed by Ctrl+Shift+(up arrow key) I’d get ^[[1 6A which is the escape sequence to use. You can also use Key Codes.app, type Ctrl+V in your terminal followed by the key combo, or run cat and then type your key combo. If you want to bind other custom keys, try using xxd -psd in your terminal to get the hex codes.

What a fully loaded, hot-key enabled, but still lightning fast Vim setup looks likeīy following the hot keys setup in this article, we can make terminal Vim/Neovim feel just like any native app, or working in an editor like VS Code.
