VIM: Deleting from current position until a space

Try dtspace. In general dtx deletes from current position till just before x. Just tx moves the cursor to just before character x in current line.

To delete up to and including the space, use dfspace.


You can use dW or dE as @glenn suggested if you don't want to delete the space itself.

A WORD (uppercase W) consists of a sequence of non-blank characters, separated with white space.

Give a look to the word motions.


one possible solution is to use the delete with a search.

so type in d/<space> and vim will delete until it hits a space.