vi is very handy when doing a lot of config file editing and can save you time over using the mouse or using the x or delete keys to manually delete.
Solution:
If you don't want it to stop deleting when encountering things like - or _, then you want this:
d$
Or if you want it to stop on - and _ then use this:
dw
Remember both commands are in "non-input mode" so not when you're entering text.
Say you have a config file like this:
address-range low 10.10.2.1 high 10.10.2.5;
Let's say you wanted to just remove the whole line, yes you could hit dd but what if you just want everything after address range gone?
Just move your cursor to before the "low" and type "dw" and it will be instantly erased.
vi, delete, cursorvi, config, editing, manually, quot, dw, input, mode, dd, cursor, instantly, erased,