I'm migrating to a shiny new laptop (yay) unfortunately I've manually set up my iTerm to match the old machine, but something is not right (not yay).

I'm experiencing

 - using `xterm-256color` doesn't give the full colour set for say, vim.
 - applications like `vim` dont clear out of the scrollback when exited.
 - my <kbd>↖ home</kbd> and <kbd>↘ end</kbd> keys are completely broken and I can't seem to Google a solution
 - my <kbd>⌫ backspace</kbd> key doesn't delete backwards, it adds a 'space' and prevents further input until `^C`.

Here is my [.zshrc](http://paste2.org/p/1302831) and my [.profile](http://paste2.org/p/1302922). I dont have an `.inputrc`.

Here are my keyboard settings for iTerm2:

![screenshot20110315at801.png][1]

![screenshot20110315at801.png][2]

I'm fairly sure i've broken something between `$TERM`, iTerm2's keyboard settings and my `.zshrc`, but I'm simply not competent enough to debug it. As far as I can tell, my settings are identical to my old laptop, which works.

  [1]: https://i.sstatic.net/qpiCC.png
  [2]: https://i.sstatic.net/rhugJ.png