On Mon, Jan 7, 2019 at 5:21 PM Simon Wilper <s...@chronowerks.de> wrote:

Hi everybody,
>
> I would like to edit a document that contains some paragraphs separated by
> one
> empty line and insert text after each empty line.  Unfortunately neither
> the
> regex command /^$ nor /\`\' does match empty lines.
>

You want this (* is the prompt, use the P command to see it):

*g/^$/a\
text to be inserted
*

Now every blank line will be followed by a line containing "text to be
inserted".  If you want to insert more than one line, end every line except
the last one with a backslash.

-- 
John Cowan          http://vrici.lojban.org/~cowan        co...@ccil.org
Most people are much more ignorant about language than they are about
[other subjects], but they reckon that because they can talk and read and
write, their opinions about talking and reading and writing are as well
informed as anybody's.  And since I have DNA, I'm entitled to carry on at
length about genetics without bothering to learn anything about it.  Not.
                        --Mark Liberman
_______________________________________________
bug-ed mailing list
bug-ed@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-ed

Reply via email to