On 12/27/2009 10:18 PM, Bee wrote: > 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.
If you just want to execute the most recent Ex command (such as your :s command), it's available as a register/macro, so you can re-execute it with @: and subsequent re-executions (which I often end up doing) can be rerun with @@ (which is faster/easier to type, IMHO) :help @: :help @@ If you need to dig further back in your command-line history, it's just a ^P away, or you can hit ^F (by default, though overrideable) from the command-line, or in normal-mode use q: to bring up the command-line editing window. :help c_ctrl-p :help c_ctrl-n :help cmdwin Hope this helps you hack some more. -tim -- You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php