问题描述
限时送ChatGPT账号..在正常模式下,我可以点击 Ctrl
+ E
删除当前单词的其余部分并进入插入模式.
In normal mode I can hit Ctrl
+ E
which deletes the rest of the current word and goes to insert mode.
我想删除整个单词,无论光标位置如何(当然是在单词内).
I want to delete the entire word, regardless of the cursor position (within the word of course).
推荐答案
您可以通过键入ciw"来使用更改内部词"来删除光标所在的词.
You can use "change inner word" by typing "ciw" to delete a word your cursor is on.
inner"和a"命令在 Vim 中很棒,也可以尝试在 {} 块中使用ci{",或者如果您也想删除 {} 字符,请尝试使用ca{".要将这些命令翻译成英文以更好地记住它们,请尝试:更改内部 { 块"和更改 { 块".
The "inner" and "a" commands are great in Vim, also try "ci{" inside a {} block, or "ca{" if you also wish to remove the {} characters too. To translate these commands to English to remember them better, try: "change inner { block" and "change a { block".
http://vimdoc.sourceforge/htmldoc/motion 上的文档.html#text-objects
这篇关于如何在 Vim 中删除一个单词并进入插入模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论