9

In iTerm2, ⌘W will close the current shell. In Vim, Ctrl W, by default, sets you up for a window command (e.g., Ctrl Wh moves to the window on the left, etc.)

I am new to using a Mac and haven't got completely used to the Command key, yet. As such, I am regularly closing my terminal session accidentally. (Fortunately, I'm running tmux, so my session is preserved, but it's nonetheless getting pretty annoying!)

Is there a way to change keyboard shortcuts in iTerm2? I realise it's probably unlikely and easier to change the Vim keybindings, but I don't want to change what I'm used to.

8

Just tested this in Yosemite. If you re-map the keyboard shortcut for "Close" in the System > Keyboard > Shortcuts, then that changes the ⌘+W behavior.

See: enter image description here

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .