Arrow keys type capital letters instead of moving the cursor

后端 未结 13 1664
失恋的感觉
失恋的感觉 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:56

    I have used following code in my .vimrc file, and it has resolved my problem with arrow keys.

    ...
    ...
    " Use Vim settings, rather than Vi settings (much better!).
    " This must be first, because it changes other options as a side effect.
    set nocompatible
    
    " allow backspacing over everything in insert mode
    set backspace=indent,eol,start
    ...
    ...
    
    " CTRL-U in insert mode deletes a lot.  Use CTRL-G u to first break undo,
    " so that you can undo CTRL-U after inserting a line break.
    inoremap  u
    
    " In many terminal emulators the mouse works just fine, thus enable it.
    if has('mouse')
      set mouse=a
    endif
    ...
    ...   
    

    I have posted my complete .vimrc file Here. Hope it helps !

提交回复
热议问题