From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Espen Newsgroups: gmane.emacs.help Subject: Re: copy-line Date: Wed, 25 Jul 2012 09:41:15 -0400 Organization: A noiseless patient Spider Message-ID: References: <1341515294.71719.YahooMailNeo@web163106.mail.bf1.yahoo.com> <2b0503d9-5345-42b3-ad05-0d7bc2aad7a1@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1343223917 13288 80.91.229.3 (25 Jul 2012 13:45:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 25 Jul 2012 13:45:17 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 25 15:45:17 2012 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 1Su1tp-0000i8-Jo for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Jul 2012 15:45:13 +0200 Original-Received: from localhost ([::1]:39792 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Su1tp-0005I1-11 for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Jul 2012 09:45:13 -0400 Original-Path: usenet.stanford.edu!news.glorb.com!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 Injection-Info: mx04.eternal-september.org; posting-host="784bea190b092582fdfe6048741a513f"; logging-data="7122"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX198XRC30yPctr7lpegoQ9p++Ty68SAdoEA=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:gtxMlC/BgFE5/6IO9JobQ5CC4n8= sha1:Fj+ZxLW9QHFp7k1HQOdmI89mZuY= Original-Xref: usenet.stanford.edu gnu.emacs.help:193658 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:86033 Archived-At: rfflrccrd@gmail.com writes: > Comparing Vi/Vim to other editors is not fair ;-) > > Vanilla Emacs has no way to copy text that has not been marked. Thus, to copy a line, you have to mark it first. The complete sequence is: > > C-a C-Space C-e M-w > > In alternative, you can kill a line and yank it back at once: > > C-S-Backspace C-k > > Unlike Vi, the line will be copied/killed without its new line. I don't know whether such behaviour is customizable. It certainly is customizable: (define-key global-map [(kp-add)] '(lambda () (interactive) (beginning-of-line) (if (eobp) (error "End of buffer")) (let ((beg (point))) (forward-line 1) (kill-region beg (point))))); KeyPad + Key Kill a line, yank it back: C-KP+ C-y -- Dan Espen