加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

vim中de和dw有什么区别?

发布时间:2020-12-16 01:09:56 所属栏目:安全 来源:网络整理
导读:按照 vimtutor技巧,我在第2.3课中找到了以下内容: Many commands that text are made from an operator and a motion.The format for a follows: d motionWhere: d - is the delete operator. motion - is what the operator will operate on (listed below
按照 vimtutor技巧,我在第2.3课中找到了以下内容:
Many commands that text are made from an operator and a motion.
The format for a  follows:

      d   motion

Where:
  d      - is the delete operator.
  motion - is what the operator will operate on (listed below).

A short list of motions:
  w - until the start of the next word,EXCLUDING its first character.
  e - to the end of the current word,INCLUDING the last character.
  $- to the end of the line,INCLUDING the last character.

但是,我没有看到dw和de之间的区别.使用dw和de时的用例是什么?

有这样的缓冲区:
Lorem ipsum dolor

在ipsum字的中间移动光标(?):

Lorem ip?um dolor

现在按de:

Lorem ip?dolor

光标删除了当前单词中的字母,直到结束,但没有空格.

在执行dw时,空格将被删除:

Lorem ip?olor

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读