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

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

Re: one line big XML to multiline


From: Xah Lee
Subject: Re: one line big XML to multiline
Date: Tue, 3 Jul 2012 16:06:31 -0700 (PDT)
User-agent: G2/1.0

On Jul 2, 4:16 am, Mihamina Rakotomandimby <miham...@rktmb.org> wrote:
> Hi all,
>
> I got a big one line XML file.
> I want to break the lines to make it more readable.
>
> Replacing "><" with "C-j" then indenting is the most obvious solution,
> but would you know a more elegant solution?
>
> I'm using Emacs 23 (FC17) with nXml or sgml-mode usable.

you can record a keyboard macro, save it, assign it a key. So, just
press one key, and the file is indented and well-formatted.

〈Emacs: Using Keyboard Macro to Record/Playback Keystrokes〉
http://ergoemacs.org/emacs/emacs_macro_example.html

to indent, just select all then 【Ctrl+Alt+\】.

or, this can be easily done by writing a elisp command.

 Xah


reply via email to

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