Mapping -Arrows to selecting characters/lines

前端 未结 8 1120
再見小時候
再見小時候 2020-12-29 03:55

I started to use vim recently, but I miss the character/line selection methods from other text editors. By default vim maps ,

8条回答
  •  北荒
    北荒 (楼主)
    2020-12-29 04:43

    Vim doesn't bend to that easily in my opinion. The terminal one doesn't even recognize Shift-Up in my case! I thought the v (character-wise selection) or V (line-wise selection) was among the easier concepts to learn about vi/vim.

    If this works (can't test right now), this is something you'll want:

    " activate visual mode in normal mode
    nmap  V
    nmap  V
    " these are mapped in visual mode
    vmap  k
    vmap  j
    " 
    " etc...
    " similarly ,  for v
    

提交回复
热议问题