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

≡放荡痞女 提交于 2019-12-07 02:11:55

问题


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



来源:https://stackoverflow.com/questions/9154212/vi-vim-delete-change-right-to-left

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!