本文介绍了Emacs作为大型C ++项目的IDE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Emacs的新手。我不得不试图搜索如何使用Emacs用于大型C ++项目,特别是索引代码和自动完成函数名称和行为类似Eclipse。我一直在使用Vim一段时间,在那里我使用ctags索引代码在我的项目和Vim用来尝试自动完成我的代码使用下拉菜单的选项。我现在试图实现与Emacs相同。但是,在我的搜索,结果指向CEDET和自动完成和其他第三方插件。



我尝试使用 ctags -e -R。和etags的ctags,但没有成功。 p>

我缺少Emacs的默认方式来实现相同的行为?

解决方案

我使用CEDET与自动完成功能成功。基本上,自动完成是下拉框提供程序,它从各种东西,最有趣的是从CEDET(但也从etags和Gnu Global,我也推荐),它的来源。



CEDET的一个良好起点是



Alex Ott的emacs配置是: - 这是一个有用的资源。



请注意,您需要获取CEDET从bzr,并正确安装/配置自动填充。我强烈建议el-get安装自动完成(和其他一些东西)。您需要为EDE设置通用项目,使自动完成功能适用于不属于结构化EDE项目的随机C / C ++文件。



您必须花费一些时间配置emacs,但它支付。一旦正确设置,该工具的效果就会惊人。


I am a Emacs newbie. I have to trying to search on how to use Emacs for use with large C++ projects particularly to index code and auto-complete function names and behave Eclipse-like. I had been using Vim for some time where I used ctags to index code in my project and Vim used to try auto-completing my code using a drop down menu of options. I am trying to achieve the same with Emacs now. But, during my search, results pointed to CEDET and auto-complete and other 3rd party plugins.

I tried to use ctags with ctags -e -R . and etags, but with no success.

Am I missing a default way of Emacs to achieve the same behavior? Which is the best and easiest way to achieve what I want?

解决方案

I use CEDET with autocomplete successfully. Basically, autocomplete is the drop-down box provider, and it takes its sources from various things, most interestingly from CEDET (but also from etags and Gnu Global, which I recommend too).

A good starting point for CEDET is http://alexott.net/en/writings/emacs-devenv/EmacsCedet.html

Alex Ott's emacs config is there: https://github.com/alexott/emacs-configs -- it's an useful resource.

Note that you'll need to grab CEDET from bzr, and install/configure autocomplete correctly. I strongly recommend el-get to install autocomplete (and some other stuff too). You'll need to set up generic projects for EDE to have autocompletion working for random C/C++ files not part of a structured EDE project.

You'll have to spend some time to configure emacs, but it pays off. The tool is amazingly productive once set up correctly.

这篇关于Emacs作为大型C ++项目的IDE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 15:20