From: Xah Lee <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: one line big XML to multiline
Date: Tue, 3 Jul 2012 16:06:31 -0700 (PDT) [thread overview]
Message-ID: <8bd5fa54-ef15-48c7-af03-135cb7db8fb7@n9g2000pbi.googlegroups.com> (raw)
In-Reply-To: mailman.3864.1341227814.855.help-gnu-emacs@gnu.org
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
next prev parent reply other threads:[~2012-07-03 23:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.3864.1341227814.855.help-gnu-emacs@gnu.org>
2012-07-02 15:13 ` one line big XML to multiline John Bokma
2012-07-03 23:06 ` Xah Lee [this message]
2012-07-02 11:16 Mihamina Rakotomandimby
2012-07-02 11:51 ` Tassilo Horn
2012-07-05 22:46 ` Matt McClure
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8bd5fa54-ef15-48c7-af03-135cb7db8fb7@n9g2000pbi.googlegroups.com \
--to=xahlee@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).