2
I'm using putty to ssh to Ubuntu with TERM=xterm-256color
.
Inside vim, the home and end keys are not working properly. "Home
" key makes vim enter in "Insert
" mode and put a 'w
' character. Similarly "End
" key makes vim enter in "Insert
" mode before putting a 'q
' character.
The keys work fine outside vim. Home and End key puts the cursor at the beginning of the line or end of the line.
Also, this does not happen when I log in with TERM=linux
set. Home and End keys inside vim function properly then.
This type of problem almost invariably comes down to the escape sequences being sent for various special keys. Check to make sure
$TERM
on the host you are connecting to corresponds to the settings in your PuTTY connection profile. – a CVn – 2016-12-24T12:31:01.303@MichaelKjörling It's the same "xterm-256color" in both putty configuration as well in the host. Same behavior with xterm. – tcpip – 2016-12-24T12:41:05.807
@MichaelKjörling I also tried editing escape sequences both by editing the terminfo file, compiling and exposing $TERMINFO variable. And also via editing /etc/vim/vimrc file and setting the proper values for both Home and End keys. No luck. – tcpip – 2016-12-24T12:42:29.790