> dear all, this works(as you well know)
> 
> :.,+8 g/\/* .\+ *\/// m$    it does move, searching the range, whole
> lines that match the patter to the end of file
> 
> how can I move what's matched in a line to the line end?
> this that whole - find that and move it to the end - this whole that
> cheers


You can use something like

   :%s/\(pattern\)\(.*\)/\2\1

The catch is that it will only do the first match in the line. 
It takes a little more work to get multiple instances in the same 
line -- especially if the transposed order must remain the same 
(rather than inverted).

-tim



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

Reply via email to