Skip to main content
1 of 3
Masquue
  • 181
  • 5

Not answering for this specific task, but I personally prefer df<char> and dt<char> or with c operator.

Once you are familiar with it, it deals with most cases more consistently by deleting from your cursor position to a specified character (f for inclusive, t for exclusive) at the cost of only one more keystroke than the optimal d^ and involving no complex mind calculation.

e.g. some of my often used commands: dt) df, cf etc. You only need to count characters or resort to Visual Mode (also remember using f or t to move cursor!) when there are multiple occurrences of the character, which seems to be a rare case for me. Also often we want to delete to a delimiter, such as , ; , which stands out clearly in the text, making clearly the argument of the command and even aiding quickly counting occurrences.

Masquue
  • 181
  • 5