kay samy wrote:
> ...
> cuuuuuuuuC
> {wdwdwGBh}
> {DwdwdrdW}
> {WDPdRDpD}
> {DwdkDb$W}
> {PdWdwDNd}
> {DWDWdWdW}
> {WDPDNDWD}
> {DWDWDWIW}
> vllllllllV
> ...
>
> I want to merge all the lines starting with { and ending with
> } to be merged into a SINGLE line.

You don't say whether you know how to do this just once or
twice, so we'd better start there. On the first line press V
then go to the last line (all wanted lines are visually
selected), then press J to join the lines. Or press gJ for no
spaces. See :help 'joinspaces'

For something more automated, you could try a search:
  /\(^{.*}\n\)\+

then visually select to the end of the search:
  v//e

then join the visually selected lines:
  J

then / and up arrow to use search history to repeat the first
search.

John


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

Reply via email to