You can delete up to a pattern using:
d{motion} Delete text that {motion} moves over.. In this case, we're using this form: d/{pattern} Delete up to the next occurrence of {pattern}Unfortunately vim gets confused if the match for the pattern happens to be at the beginning of a line, and it won't delete the newline, even though the newline isn't part of the pattern.
This is line one. This is line two.Then somewhere on line one try deleting up to the two with "d/two" Notice the newline is eaten along with all the text. Now undo, and try to delete everything up to the beginning of the second line with "d/This" You'll end up with something like:
This is l This is line two.