Arrow keys type capital letters instead of moving the cursor

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

    This works for me:

    map ^[[A 
    map ^[[B 
    map ^[[C 
    map ^[[D 
    

    To type the sequence for each arrow key, you need to press ctrl-v, then the arrow key.

    For example, to type the first line:
    m, a, p, space, ctrl-v, , space, <, u, p, >

    This also might work:

    set t_ku=^[[A
    set t_kd=^[[B
    set t_kr=^[[C
    set t_kl=^[[D
    

    More information is available here.

提交回复
热议问题