Stefan Karlsson wrote:
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?
from ":help _"
*_*
_ <underscore> [count] - 1 lines downward, on the first non-blank
character |linewise|.
"Linewise" means that d_ y_ etc. will affect entire lines.
To delete from just before the cursor to the start of the line: d<Home>
or d0
To delete from the cursor (included) to the start of the line in Vim 7:
dv0 (see ":help o_v")
v in operator-pending mode makes the motion characterwise, but _ when
made characterwise, leaves the cursor in the same column, so dv_ deletes
nothing.
Best regards,
Tony.