VIM Delete up until word/character
In VIM, Given the following text:
"HelloWorld:This is a test"
If my cursor/caret is just after :, is there a command for me to delete up until the "?
So it would look like
"HelloWorld:"
Solution 1:
Yes, use the "till" motion.
dt"
means delete until a ". There is also the "find" motion, which deletes up to and including the character. Both of these work in reverse if you capitalize them.
From :h t
:
*t*
t{char} Till before [count]'th occurrence of {char} to the
right. The cursor is placed on the character left of
{char} |inclusive|.
{char} can be entered like with the |f| command.