vim中de和dw有什么区别?

前端之家收集整理的这篇文章主要介绍了vim中de和dw有什么区别?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
按照 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
原文链接:https://www.f2er.com/bash/384528.html

猜你在找的Bash相关文章