Hi,
Vivek Bhat wrote:
> Hi,
>
> I am trying to getting adept at VIM editing. There are few problems I am
> facing.
> I do not know how to copy from file and then paste it into search command or
> colon command.
> e.g. I have to search for word "foo" in the file. I want to be able to copy
> this word "foo", invoke search mode by pressing "/" and then paste the word
> there. I can do this by "C-c" and then "C-v" in gvim but I want to do this in
> VIM way not windows way.
>
> I know I can copy by either visually selecting the word("V-w") and then
> yanking it("y") or copy it ("+y), but I do not know how to paste this word in
> search mode(After I press "/") or in command mode(After I press ":").
while in insert or command mode you can use Ctrl-R followed by a register
name to insert the contents of that register. The default register, which
was used when you yanked the current visual selection, is named " (double
quote). Thus to insert its contents press
Ctrl-R "
on the command line. For more information read
:help c_CTRL-R
Regards,
Jürgen
--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)
--
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