fuzzylogic25 wrote: > 1. I saved that script into copysearch.vim. > 2. Ran the file I wanted to process and typed ":so copysearch.vim". > 3. I typed "/http:[0-9a-zA-Z?=+._~&/\-]\+" > 4. Typed ":CopyMatches" > 5. Then typed "Ctrl R n" to open new window 6. Then I simply > pressed 'p' and it was all pasted into new window.
When you press p the contents of the unnamed register (designated as " that is, double quote) is pasted. The unnamed register is saved (by default) when you exit Vim, so you can restart Vim and press p to paste the value from the previous occasion that you were running Vim. Perhaps that is what happened: somehow, you got the text into your unnamed register (e.g. by deleting the text), and the :CopyMatches command did not change that text (because, by default, CopyMatches puts the results into the + register (clipboard). To test: before using :CopyMatches, put the cursor on some line and press Y to yank (copy) the entire line to the unnamed register. Then try your steps. I predict the p will paste the line you yanked, and not the CopyMatches result. > I dont see how you can type "+p. > Typing those 3 characters did not work for me. In Vim, type :version and tell us the version you are using, and the operating system. Is it a terminal or a GUI version? Try "*p (there is tremendous confusion about + and * and I don't see why + would not work, but try * and report the result). John -- 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
