On 27/05/09 17:21, Gene Kwiecinski wrote:
>
>> When I substitute using ":s/{pattern}/{string}/{option}", I prefer
>> to use "/{pattern}" to check out...
>
> You already got answer by now, but in general, if you just need to
> modify the pattern if it be *un*satisfactory, just type '/' and then
> scroll through the earlier search patterns with the up/down arrow keys,
> and once you find it or something similar, you can edit it to suit
> (add/delete/change), then rerun the search.
Another possibility, to reuse a search pattern which wasn't the last one
without bumping all the way around the file even if 'imsearch' is set,
is the command-line window: hitting q/ or q? will open a window with all
recent seach patterns (latest at bottom). Place the cursor on one of
them, edit it or not, then hit Enter, to search for that pattern
(executing the search command under the cursor); or hit :q (or :x etc.)
to leave the command-line window if you change your mind. (You cannot
leave that window without closing it.) Similarly with q: for ex-command
history instead of search history.
Best regards,
Tony.
--
Experience is that marvelous thing that enables you recognize a mistake
when you make it again.
-- F. P. Jones
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---