From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: gwjiang@gmail.com (g.w) Newsgroups: gmane.emacs.help Subject: Re: How can replace some word with a real new line in Emacs? Date: Thu, 19 Mar 2009 14:19:01 +0800 Organization: Wh0 CaR3s Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1237475933 1343 80.91.229.12 (19 Mar 2009 15:18:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Mar 2009 15:18:53 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 19 16:20:02 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LkJzu-0001Xo-7s for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Mar 2009 16:17:41 +0100 Original-Received: from localhost ([127.0.0.1]:49644 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LkJyX-0002zU-4A for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Mar 2009 11:16:05 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!newshub.sdsu.edu!newsgate.cuhk.edu.hk!news.cn99.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-NNTP-Posting-Host: 218.108.10.226 Original-X-Trace: news.cn99.com 1237443540 25160 218.108.10.226 (19 Mar 2009 06:19:00 GMT) Original-X-Complaints-To: news@news.cn99.com Original-NNTP-Posting-Date: Thu, 19 Mar 2009 06:19:00 +0000 (UTC) User-Agent: Emacs Gnus Cancel-Lock: sha1:KOej/PJRxWIE7jQ3qzkHkVCBgR0= Original-Xref: news.stanford.edu gnu.emacs.help:167782 X-Mailman-Approved-At: Thu, 19 Mar 2009 11:00:06 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:63091 Archived-At: Hi mgx, >>>>> mgx0018 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?