In Vim, how can I delete all text from the current cursor position until the next space

vim

In Vim, I know d$, that deletes everything to the end of line.

But how can I delete all text from the current cursor position until the next space? dw doesn't work, since it treats symbols like colon as separator as well.

Best Answer

dW (capital W) or more generally you can do df followed by the character to search for, in this case space. You can also use t instead of f to delete up to but not including the found character. And if you capitalize the F or T, they work backwards.