c - 在Emacs中进行C开发时如何跳转到函数?

标签 c function emacs keyboard-shortcuts

我在 Emacs 中进行 C 开发。如果我打开了一个包含多个函数的源文件,并且“标记”在函数调用中,例如int n = get_number(arg); 有什么办法可以“跳转到”那个函数的实现吗?例如到 int get_number(int *arg) { ... }

我在 Eclipse 中做过一些 Java 开发,但缺少此功能,因为我不习惯 Emacs,但我想学习。

最佳答案

您必须创建一个标签文件。
在 Unix 下,您有 etags 程序可以理解 CC++Java... 和创建一个可以被 Emacs 使用的 tag 文件。

这相当old page (2004) 提供了更多信息。

To jump to a function use M-. (that’s Meta-Period) and type the name of the function. If you simply press enter Emacs will jump to the function declaration that matches the word under the cursor.

关于c - 在Emacs中进行C开发时如何跳转到函数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4944774/

相关文章:

c - 文件可视化 map

c - C 战列舰,随机舰船放置

javascript - 如何更改函数以接受不同类型作为参数

php - MySQL 函数在 PHP 中返回难以使用的结果

python - 如何将 pipenv python 作为 emacs Python shell 运行

c++ - 在 CMake Env 中包含 libcurl

c - 设置位和将逻辑一个位写入位有什么区别?

mysql - 使用 MySQL 函数将字符串的第一个字符移动到字符串的末尾

emacs - 在Emacs中打开: No connection could be made because the target machine actively refuse it

c++ - 在 Emacs for C++ 中更改制表符空间和热键