Linux vi arrow keys broken in insert mode

后端 未结 11 796
[愿得一人]
[愿得一人] 2020-12-02 06:18

My arrow keys don\'t work in vi in insert mode at home, they just each insert a newline and a capital letter, like \'A\'. Is there a way to fix that?

相关标签:
11条回答
  • 2020-12-02 06:43

    Ubuntu ships default with vim-tiny, which doesn't have all the bells and whistles that vim has.

    Do a quick sudo apt-get install vim to get all the juicy features that everyone's talking about.

    0 讨论(0)
  • 2020-12-02 06:43

    Yet another variation: this problem appeared for me after some .vimrc changes. A concerted search eventually revealed that my clever re-mapping of ESC in normal mode was not a good idea. Removing it solved the problem:

    " this is NOT something you want in .vimrc:
    " In normal mode, hitting Esc turns off search highlights:
    nmap <ESC> :nohl<CR>  " Do NOT add this to .vimrc
    
    0 讨论(0)
  • 2020-12-02 06:43

    I had the same issue while using vim inside Windows 8.1 with Cygwin.

    Solution worked for me is, just run the following command in your Cygwin terminal:

    cp vimrc_example.vim ~/.vimrc
    
    0 讨论(0)
  • 2020-12-02 06:45

    In the command line write this:

    EXINIT="set nocompatible"; export EXINIT
    
    0 讨论(0)
  • 2020-12-02 06:47

    The only thing that worked for me was ":set term=ansi"

    0 讨论(0)
提交回复
热议问题