Sunday, December 27, 2009

Re: start search at current line, wrap around?

Tim Chase wrote:
> assuming you have the default 'cpoptions' set:
>
> :help cpo-star
>
> It's the only place in the help I've seen it documented,
> but I use it enough that others might find it handy.

Thank you, another VERY useful tip.
It also got me reading about ":'<,'>"
( ":*" is an alias for ":'<,'>" )

:help v_:

{Visual}: Starts a command-line with the Visual selected lines
as a range. The code ":'<,'>" is used for this range, which
makes it possible to select a similar line from the command-line
history for repeating a command on different Visually selected
lines.

This means I can Visually select a range,
do a search and replace,
then Visually select a different range,
even a different size range,
recall any previous search/replace
and it will work on the completely new range.

I do find that 'handy'.
-Bill

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments: