* How can replace some word with a real new line in Emacs?
@ 2009-03-18 15:58 mgx0018
2009-03-19 9:13 ` Peter Dyballa
0 siblings, 1 reply; 3+ messages in thread
From: mgx0018 @ 2009-03-18 15:58 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 323 bytes --]
Hello,
In Emacs, What command can replace some word or symbol with a real newline.
For example, I have a text file like this:
int a;int b;intc;
After I exec the command that replae the ";" with ";" and new line, the text will like this:
int a;
int b;
int c;
What command can do this? Thanks very much!!
[-- Attachment #2: Type: text/html, Size: 689 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How can replace some word with a real new line in Emacs?
[not found] <mailman.3544.1237440736.31690.help-gnu-emacs@gnu.org>
@ 2009-03-19 6:19 ` g.w
0 siblings, 0 replies; 3+ messages in thread
From: g.w @ 2009-03-19 6:19 UTC (permalink / raw)
To: help-gnu-emacs
Hi mgx,
>>>>> mgx0018 <mgx0018@yeah.net> writes:
> Hello, In Emacs, What command can replace some word or symbol with a real
> newline. For example, I have a text file like this:
> int a;int b;intc;
> After I exec the command that replae the ";" with ";" and new line, the
> text will like this:
> int a; int b; int c;
> What command can do this? Thanks very much!!
try:
M-% ; RET ; C-q C-j RET
or
M-: (replace-string ";" ";\n")
HTH
g.w
--
Life is like a prison, can you break it?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How can replace some word with a real new line in Emacs?
2009-03-18 15:58 mgx0018
@ 2009-03-19 9:13 ` Peter Dyballa
0 siblings, 0 replies; 3+ messages in thread
From: Peter Dyballa @ 2009-03-19 9:13 UTC (permalink / raw)
To: mgx0018; +Cc: help-gnu-emacs
Am 18.03.2009 um 16:58 schrieb mgx0018:
> In Emacs, What command can replace some word or symbol with
> a real newline.
M-x replace-string RET <some text> RET <same text> C-q C-j RET
--
Greetings
Pete
Ce qui été compris n'existe plus. (Paul Eluard)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-19 9:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.3544.1237440736.31690.help-gnu-emacs@gnu.org>
2009-03-19 6:19 ` How can replace some word with a real new line in Emacs? g.w
2009-03-18 15:58 mgx0018
2009-03-19 9:13 ` Peter Dyballa
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).