> Thank you, Tim, for solution and explanation. This dioes exactly what I
> need.
> 
>> Step #1 is a bit packed:
>>
>>   :v/          on every line that doesn't match
>> [...]
> 
> Just to get me started on the more complex commands such as these:
> where can I look up commands like :v and :g ?

The :g and :v commands are documented as "sc" mentioned.  The 
trick is knowing how to string them together with other Ex 
commands to do what you want.  The format for both is the same:

   :g/pattern/ex_command(s)_to_perform_on_each_matching_line
   :v/pattern/ex_command(s)_to_perform_on_each_nonmatching_line

So in your case, I wanted to perform an action (copy from above, 
twiddle and join) on each line that didn't match my pattern.

The commands are assembled from the Ex commands cataloged at

   :help ex-cmd-index

and made more flexible by the ability to enter powerful ranges 
(relative and absolute)

   :help :range

and chain them together with the bar

   :help :|

-tim







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

Reply via email to