Arrow keys type capital letters instead of moving the cursor

后端 未结 13 1681
失恋的感觉
失恋的感觉 2021-02-01 03:49

I\'ve installed the latest vim using homebrew and also installed mac-vim from the google code homepage. in mac-vim everything works fine. but when I run vim in terminal.app in m

13条回答
  •  情话喂你
    2021-02-01 04:30

    I'm on a MacBook Pro with OSx El Captain (version 10.11.1) and was having the same problem after updating my Vim with Homebrew.

    My Vim version is 7.4.1063.

    I was having the problem with the Terminal app as well as the iTerm app (build 2.1.4).

    To solve this problem, I followed some of the instructions in the previous answers from @devsathish and @Kailash. The steps I followed were:

    1 - Create a .vimrc file with touch ~/.vimrc
    2 - Add the following to it:

    set nocompatible
    set backspace=indent,eol,start
    

    Now the arrow keys and the delete/backspace keys work as expected. I didn't have to change my $TERM env variable as suggested in some of the previous answers.

    I hope this helps others with the same problem.

提交回复
热议问题