为什么"d1j"在vim中删除了两行?

Eug*_*ash 12 vim command

d{motion}命令似乎不一致:

d1j  " deletes 2 lines to the bottom
d1l  " deletes 1 character to the right
Run Code Online (Sandbox Code Playgroud)

这是预期的行为吗?

Ben*_*oit 10

当您开始运动并且处于操作员暂挂模式时,您的动作将是包含性的或排他性的,或者是字符式或线性的(线性运动总是包括在内).

j是一种包含线性的运动.可能你想尝试dvjdgj(后者适用于屏幕线).

:help operator.您可以分别使用V,v或CTRL-V强制运动为线性,字符或块状.