Using alt+backspace key in vim command line to delete by words

前端 未结 6 2217
萌比男神i
萌比男神i 2021-02-18 17:03

Is there a way to use the alt+backspace in vim command line? It gets unruly when having to backspace /very/long/file/path individually instead of using

6条回答
  •  鱼传尺愫
    2021-02-18 17:35

    Vim is unable to receive alt input. skeept's answer seems to be the best alternative.

    See this answer:

    The Alt/Meta key is problematic in Vim and most terminals, see this answer of mine for an overview of the situation (the situation is the same for Meta and Alt).

    In short, Vim doesn't receive Alt at all: hitting Alt+Backspace is exactly the same as hitting Backspace.

    Anyway, it will be better for you in the long term to learn and get accustomed to Vim's default key-mappings.

提交回复
热议问题