
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. Full standard OS hot keys: CMD+C/V to copy and paste, CMD+T for new tab, CMD+W to close tab, CMD+.Full mouse support: switch tabs by clicking, click on menu items, select text, etc.

#ITERM VIM MODE FOR FREE#
You’ll be able to use Vim in iTerm2, Kitty, or Alacritty-or your terminal of choice-while still keeping your standard hot keys for copy, paste, switching tabs (this guide will focus on binding command key, but you can substitute with control key.) By running your Vim in a terminal, you get features like collaborative editing for free (through Teleconsole). 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.
