Reputation: 2118
When I edit a text, I often find myself removing one word from an existing sentence. I use diw
for this, the problem is only, between the surrounding words of the just deleted word will remain two whitespaces, the one before and the one after the just deleted word. Is there an easy trick to remove a word and all preceding whitespaces?
I want to achieve this:
This is just an example
to
This is an example
With diw
I am always left with
This is an example
Maybe there is a cool trick I haven't found yet!
Upvotes: 2
Views: 81
Reputation: 4476
Yes, diw
deletes inside a word. You can also delete around a word with daw
.
You can find more information about those here: :help aw
.
Upvotes: 3