hi Tim, thanks for your reply, cannot get it to work for me though,
here is a line, and there is many like it, where the part between
/* here is a part */
differs, now how to move it to the end of line
li.cat-item-9{ /* fedorka */ background: #C7DE8E; }
li.cat-item-7{ /* us */ background: #8EBEDE; }
cheers
On 14 Sep, 14:14, Tim Chase <[email protected]> wrote:
> > 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
-~----------~----~----~----~------~----~------~--~---