When the cursor is in the middle of a word you wish to delete

diw has a distinct advantage over bdw

But what is it?

I think it's the mental model.

"diw" is two mental steps: {action}{object} where {action} is "d"elete and {object} is "iw" even though that {object} is two characters.

"bdw", OTOH, has a 3-step mental model of {prepare}{action}{motion} where you {prepare} with "b", {action} with "d" over {motion} with "w".

When vimming, you begin to think in the flow "okay...I want to delete something [hit 'd'] and it's this thing [provide object/motion]". The latter intrudes on this by requiring you to not start your deletion action until you've prepared for it.

Or maybe that's just the warped way my own mind works :)

-tim


Reply via email to