简单的方法来定义函数(Emacs,Ocaml)

Sof*_*mur 9 emacs ocaml keyboard-shortcuts

我在Emacs下编码Ocaml ...

我想知道是否有跳转到函数定义的快捷方式(光标所在的位置).目前,这样做我在整个文件搜索功能的名称,或查找let the_name_of_the_functionlet rec the_name_of_the_functionand the_name_of_the_function这显然是乏味...

顺便说一下,我还有文件.annot.

有人可以帮忙吗?谢谢!

sar*_*old 5

ctags(1)(从exuberant-ctags包中)支持OCaml语言,Emacs ctags在执行时支持etags.

所以尝试:cd /path/to/Ocaml/sources/ && etags -R .构建一个索引,然后在其中emacs,M- .ret搜索光标下的标记.

  • 更新了答案:您需要从包含所有源的目录中运行`etags -R .`. (2认同)