如何在 Vim 中删除一个单词并进入插入模式?

编程入门 行业动态 更新时间:2024-10-25 11:22:52
本文介绍了如何在 Vim 中删除一个单词并进入插入模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送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:关键词]

本文发布于:2023-04-27 18:52:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1159833.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:单词   模式   如何在   Vim

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!