Jeri Raye wrote:
> Hi
> 
> I have a text which is several lines below each other seperated with a
> empty line.
> What I want is that all text will be joined to the first empty line.
> Ho do you do that?

As long as you have a blank line at the end of your file, you can use

   :v/^\s*$/,/^\s*$/-j!

That translates as

  :v        on every line that doesn't match
  /         this pattern
  ^\s*$     "a blank line or only whitespace on the line"
  /         do the following action
  ,         from that line through
  /^\s*$/   the next blank line
  -         (one line before that blank line)
  j!        join them together without any additional whitespace

If you don't have a blank line, it may gripe about the last 
paragraph being joined together.

-tim








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

Reply via email to