Hi,
I want to join all lines that are inside a given pattern and occurs more
than once in the text, ie:
....
PatternStart ....
....text1
....text2
...text3
..text4
PatternEnd
...
...
PatternStart ....
....text1
....text2
...text3
..text4
...
...textn
PatternEnd
....
...
PatternStart ........text1....text2...text3..text4PatternEnd
....
....
PatternStart ........text1....text2...text3..text4... ...textnPatternEnd
....
I tried to use:
:g/PatternStart\_.\{-}PatternEnd/ J
but this joins only first and second line of the pattern.
How can I tell vi to join all lines inside all occurrences of this
pattern with variable containing lines?
Thanks in advance,
Nikos