ychaouche
ychaouche

Reputation: 5092

Jump to beginning of function in emacs

So you're in the middle of a 300 lines function, and want to know where the function declaration is.

How do you do this?

Upvotes: 17

Views: 4008

Answers (2)

jtahlborn
jtahlborn

Reputation: 53694

typically, i have the which-function minor mode enabled which displays the current function on the mode line (using this in my emacs config):

(require 'which-func)
(which-function-mode t)

Upvotes: 10

Oleg Pavliv
Oleg Pavliv

Reputation: 21192

M-C-a jumps to the beginning of the current function.

M-C-e jumps to the end of the current function

It works for elisp and c-derived languages (e.g. Java).

Upvotes: 21

Related Questions