From: Rajinder Yadav <devguy.ca@gmail.com>
Cc: 'emacs-help' 10 <help-gnu-emacs@gnu.org>
Subject: Re: copying text into a paste buffer as you type?
Date: Thu, 16 Dec 2010 13:07:50 -0500 [thread overview]
Message-ID: <4D0A5576.3040509@gmail.com> (raw)
In-Reply-To: <E6B1A2C0BB024628921AFF10A9234B94@us.oracle.com>
On 10-12-16 11:49 AM, Drew Adams wrote:
>> is there a way to get emacs to copy text into a paste buffer as you
>> type? for example, I would like to type 'null => false' once
>> and be able to paste into the other lines
>>
>> t.string :title, null => false
>> t.string :name, null => false
>> t.text :post, null => false
>
> Yes, but you have to tell it when to start and stop copying.
>
> C-SPC n u l l => f a l s e C-x C-x C-x C-x M-w
>
> Start:
> `C-SPC' Mark selection beginning.
> Type text.
> Stop:
> `C-x C-x' Activate selection, swapping mark and point.
> `C-x C-x' Swap mark and point back again.
> `M-x' Copy selection to kill-ring (paste buffer).
>
> Then `C-y' to yank (paste) it.
>
> ---
>
> If you want to paste the same text multiple times but still be able to select
> other text without interfering with what you saved (copied), use the secondary
> selection: To select and copy for the secondary selection: drag `mouse-1' with
> the Meta key depressed. To yank it: `M-mouse-2'.
>
> This is particularly useful for replacing selected text here and there (esp. in
> delete-selection mode). E.g., double-click `mouse-1' on a sexp to select it,
> then `M-mouse-2' to replace it. So instead of using `query-replace' you can use
> it to change selected occurrences of `null => false' to `hopalong cassidy'.
>
> http://www.emacswiki.org/emacs/SecondarySelection
>
> An alternative to using the secondary selection is to use `M-y', perhaps
> multiple times, just after you yank (`C-y'). That cycles through previous
> kill-ring entries until you get to the one you want.
>
Drew,
that works great, although I think you meant 'M-w' instead of 'M-x', thanks!
--
Kind Regards,
Rajinder Yadav
next prev parent reply other threads:[~2010-12-16 18:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-16 10:58 copying text into a paste buffer as you type? Rajinder Yadav
2010-12-16 16:49 ` Drew Adams
2010-12-16 18:07 ` Rajinder Yadav [this message]
2010-12-16 18:30 ` Drew Adams
2010-12-20 7:09 ` Kevin Rodgers
2010-12-20 15:09 ` Drew Adams
[not found] <mailman.1.1292497153.3954.help-gnu-emacs@gnu.org>
2010-12-16 11:27 ` LanX
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D0A5576.3040509@gmail.com \
--to=devguy.ca@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.