我正在Emacs下编码Ocaml ...
我想知道是否存在跳转到函数定义(光标所在的位置)的快捷方式。目前,要做到这一点,我必须在整个文件中搜索该函数的名称,或者寻找显然很乏味的let the_name_of_the_function
和let rec the_name_of_the_function
和and the_name_of_the_function
...
顺便说一下,我已经分配了文件.annot
。
有人可以帮忙吗?谢谢!
最佳答案
我的ctags(1)
(来自exuberant-ctags
包)支持OCaml语言,当Emacs作为ctags
执行时,Emacs也支持etags
。
因此,请尝试:cd /path/to/Ocaml/sources/ && etags -R .
建立索引,然后在emacs
中,使用M-.ret在光标下搜索标签。
关于emacs - 转到函数定义的简单方法(Emacs,Ocaml),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8119223/