Since you're using iterm2 on a mac, another option is you can just hit Cmd I , type something, and hit ESC .

The terminal solution is a bit quicker than this, but just wanted to let you know.