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.
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
(capitalW
) or more generally you can dodf
followed by the character to search for, in this case space. You can also uset
instead off
to delete up to but not including the found character. And if you capitalize theF
orT
, they work backwards.