From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Richard Newsgroups: gmane.emacs.help Subject: Re: Placing " at beginning and end of line? Date: Thu, 19 Mar 2015 16:12:18 +0100 Message-ID: <87iodxf2ct.fsf@yahoo.fr> References: <87a8z9ksni.fsf@skimble.plus.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1426777943 21222 80.91.229.3 (19 Mar 2015 15:12:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Mar 2015 15:12:23 +0000 (UTC) Cc: help-gnu-emacs To: Sharon Kimble Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 19 16:12:16 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YYc7L-00050X-Fy for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Mar 2015 16:12:15 +0100 Original-Received: from localhost ([::1]:39679 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYc7K-0007AE-9T for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Mar 2015 11:12:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYc70-00071t-V5 for help-gnu-emacs@gnu.org; Thu, 19 Mar 2015 11:11:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYc6v-0006Sp-06 for help-gnu-emacs@gnu.org; Thu, 19 Mar 2015 11:11:54 -0400 Original-Received: from mxin.ulb.ac.be ([164.15.128.112]:55508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYc6u-0006SB-QW for help-gnu-emacs@gnu.org; Thu, 19 Mar 2015 11:11:48 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuAFANDmClWkD4Xx/2dsb2JhbABchDKzBAEBAQEBAQaZCQKCEwEBAQEBAX2EEAEEAXkFCwgDDhMlDwEESRMbh38BDAizdJQRAYYAAQEIAgEfhgqCLYJghHEHhC0FmjaBG4MwgimJbYNHIoNvPTGCQwEBAQ Original-Received: from mathsrv4.ulb.ac.be (HELO localhost) ([164.15.133.241]) by smtp.ulb.ac.be with ESMTP; 19 Mar 2015 16:11:19 +0100 In-Reply-To: <87a8z9ksni.fsf@skimble.plus.com> (Sharon Kimble's message of "Thu, 19 Mar 2015 13:45:21 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 164.15.128.112 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:103218 Archived-At: Sharon Kimble writes: > How can I place " at the beginning of a line, and " at the end of a > line, in a highlighted region please? This is a block of 10+ lines, > and I need quotes from the beginning and end of each line. > > I have a block of text, which is a latex preamble, as part of an org-mode > init file, which is tangled and creates my "init.el". Another way is: C-M-% ^\|$ RET " RET (i.e. replace all beginning of line and all end of line by a double-quote character) Yet another way would be using magnars' multiple-cursors-mode (available from your favourite ELPA repository) : M-x mc/edit-lines (I have it bound to "C-c e"), then do: " C-e " RET. The added advantage of this solution is that it makes you feel extremely powerful... HTH, -- Nicolas