开发者

How to navigate to erlang function in emacs by name?

I use emacs-mode. How can I navigate to function definition by name? Emacs has "imenu-add-to-menubar" command but it's not convenient way because I h开发者_运维技巧ave to select function name from menu.

Thank you!


You could use M-x imenu directly—it works only within the current file, though. I bind it to Super-i in my .emacs with:

(global-set-key [(super ?i)] 'imenu)


Distel package has erl-find-source-under-point function, that is bound to M-. key You can read more about work with Erlang from Emacs in my article


Erlang is one of the many languages supported by tags. The Erlang docs show that you just build the tags file with:

find . -name "*.[he]rl" -print | etags -

Once you have a TAGS file, you just use M-., which calls 'find-tag. This enables jumping to a function name from anywhere.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜