vim not working under iTerm2
Apparently, removing set lines=40 does the trick. The manual says:

    Number of lines of the Vim window.
    Normally you don't need to set this.  It is done automatically by the
    terminal initialization code


so be careful when you copy-paste ready configs, as I did :)