help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: copy-line


From: Raffaele Ricciardi
Subject: Re: copy-line
Date: Wed, 25 Jul 2012 16:02:11 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120713 Thunderbird/14.0

's requirement is that for its was that you shouldn't ha.On 07/25/2012 02:41 PM, Dan Espen wrote:> 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
>
>

I meant: I don't know whether it is customizable via Customize, as the original poster asked for its .emacs to be left untouched. Thank you for the tip, though :-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]