all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Shift regions.
@ 2008-10-22  4:58 Wei Weng
  2008-10-22  7:53 ` Xah
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Wei Weng @ 2008-10-22  4:58 UTC (permalink / raw)
  To: help-gnu-emacs

Hi All.

How do I shift a highlighted/marked region a tab to right/left?

Thanks
Wei



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Shift regions.
  2008-10-22  4:58 Shift regions Wei Weng
@ 2008-10-22  7:53 ` Xah
  2008-10-22  8:39 ` Jan Seeger
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Xah @ 2008-10-22  7:53 UTC (permalink / raw)
  To: help-gnu-emacs

On Oct 21, 9:58 pm, Wei Weng <ww...@acedsl.com> wrote:
> Hi All.
>
> How do I shift a highlighted/marked region a tab to right/left?

perhaps the following is what u mean?

Q: How to add a prefix to every line? (such as # or //)

Mark (Ctrl+Space) the beginning of first line and move cursor to the
beginning of the last line, then do “Alt+x string-rectangle” (Ctrl+x r
t), then type what you want to insert. This command can be used to
insert a string across mulitple lines not just at their beginning
position, but any position in a block of lines.

Alternatively, you can select a region and do “Alt+;” to make the
region into a comment or uncomment block specific to your language's
mode.

Q: How to delete the first few n chars of every line?

Mark (Ctrl+Space) the beginning of first line and move cursor to the
last line, and move it to the right n chars. Then do “Alt+x kill-
rectangle” (Ctrl+x r k). This command can be used to delete any
rectangular block of text, not just at the beginning of lines.

There's also
indent-region and indent-rigidly.

I have some emacs tutorial on my website you might be interested.

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Shift regions.
  2008-10-22  4:58 Shift regions Wei Weng
  2008-10-22  7:53 ` Xah
@ 2008-10-22  8:39 ` Jan Seeger
  2008-10-22  8:40 ` Jan Seeger
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Jan Seeger @ 2008-10-22  8:39 UTC (permalink / raw)
  To: help-gnu-emacs

At Wed, 22 Oct 2008 00:58:37 -0400,
Wei Weng wrote:
> 
> Hi All.
> 
> How do I shift a highlighted/marked region a tab to right/left?

Select the region you want to open and press C-x r o. Looks like this:

Text
Text
Text
TexM

where the M is the mark. Press C-x r o and you get:

   Text
   Text
   Text
   TexM

Regards,
Jan Seeger




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Shift regions.
  2008-10-22  4:58 Shift regions Wei Weng
  2008-10-22  7:53 ` Xah
  2008-10-22  8:39 ` Jan Seeger
@ 2008-10-22  8:40 ` Jan Seeger
  2008-10-22  8:49 ` Jan Seeger
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Jan Seeger @ 2008-10-22  8:40 UTC (permalink / raw)
  To: help-gnu-emacs

At Wed, 22 Oct 2008 00:58:37 -0400,
Wei Weng wrote:
> 
> Hi All.
> 
> How do I shift a highlighted/marked region a tab to right/left?

Select the region you want to open and press C-x r o. Looks like this:

Text
Text
Text
TexM

where the M is the mark. Press C-x r o and you get:

   Text
   Text
   Text
   TexM

Regards,
Jan Seeger




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Shift regions.
  2008-10-22  4:58 Shift regions Wei Weng
                   ` (2 preceding siblings ...)
  2008-10-22  8:40 ` Jan Seeger
@ 2008-10-22  8:49 ` Jan Seeger
  2008-10-22 10:17 ` Bernardo Bacic
  2008-10-22 12:46 ` Parker, Matthew
  5 siblings, 0 replies; 7+ messages in thread
From: Jan Seeger @ 2008-10-22  8:49 UTC (permalink / raw)
  To: help-gnu-emacs

At Wed, 22 Oct 2008 00:58:37 -0400,
Wei Weng wrote:
> 
> Hi All.
> 
> How do I shift a highlighted/marked region a tab to right/left?

Select the region you want to open and press C-x r o. Looks like this:

Text
Text
Text
TexM

where the M is the mark. Press C-x r o and you get:

   Text
   Text
   Text
   TexM

Regards,
Jan Seeger




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Shift regions.
  2008-10-22  4:58 Shift regions Wei Weng
                   ` (3 preceding siblings ...)
  2008-10-22  8:49 ` Jan Seeger
@ 2008-10-22 10:17 ` Bernardo Bacic
  2008-10-22 12:46 ` Parker, Matthew
  5 siblings, 0 replies; 7+ messages in thread
From: Bernardo Bacic @ 2008-10-22 10:17 UTC (permalink / raw)
  To: help-gnu-emacs


> 
> How do I shift a highlighted/marked region a tab to right/left?

M-x indent-rigidly (C-x TAB)




^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Shift regions.
  2008-10-22  4:58 Shift regions Wei Weng
                   ` (4 preceding siblings ...)
  2008-10-22 10:17 ` Bernardo Bacic
@ 2008-10-22 12:46 ` Parker, Matthew
  5 siblings, 0 replies; 7+ messages in thread
From: Parker, Matthew @ 2008-10-22 12:46 UTC (permalink / raw)
  To: Wei Weng, help-gnu-emacs


*** Column editing (cua-mode)

***** demo video
      http://www.vimeo.com/1168225?pg=embed&sec=1168225

***** documentation
 
http://www.gnu.org/software/emacs/manual/html_node/emacs/CUA-bindings.ht
ml

***** use
    start cua-mode => M-x cua-mode
    turn off cua key-bindings => (setq cua-enable-cua-keys nil)
    create a rectange => C-enter
    exit a rectange => C-g
    change rectange =>  use movement keys
    change corner (clockwise) => RET
    insert text 
      move cursor
      type
      insert point depends on outer edge of rect
    delete whole rectange =>  DELETE
    delete one col outside the rect, on side of cursor => Backspace
    cut/copy with C-x or C-c (i think this will be turned off)
    insert sequence => ESC n



Matthew Parker

SEI  | 1 Freedom Valley Drive | Oaks, PA 19456 | p: 610-676-1279 | f:
484-676-1279 | www.seic.com
> -----Original Message-----
> From: help-gnu-emacs-bounces+mparker=seic.com@gnu.org
[mailto:help-gnu-
> emacs-bounces+mparker=seic.com@gnu.org] On Behalf Of Wei Weng
> Sent: Wednesday, October 22, 2008 12:59 AM
> To: help-gnu-emacs@gnu.org
> Subject: Shift regions.
> 
> Hi All.
> 
> How do I shift a highlighted/marked region a tab to right/left?
> 
> Thanks
> Wei





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-10-22 12:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-22  4:58 Shift regions Wei Weng
2008-10-22  7:53 ` Xah
2008-10-22  8:39 ` Jan Seeger
2008-10-22  8:40 ` Jan Seeger
2008-10-22  8:49 ` Jan Seeger
2008-10-22 10:17 ` Bernardo Bacic
2008-10-22 12:46 ` Parker, Matthew

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.