CarpeNoctem
CarpeNoctem

Reputation: 5660

VI (VIM): delete/change right to left?

I often use "c-t-$char" change-till-character and "d-t-$char" and would love to be able to do the same thing in reverse.

An example:

cobbler reposync --only=puppetlabs-6Server-x86_64

If my cursor is at the end of the line and I want to delete backwards to the = char. What brought this on is my wanting to move from BASH emacs mode to vi mode.

Upvotes: 6

Views: 1742

Answers (2)

epsilonhalbe
epsilonhalbe

Reputation: 15949

d-T-$char deletes from the cursor position backwards without deleting $char, d-F-$char with deleting $char

Upvotes: 3

cnicutar
cnicutar

Reputation: 182649

You can use T and F for that. For example cT= or dF= etc.

Upvotes: 12

Related Questions