Arrow keys type capital letters instead of moving the cursor

后端 未结 13 1645
失恋的感觉
失恋的感觉 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 <C-U> <C-G>u<C-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 !

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