Monday, January 31, 2011

Re: properly yanking word/selection

On 01/31/2011 11:25 AM, sgp wrote:
> What is the proper way to yank a word or a selection from a vim script? Right now I'm using
> if !bSelection
> normal! yaw
> else
> normal! gvy
> endif
>
> but I have some gripes:
>
> 1/ yaw (yank a word) yanks the space before the word (some times it doesn't); I don't want the space.

try yiw

-ak

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

No comments: