ID : 20075
viewed : 3
Tags : vimvim
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.
If you want to delete from anywhere inside the WORD, and in a single command, just use daW
(you can of course use daw if you want to limit to a word)
I use it quite a lot because it spare a move to the begining of the word (in your case)
delete for the current position to a specific character example "
delete the word from the position cursor is on till the end of the word
delete the entire word the cursor is on irrespective of the position the cursor is on the word, this also puts you in insert mode to enable you to insert immediately.