1

In Insert mode, when I press End I get an F where the cursor is and Insert mode is canceled. This works on one system and not another. I have checked what is installed (vim, vim-common, vim-runtime,vim-tiny) and the version (both are 2:7.4.1689-3ubuntu1.3) as well as what vi and vim point to (both point to /usr/bin/vim.basic). /etc/vim/vimrc* are identical as is .vimrc (set no compatible and colorscheme torte). What else do I check?

  • Is there a difference in what `$TERM` is set to in the shell? How about `:set term?` inside Vim? How about `:set t_@7? t_kh?` (these are the terminfo/termcap codes for the "End" and "Home" keys...) – filbranden Mar 01 '20 at 04:44
  • 1
    Thank you so much - this is the answer to my question (post it as an answer, I'll accept it). $TERM was set to linux, changing it to xterm-256color solved my problem (didn't try any other settings). – Senior Geek Mar 09 '20 at 02:57

1 Answers1

1

This is a problem with how $TERM is set in your system.

On the problem system, you had it as TERM=linux, which is applicable to the Linux console and uses different escape sequences for the special keys than the xterm settings.

Setting it to TERM=xterm or TERM=xterm-256color or similar should fix it.

filbranden
  • 652
  • 5
  • 9