Apr 15th, 2011
After being somewhat unhappy with the Apple Terminal application since the very beginning, I found a very nice alternative in iTerm2! Everything seems to work fine from tabbing, splitting horizontally and vertically, cursor observation to fancy growl support.
The only pain were misconfigured Home and End keys. The approriate information on the iTerm2 homepage did not really give me the solution right out of the box, so I paste it here.
Make sure that your TERM variable is the same as set in your iTerm2 profile (in preferences) and add the following two esape sequences to your key configuration:
Button | Escape Sequence |
---|---|
Home | Esc + [1~ |
End | Esc + [4~ |
It should work right after adding the sequences!
That’s it,
Cheers!
iss
nesono
Comments
Anonymous replied on Permalink
Home and end
Home and End are a bit of a mess. If you’re using TERM=xterm-vt220 or xterm-r6 (and possible a few other values) then Esc+[1~ is correct. As far as I can tell the xterm terminfo uses the “PC-style” escape codes that iTerm2 ships with for the xterm, xterm-new, and xterm-256color TERMs. Not sure what ansi, vt100, rxvt, and linux are supposed to do. Which TERM are you using? FWIW, the xterm* terminal types are the most tested ones in iTerm2. If the others work, that actually kind of a coincidence at the moment :)
iss replied on Permalink
TERM
I’m using xterm-256color. vim has always been working with Home and End, but not my zsh. Maybe zsh is the reason? I recorded the key bindings in the Apple Terminal, also using zsh… Cheers, iss
Anonymous replied on Permalink
how?
hi i am new to this…. could you tell me how exactly i am to add the sequence….. if i type the esc + [`~ i don't really get the sequence but the las character typed…. could you please elaborate
iss replied on Permalink
in detail
I do the following:
Maybe you did not set the correct action?