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

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

Re: Tips for quick jumping back and forth


From: Andreas Röhler
Subject: Re: Tips for quick jumping back and forth
Date: Sat, 07 Jul 2012 08:45:36 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120601 Thunderbird/13.0

Am 07.07.2012 07:43, schrieb C K Kashyap:
Dear Emacs friends,

I need some tips for quick jumping around. As in, say I'm editing a line
and need to go up a couple of paragraphs to edit something and then resume
at my original position.
The way I used to accomplish this in Vi was using mm to mark the current
position into m register and then go somewhere and come back by pressing 'm

Now, I know that in emacs I can do it using C-x-r-<SPC> to mark a position
into a register and then jump back to it usng C-x-r-j ... is there a better
way? Rather, what's a better way?

Regards,
Kashyap


use a couple of hard-coded register-commands which got keys

for example

(global-set-key [(control kp-1)] 'gehe-zu-register-x)

with (control u) (control kp-1) the point is registered

(control kp-1) will jump back to it

(defun gehe-zu-register-x (&optional arg)
  "With C-u remember buffer and point"
  (interactive "P")
  (if arg
      (progn
        (window-configuration-to-register ?x)
        (message "%s" "Jump back with \[C-kp-1] or \\C-x j x"))
    (jump-to-register ?x)
    (message "%s"   "With Arg: remember point and buffer")))


Cheers,

Andreas



reply via email to

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