I have text in my buffer like this:
foo
bar
baz
and my cursor is on the "f" of foo.
Let's say I want to delete up-to-and-including the "a" in bar.
So in normal mode I try: d/ba<enter>
So this is invoking the delete command, then doing a forward search for "ba" and pressing enter.
I would expect this to delete up to the "r" in bar, basically including the search match in the deletion.
But, it just deletes the "foo" line, leaving "bar" in-tact, with the cursor at the start of the "bar" line.
I understand there are many other ways to accomplish this particular situation, but I am trying to understand this fundamental behavior.
Why is this occurring, and how can I use the / command so that it deletes/yanks/etc including the match?
d/ba/e<enter>
- see:h search-offset
. Why? Because/
is an exclusive motion.