iTerm2 tips and troubleshooting.


use Emacs keybindings (<M-b>/<M-f>) to navigate between words

PreferencesProfilesDefaultKeysKeyword Behavior

paste from clipboard with right click

PreferencesPointerMouse Button & Trackpad Gesture Actions

system-wide hotkey to switch to iTerm2



problems with rails console


$ brew uninstall readline
$ brew install readline

very slow paste of text

the problem appeared after upgrading macOS from El Capitan to High Sierra: when text is pasted into the terminal, there’s a significant delay (it’s proportional to the length of text but, say, for 80 characters it might be about 1 second) and then pasted text is automatically selected.



it has turned out that this behaviour is called bracketed paste mode and is meant to protect you from malevolent input: when bracketed paste mode is disabled, pasted text is immediately executed but after turning this mode on you have an opportunity to examine what you are going to paste and then press <CR> to continue with pasting.

bracketed paste mode is supported by both iTerm2 and Zsh so it can be turned off on any level (I’m turning it off because I’m not used to it and because it introduces significant and annoying delay when pasting):