On 11/09/11 05:06, Spiros Bousbouras wrote:
In file usr_24.txt under the vim documentation directory we read
that yiw is for "yank-inner-word". Where is this yank inner word
functionality documented and how is it different from yw ? I tried
every help search I could think might be relevant but nowhere is
yiw defined.


see :help text-objects

yiw yanks the word under the cursor (on both sides) without the surrounding white space. yaw (yank a word) yanks the same word with the whitespace on one side. On which side may vary depending on whether there is whitespace before the word, after it, or both. yw yanks from the cursor forward to the end of the current word, it differs from yaw when the cursor is not at the start of a word. The help says w is an exclusive motion, but with me yw includes one whitespace after the word, while ye (yank to end, supposedly inclusive) yanks to the end of the word, including the end character but no whitespace.

When the text object has specific bounding characters it's slightly different: e.g. yi" yanks the text left and right up to but not including the nearest double quotes, ya" yanks the same text with the quotes on _both_ sides and even sometimes some additional whitespace on one side, but to yank forward only there is no y" command, you must use yf" (_f_orward, including the next ") or yt" (forward, _t_ill the next " excluded), or similarly yF" or yT" backward.


Best regards,
Tony.
--
Afternoon, n.:
        That part of the day we spend worrying about how we wasted the
morning.

--
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