In fact, fg
is "foreground" in Bash, but not in Vi(m). d3fg
means:
d - Delete until...
3 - Do the next commandmotion 3 times
f - Go to the next occurrence of the next character pressed.
g - The character to go to.
Thus, d3fg
will delete up to (including) the third letter g
on the line after the cursor.
Thus the following text, with the cursor on the 0
:
01g2g3g4g5g6
Becomes after d3fg
:
4g5g6