的Emacs自动完成的话如何包括C文件? [英] Emacs how to auto-complete words of include files on C?

查看:129
本文介绍了的Emacs自动完成的话如何包括C文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能让Emacs的完成的话是用C头文件?

How can I make Emacs to complete words that are in C include files ?

#include <stdio.h>
int main(){
print//<-- this is where I want it to complete printf

什么是最简单的方法是什么? (比 CEDET 简单的东西)

推荐答案

首先为源标签,包括您希望能够自动完成的文件。看我为在使用标签如果你没有使用之前变量表。

First generate tags for the source and include files you'd like to be able to autocomplete for. See my blogpost for tips on using tags if you didn't use tag tables before.

现在,如果你有一个包含stdio.h中一个标签表,那么你可以使用命令`完整标签自动完成的printf'。

Now if you have a TAGS table that includes the stdio.h, then you can autocomplete 'printf' using the command `complete-tag'.

也许`完整的标签'绑定到一个关键的:

Perhaps bind `complete-tag' to a key:

(global-set-key [f3] 'complete-tag)

这篇关于的Emacs自动完成的话如何包括C文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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