help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wrapping xml


From: Ted Zlatanov
Subject: Re: wrapping xml
Date: Fri, 19 May 2006 13:08:10 -0400
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

On 19 May 2006, brakjoller@gmail.com wrote:

> rahed <rahed@e-last-minute.com> writes:
>
>> I opened an xml file in emacs 22.0. The xml is not formatted being
>> one-liner. I tried to find something in sgml or nxml mode to pretty wrap
>> the code but didn't succeed. Is something simple available?
>
> I wondered the same thing a while ago and did not bother to find out
> how it could be done. Instead I wrote a keyboard macro that did
> something like this:
>
> 1. Search for "<"
> 2. Back up one character
> 3. Press return to move the rest of the line down
> 4. Press Tab to make Emacs indent the line
>
> Save macro. Execute, execute again...

You can just replace "<" with "^M<" and then reindent the region.  The
^M is produced by C-q ENTER.

Ted


reply via email to

[Prev in Thread] Current Thread [Next in Thread]