简体   繁体   English

Emacs:当前源缓冲区中的函数列表

[英]Emacs: list of functions in current source buffer

SublimeText2 has a command Command+R (on the mac) that shows a list of functions in the current buffer. SublimeText2有一个命令Command + R(在mac上),显示当前缓冲区中的函数列表。 For example, i'm editing C code, then command+R opens a hovering window with the list of functions in the current source. 例如,我正在编辑C代码,然后命令+ R打开一个悬停窗口,其中包含当前源中的函数列表。

Does have emacs have something similar. emacs是否有类似的东西。 I know it can be coded, but has it? 我知道它可以编码,但有吗?

I guess one could use clang to output the function definitions and their line numbers, put this in new buffer with links to the original source. 我想可以使用clang输出函数定义及其行号,将其放在带有原始源链接的新缓冲区中。

But how? 但是怎么样?

It's imenu . 这是imenu Use imenu-add-menubar-index and then in the menu is a list of functions. 使用imenu-add-menubar-index ,然后在菜单中列出一系列功能。 Works for c-mode . 适用于c-mode Let's see if it works for R mode ... 让我们看看它是否适用于R模式......

You can use imenu as mentioned by Sapsi I like to use it with one of the completition libraries, for example with ido: https://gist.github.com/magnars/2360578 or with helm with helm-imenu 您可以使用imenu由Sapsi提到我喜欢IDO与completition库来使用它,例如: https://gist.github.com/magnars/2360578helmhelm-imenu 掌舵-i菜单

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM