在Emacs中,如何在当前文件中的函数之间跳转? [英] In Emacs, how can I jump between functions in the current file?

查看:231
本文介绍了在Emacs中,如何在当前文件中的函数之间跳转?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想快速转到Emacs缓冲区中的一个功能。我想运行一些函数,并得到一个提示,要求我的函数名,并为当前缓冲区中定义的每个函数提供完成。



我一般使用etags导航,但有时我正在寻找一个框架方法,被覆盖在几个文件。在这些情况下,我可以找到我需要的文件,但我想快速跳转到那里的功能。 TextMate中有一个类似的功能,您可以从编辑器右下角的列表中选择一个定义。

解决方案

跳过当前文件中的功能?使用 imenu 。这是迄今为止列出的所有替代品中最简单和最轻的一个,可能足以满足您的需求。它也内置在Emacs中,具有最小的设置麻烦。它具有图形和文本界面。任何额外的,你会更好地使用这里提出的其他一些很好的建议。


I'd like to quickly move point to a function in my Emacs buffer. I'd like to run some function and get a prompt asking me for the function name, with completion provided for every function defined in the current buffer.

I generally use etags to navigate around, but sometimes I'm looking for a framework method that's been overridden in several files. In these cases, I can find the file I need but then I'd like to quickly jump to the function there. There is a similar feature in TextMate where you can select a definition from a list in the bottom right of the editor.

解决方案

Just to jump around functions in the current file? Use imenu. It's the simplest and lightest of all the alternatives listed so far and might be enough for what you want. It's also built into Emacs and has minimum setup hassle. It features graphical and textual interfaces. Anything extra and you'll be better off using one of the other excellent suggestions made here.

这篇关于在Emacs中,如何在当前文件中的函数之间跳转?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆