2

I have been using ESC-< or Alt-< to jump to the beginning of the file. After I added ggtags for source navigation, normally it works. But after I press Alt-. to find the declaration/definition of some method/class/variable, pressing ESC-< or Alt-< will instead navigate me back to the previous point from which I pressed Alt-. to navigate to the method or class.

I can still use Alt-g g 1 to go to the beginning of the file. But is there a way to still use ESC-< to go the beginning and assign different binding for ggtags to return to previous position?

Sujan

1

It looks like ggtags rebinds M-< to #'first-error in the keymap ggtags-navigation-map.

So we can unbind it there:

(define-key ggtags-navigation-map (kbd "M-<") nil)

And bind something else to it:

(define-key ggtags-navigation-map (kbd "C-M-<") #'first-error)

Obviously, you can pick another keybinding, as you prefer.

  • Thanks...I removed the binding and added a different key. – SujanKh Feb 23 '16 at 5:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.