On 04/15/2011 09:50 AM, Eric Weir wrote:
but f/F/t/T are eluding me at the moment. I can't tell what
they do.

They allow you to jump to (f/F) or one-character-shy-of (t/T) the Nth (default N=1) match of the subsequent letter. So in this paragraph, if I'm at the beginning (on the "T" in They), typing "f(" will go forward to the first paren around the "f/F". Typing "3t-" will go to the "y" in "shy". The F/T versions move backwards instead of forwards as f/t do. It's particularly powerful in concert with commands like "d" or "c". Often I want to "delete up to the next character {c}" such as in code, so I might use

  dt.

to delete up to (but not including) the next period.

So rather than pressing "l" a whole bunch of times to move right a bunch, or even pressing "w" a bunch to jump by word, if there's a unique character (unique chars may be more assessable in code, but certainly eye-ball'able in prose), I'll just use the "f/F/t/T" suite to jump to that unique char in one motion rather than potentially overshooting.

The ";" and "," motions simply repeat the previous f/F/t/T motion in the same/opposite direction respectively. A small caveat: if you issue "tX" to move up to the next "X" character, hitting ";" alone is a NOP because the next X is the character after the cursor, so it moves forward one to that character and then backs up one, leaving you where you were.

-tim


--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to