I was expectig the normal mode command d_ (without count) to delete from the cursor position to the beginning of the line, but it seems to delete the entire line, i.e. even words /after/ the cursor.

Is this really the correct behavior?

Yes, as

        :help _

details, the "_" motion is linewise which will produce the behavior you describe...the equiv. of "dd".

You can either force it to be character-wise:

        dv_

or you can use

        d^

which will, without a count, delete to the position where "_" (without a count) moves the cursor.

You can learn more at

        :help linewise

and at

        :help exclusive-linewise

and then scrolling down to the section titled

"FORCING A MOTION TO BE LINEWISE, CHARACTERWISE OR BLOCKWISE"

-tim




Reply via email to