delete word after or around cursor in VIM

前端 未结 16 618
一向
一向 2020-12-07 06:59

I\'m now switching to VIM from TextMate. I found ^+W in INSERT mode very useful. However, I\'d like to delete not only the word before cursor, but

16条回答
  •  醉梦人生
    2020-12-07 07:37

    It doesn't look like there's any built-in way to do it in insert mode, which was the question. Some of the other answers are correct for normal mode, as well as pointing out that a custom mapping could be created to add the functionality in insert mode.

    Honestly, you should probably do most of your deleting in normal mode. ^W is neat to know about but I'm not sure I can think of a situation where I'd rather do it than esc to go into normal mode and have the more powerful deletion commands at my disposal.

    Vim is very different from a number of other editors (including TextMate) in this way. If you're using it productively, you'll probably find that you don't spend very much time in insert mode.

提交回复
热议问题