* Re: How to do rectangular cut(visual block) in emacs
2009-03-24 5:16 How to do rectangular cut(visual block) in emacs Anand Dhanakshirur
@ 2009-03-24 5:12 ` Dirk-Jan C. Binnema
0 siblings, 0 replies; 9+ messages in thread
From: Dirk-Jan C. Binnema @ 2009-03-24 5:12 UTC (permalink / raw)
To: Anand Dhanakshirur; +Cc: emacs help
http://emacs-fu.blogspot.com/2008/12/working-with-rectangular-selections.html
might be helpful.
Best wishes,
Dirk.
--
------------------------------------------------------
Dirk-Jan C. Binnema <djcb[at]djcbsoftware.nl>
http://www.djcbsoftware.nl/
PGP: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C
------------------------------------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* How to do rectangular cut(visual block) in emacs
@ 2009-03-24 5:16 Anand Dhanakshirur
2009-03-24 5:12 ` Dirk-Jan C. Binnema
0 siblings, 1 reply; 9+ messages in thread
From: Anand Dhanakshirur @ 2009-03-24 5:16 UTC (permalink / raw)
To: emacs help
[-- Attachment #1: Type: text/plain, Size: 2 bytes --]
[-- Attachment #2: asd.vcf --]
[-- Type: text/x-vcard, Size: 177 bytes --]
begin:vcard
fn:Anand Dhanakshirur
n:Dhanakshirur;Anand
email;internet:asd@cdotb.ernet.in
tel;work:(080)-25119295
tel;cell:9886178750
x-mozilla-html:FALSE
version:2.1
end:vcard
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to do rectangular cut(visual block) in emacs
[not found] <mailman.3882.1237871267.31690.help-gnu-emacs@gnu.org>
@ 2009-03-24 7:59 ` Tim X
2009-03-24 12:32 ` Francis Moreau
0 siblings, 1 reply; 9+ messages in thread
From: Tim X @ 2009-03-24 7:59 UTC (permalink / raw)
To: help-gnu-emacs
Move point to the top left corner and set the mark
Move point to the bottom right hand corner
Hit C-x r r <reg> where <reg> is a register. This will copy the
rectangle defined by the region into register <reg>
Later, when you want to get that rectangle of text back, just hit C-x r
i <reg> and the contents of <reg> will be pasted into the buffer where
point is.
HTH
Tim
--
tcross (at) rapttech dot com dot au
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to do rectangular cut(visual block) in emacs
2009-03-24 7:59 ` Tim X
@ 2009-03-24 12:32 ` Francis Moreau
2009-03-24 12:44 ` Rupert Swarbrick
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Francis Moreau @ 2009-03-24 12:32 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
On Mar 24, 8:59 am, Tim X <t...@nospam.dev.null> wrote:
> Move point to the top left corner and set the mark
> Move point to the bottom right hand corner
> Hit C-x r r <reg> where <reg> is a register. This will copy the
> rectangle defined by the region into register <reg>
>
> Later, when you want to get that rectangle of text back, just hit C-x r
> i <reg> and the contents of <reg> will be pasted into the buffer where
> point is.
>
Now let say's I have the following text:
a/ this is a line
b/ this is a very long line
c/ a short one
and I want to copy the rectangle of this text without the a/ b/ c/
How do I move to the bottom right corner without adding space to the
last
line ?
thanks
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to do rectangular cut(visual block) in emacs
2009-03-24 12:32 ` Francis Moreau
@ 2009-03-24 12:44 ` Rupert Swarbrick
2009-03-24 12:52 ` Peter Dyballa
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Rupert Swarbrick @ 2009-03-24 12:44 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 801 bytes --]
Francis Moreau <francis.moro@gmail.com> writes:
> Now let say's I have the following text:
>
> a/ this is a line
> b/ this is a very long line
> c/ a short one
>
> and I want to copy the rectangle of this text without the a/ b/ c/
>
> How do I move to the bottom right corner without adding space to the
> last
> line ?
My personal solution? Use a normal M-w to plonk the whole list onto the
kill-ring, C-x C-b to a temporary buffer (I tend to use C-x C-b b RET),
yank the lot, use C-x r k to kill the starts of the lines and then C-w
the result and yank it to wherever it's needed.
There are probably swankier ways of doing it, but variants on this trick
solve all sorts of weird and wonderful layouts of stuff you want to
mangle.
Another solution would be C-M-% [a-z]/ RET RET of course.
Rupert
[-- Attachment #2: Type: application/pgp-signature, Size: 314 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to do rectangular cut(visual block) in emacs
2009-03-24 12:32 ` Francis Moreau
2009-03-24 12:44 ` Rupert Swarbrick
@ 2009-03-24 12:52 ` Peter Dyballa
[not found] ` <mailman.3905.1237899186.31690.help-gnu-emacs@gnu.org>
2009-03-25 9:11 ` Tim X
3 siblings, 0 replies; 9+ messages in thread
From: Peter Dyballa @ 2009-03-24 12:52 UTC (permalink / raw)
To: Francis Moreau; +Cc: help-gnu-emacs
Am 24.03.2009 um 13:32 schrieb Francis Moreau:
> How do I move to the bottom right corner without adding space to the
> last
> line ?
Two steps, two registers: one with lines #1 + #2, the other line #3.
Or vice-versa. Or you transpose line #1 and #2 or #2 and #3.
--
Greetings
Pete
Competition is the great eroder of profits.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to do rectangular cut(visual block) in emacs
[not found] ` <mailman.3905.1237899186.31690.help-gnu-emacs@gnu.org>
@ 2009-03-24 13:28 ` Francis Moreau
2009-03-24 15:29 ` poppyer
0 siblings, 1 reply; 9+ messages in thread
From: Francis Moreau @ 2009-03-24 13:28 UTC (permalink / raw)
To: help-gnu-emacs
On Mar 24, 1:52 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
> Am 24.03.2009 um 13:32 schrieb Francis Moreau:
>
> > How do I move to the bottom right corner without adding space to the
> > last
> > line ?
>
> Two steps, two registers: one with lines #1 + #2, the other line #3.
> Or vice-versa. Or you transpose line #1 and #2 or #2 and #3.
>
Another possibility would be to switch to a special mode (like picture-
mode) that would allow to move freely into a buffer and select and
copy the rectangle in this mode. The copy would dismiss any trailing
spaces.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to do rectangular cut(visual block) in emacs
2009-03-24 13:28 ` Francis Moreau
@ 2009-03-24 15:29 ` poppyer
0 siblings, 0 replies; 9+ messages in thread
From: poppyer @ 2009-03-24 15:29 UTC (permalink / raw)
To: help-gnu-emacs
Francis Moreau <francis.moro@gmail.com> writes:
: On Mar 24, 1:52pm, Peter Dyballa <PeterDyba...@Web.DE> wrote:
:> Am 24.03.2009 um 13:32 schrieb Francis Moreau:
:>
:> > How do I move to the bottom right corner without adding space to the
:> > last
:> > line ?
:>
:> Two steps, two registers: one with lines #1 + #2, the other line #3.
:> Or vice-versa. Or you transpose line #1 and #2 or #2 and #3.
:>
:
: Another possibility would be to switch to a special mode (like picture-
: mode) that would allow to move freely into a buffer and select and
: copy the rectangle in this mode. The copy would dismiss any trailing
: spaces.
If you are using emacs 23, M-x cua-set-rectangle-mark (default binding
C-RET) will be your friend.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to do rectangular cut(visual block) in emacs
2009-03-24 12:32 ` Francis Moreau
` (2 preceding siblings ...)
[not found] ` <mailman.3905.1237899186.31690.help-gnu-emacs@gnu.org>
@ 2009-03-25 9:11 ` Tim X
3 siblings, 0 replies; 9+ messages in thread
From: Tim X @ 2009-03-25 9:11 UTC (permalink / raw)
To: help-gnu-emacs
Francis Moreau <francis.moro@gmail.com> writes:
> Hello,
>
> On Mar 24, 8:59 am, Tim X <t...@nospam.dev.null> wrote:
>> Move point to the top left corner and set the mark
>> Move point to the bottom right hand corner
>> Hit C-x r r <reg> where <reg> is a register. This will copy the
>> rectangle defined by the region into register <reg>
>>
>> Later, when you want to get that rectangle of text back, just hit C-x r
>> i <reg> and the contents of <reg> will be pasted into the buffer where
>> point is.
>>
>
> Now let say's I have the following text:
>
> a/ this is a line
> b/ this is a very long line
> c/ a short one
>
> and I want to copy the rectangle of this text without the a/ b/ c/
>
> How do I move to the bottom right corner without adding space to the
> last
> line ?
>
You can't. You have to make it a rectangle. However, you can remove the
extra spaces afterwards.
Tim
--
tcross (at) rapttech dot com dot au
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-03-25 9:11 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-24 5:16 How to do rectangular cut(visual block) in emacs Anand Dhanakshirur
2009-03-24 5:12 ` Dirk-Jan C. Binnema
[not found] <mailman.3882.1237871267.31690.help-gnu-emacs@gnu.org>
2009-03-24 7:59 ` Tim X
2009-03-24 12:32 ` Francis Moreau
2009-03-24 12:44 ` Rupert Swarbrick
2009-03-24 12:52 ` Peter Dyballa
[not found] ` <mailman.3905.1237899186.31690.help-gnu-emacs@gnu.org>
2009-03-24 13:28 ` Francis Moreau
2009-03-24 15:29 ` poppyer
2009-03-25 9:11 ` Tim X
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).