unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Can I type text without changing my current cursor point?
@ 2009-03-11 17:01 ithiel
  0 siblings, 0 replies; 4+ messages in thread
From: ithiel @ 2009-03-11 17:01 UTC (permalink / raw)
  To: Help-gnu-emacs


I'm almost sure I saw this once, I just can recall the sequence. 
What I want to do is to hit C+something and then type but have my cursor
stay in its current point and not move forward. Then I can somehow exit this
mode (ESC) and type some text which will be inserted in between. This could
be useful to type a prefix, a suffix and then the content without having to
move the cursor back. 

TIA :) 
-- 
View this message in context: http://www.nabble.com/Can-I-type-text-without-changing-my-current-cursor-point--tp22459647p22459647.html
Sent from the Emacs - Help mailing list archive at Nabble.com.





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

* Can I type text without changing my current cursor point?
@ 2009-03-12  6:46 ithai levi
  2009-03-12 10:29 ` dIbMx2
       [not found] ` <mailman.3006.1237105211.31690.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 4+ messages in thread
From: ithai levi @ 2009-03-12  6:46 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 632 bytes --]

I'm almost sure I saw this once, I just can recall the sequence.
What I want to do is to hit C+something and then type but have my cursor
stay in its current point and not move forward. Then I can somehow exit this
mode (ESC) and type some text which will be inserted in between. This could
be useful to type a prefix, a suffix and then the content without having to
move the cursor back.
Example:

I would type "obj.method(" then press C+? then type "); // a comment", press
ESC and type "1,2,3" without moving the cursor.

(what I do now is use C+SPC to set the mark, type and then press C+x C+SPC
to go back to the mark)

TIA :)

[-- Attachment #2: Type: text/html, Size: 1417 bytes --]

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

* Re: Can I type text without changing my current cursor point?
  2009-03-12  6:46 Can I type text without changing my current cursor point? ithai levi
@ 2009-03-12 10:29 ` dIbMx2
       [not found] ` <mailman.3006.1237105211.31690.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 4+ messages in thread
From: dIbMx2 @ 2009-03-12 10:29 UTC (permalink / raw)
  To: ithai levi; +Cc: help-gnu-emacs

ithai levi <ithai.levi@gmail.com> writes:

> I'm almost sure I saw this once, I just can recall the sequence. 
> What I want to do is to hit C+something and then type but have my cursor stay in its current point
> and not move forward. Then I can somehow exit this mode (ESC) and type some text which will be
> inserted in between. This could be useful to type a prefix, a suffix and then the content without
> having to move the cursor back. 
>
> Example:
>
> I would type "obj.method(" then press C+? then type "); // a comment", press ESC and type "1,2,3"
> without moving the cursor.
>
> (what I do now is use C+SPC to set the mark, type and then press C+x C+SPC to go back to the mark)
>
> TIA :)

cua-set-rectangle-mark   C+return




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

* Re: Can I type text without changing my current cursor point?
       [not found] ` <mailman.3006.1237105211.31690.help-gnu-emacs@gnu.org>
@ 2009-03-15 18:25   ` B. T. Raven
  0 siblings, 0 replies; 4+ messages in thread
From: B. T. Raven @ 2009-03-15 18:25 UTC (permalink / raw)
  To: help-gnu-emacs

dIbMx2 wrote:
> ithai levi <ithai.levi@gmail.com> writes:
> 
>> I'm almost sure I saw this once, I just can recall the sequence. 
>> What I want to do is to hit C+something and then type but have my cursor stay in its current point
>> and not move forward. Then I can somehow exit this mode (ESC) and type some text which will be
>> inserted in between. This could be useful to type a prefix, a suffix and then the content without
>> having to move the cursor back. 
>>
>> Example:
>>
>> I would type "obj.method(" then press C+? then type "); // a comment", press ESC and type "1,2,3"
>> without moving the cursor.
>>
>> (what I do now is use C+SPC to set the mark, type and then press C+x C+SPC to go back to the mark)
>>
>> TIA :)
> 
> cua-set-rectangle-mark   C+return
> 
> 

obj.method("C-spc"); // comment C-x C-x will put you after the first 
quotation mark via exchange-point-and-mark-nomark. This isn't exactly 
the same as pop-global-mark, which you are using now. C-x C-x is 
slightly easier than C-x C-spc. I put it on one keychord with:

(global-set-key [(super <SPC>)] 'exchange-point-and-mark-nomark)

but I'm a little hazy on the vector notation. The .... -nomark feature 
may be an artifact of pc-selection-mode.

Ed


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

end of thread, other threads:[~2009-03-15 18:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-12  6:46 Can I type text without changing my current cursor point? ithai levi
2009-03-12 10:29 ` dIbMx2
     [not found] ` <mailman.3006.1237105211.31690.help-gnu-emacs@gnu.org>
2009-03-15 18:25   ` B. T. Raven
  -- strict thread matches above, loose matches on Subject: below --
2009-03-11 17:01 ithiel

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).