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

2019-04-29 09:12发布

问题:

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.

回答1:

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



回答2:

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



标签: vim vi