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

前端 未结 6 2243
萌比男神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:34

    The answer marked as right does not correspond to the behaviour in most UI editors for Alt + BackSpace. The vim shortcut which correspond to this behaviour is db - aka delete back ( a word ?! ), dw would delete word forth, which would be the (Altr or Ctrl ) Del shortcut in most ui programs. Those work basically the same way as the w - move the cursor to the words beginnings and b, move the cursor back to the words beginning ...

    Disclaimer: I have used for more than 10 years my .vimrc. , which might have some freaky twist which changes the default behaviour as well ...

提交回复
热议问题