What do the f and t commands do in Vim?

前端 未结 5 1250
青春惊慌失措
青春惊慌失措 2021-01-29 21:12

Can somebody explain to me what the f and t commands do in vim and exactly how they work? I can\'t seem to find this information but people keep telling me

5条回答
  •  梦谈多话
    2021-01-29 21:28

    fx jumps to the next x on the line.

    tx jumps to the character just before the next x on the line.

    You can use Fx and Tx to reach the previous x.

    You can use 2fx to jump to the second x on the line.

    So, fFand tT are useful when you want to go quickly to the next set of parentheses (f() or delete everything from the cursor to, but excluding, the previous = (dT=) and so on…

    See :h motion.txt. It will blow your mind.

提交回复
热议问题