On Thu, March 10, 2011 9:14 am, Vivek Bhat wrote: > 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.
The <C-R> key mappings are handy for this. This will insert the specified register at the position of the cursor. For example to insert the contents of the search register enter <C-R>/, that is, in Cmdline mode press Ctrl-R followed by '/' (without the single quotes) and this will insert the contents of the search register. BTW, this also works in insert mode. See also the help :h c_<C-R> :h i_CTRL-R regards, Christian -- 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