Hot answers tagged

27

Different levels of "IDE-ness" exist for different languages, and unfortunately you're never going to get full IDE features without some configuration (if you don't like configuring things, you probably shouldn't use Emacs). CEDET aims to be a complete solution that covers all your needs for supported languages, but I've personally never gotten it working ...


15

I used this guide to get started using Emacs as a C++ IDE. It introduces Helm and Projectile which help answer a number of your questions. To wit, Projectile manages projects. It searches up the directory tree for a Makefile, SConstruct, Git repo, SVN repo, and perhaps some other build system or version control files to automatically learn what files are ...


9

Since you are asking for a full-featureed C/C++ IDE now, I might be qualified. I used all MS IDEs from vc4 to Visual Studio 2010, so I fully understand what you want. The good news is that Emacs could be 95% as good as Visual Studio, and it can do much more. but you might be not interested in the "more" part. So I will focus on your questions only. Now ...


5

For #4, I highly recommend exuberant-ctags and the built-in tags support, which I have used for years. Alternatively, I just recently have switched to using GNU Global and the ggtags package and have found them to be slightly superior; although, they function almost identically. Both work with nearly no configuration. For other IDE features, I also like the ...


4

Management of software "projects." I want my IDE to have a sense of all of the files that make up my current project so that I can perform functions like search-and-replace within my project. (It would be nice if I could also achieve this without littering my source tree with lots of support files. Why do I need more than one centralized project ...


4

The immediate difference is that setq-mode-local will also affect already existing buffers, whereas adding a setq-local to the mode hook will only affect future buffers. Of course, there are other differences due to the underlying mechanisms used, but I think to a first approximation, this is the only real difference.


3

Simplest method Assuming you're not worried about it not being available because the file is missing/in error (ignore-errors (load-file "~/.emacs.d/cedet/cedet-devel-load.el")) This will bypass the error and allow you to continue loading. Require instead of load Looking at cedet-devel-load.el on https://github.com/emacsmirror/cedet/blob/master/cedet-...


3

You can install irony-mode and see full information of each completion candidates; it looks like this. Alternatively, you can also use company-clang that comes with company that gives you something like previous screenshot. Note that to have something similar to the screenshot and using Irony, you have to install Company to install company-irony. If you want ...


3

See the manual: C-hig (emacs) Init File RET Use emacs --no-site-file to inhibit the site-start.el file, which is loaded before your init file, and which Debian is presumably using to load code from /etc/emacs/site-start.d/ Try M-x find-library RET site-start RET If that's not the one, then Debian may (more nicely) be using default.el which you can ...


2

The CEDET version currently shipped with Emacs is difficult to setup, but the one you can get on the official site is easier to setup, and could answer to your #2 and #4 needs. CEDET's EDE allows you to manage for example makefile and automake projects, adding targets to it, and associating files to targets. You can then compile your project using EDE ...


2

so why is this the only file missing? Because the CEDET guys feel that the Java support hasn't received enough attention (development, testing, adoption) to be ready for inclusion into Emacs. To use it, you'll have to install the upstream CEDET, or maybe Alex Ott's branch (see this question and answer). And what can I do to fix it? Show some activity ...


2

If your project uses cmake, cmake-ide is a good start. Or else, use company(auto completion)+counsel-gtags(code navigation)+global You can use helm-gtags instead of counsel-gtags. Both packages are developed by the same person. The difference is they are based on different completion frameworks (helm vs counsel/ivy). I think counsel/ivy is faster and more ...


1

neotree seems to offer the functionality you're after. It's the Emacs-y version of Vim's nerdtree and lets you see/navigate the files/sub-directories of a specific directory in tree-like fashion.


1

The cedet-gnu-global-version-check is defined within the cedet-global.el file, adding the (require 'cedet-global) statement solved my issue.


1

I have followed the directions at this blog which supplements the C ide stuff by Tudho to install rtags and irony (as suggested by Dmitry) and it provides the features I asked for. I'll expand with a summary of steps I had to take to get it all working on a Mac: Install a recent version of the clang compiler with macports (likely optional) Set environment ...


1

I ran emacs --debug-init and it pointed to the helm-ls-git package calling eieio-defclass-autoload. Removing helm-ls-git in the package manager solved the problem


1

Try library header2.el. It is simple but useful. You can tweak it for your own needs and for particular languages.


1

Following the advice of @zck and @wvxvw, I opened emacs using the -Q option, and this caused the errors not to appear. Hence, I concluded that the errors were raised within my .emacs file. Inside that file, I had the following lines: (load-file "~/cedet-1.0pre7/common/cedet.el") (global-ede-mode 1) (semantic-load-enable-code-helpers) (global-srecode-minor-...


1

The completion used in the screenshot is provide by semantic-ia-complete-symbol-menu function, but I doesn't know how to replace the default completion method. BTW you can map the method on C-TAB for example. (global-set-key (kbd "C-<tab>") 'semantic-ia-complete-symbol-menu) Hope this Help


1

Look into semantic modes. In particular, global-semantic-idle-summary-mode, which shows a summary of the symbol under point (including type information) in the echo area. Note that semantic is very powerful, but it still has limitations. Complex template code, for example, can confuse it. I don't do too much complex C++, so I've never seen it fail. The LLVM ...


1

My dev branch of CEDET has some extensions for better work with Java, like basic Maven & Ant support, etc. But it wasn't updated for at least a year - I plan to spend some time over the Christmas to sync it with current HEAD...


1

Before loading your locally installed package in your ~.emacs~, make sure to unload the site-wide installed package. The emacs-lisp function unload-feature is your friend. I do not which features provides CEDET in particular. For a system-wide installed auctex, however, you would do (unload-feature 'tex-site), for example.


1

As has been mentioned in pieces above, projectile (optionally with helm) is a brilliant solution for project management. Ycmd is great for code completion and some navigation, and the best client for it is emacs-ycmd (full disclosure: I wrote the emacs client.) For "tags" and indexing, the best overall solution I've found is codesearch (more disclosure: ...


1

I've been happy with CEDET from its source repo + ECB + gtags +cscope. That said, there are many suggestions on this post that I will be trying.


1

For #4, seems to be a new project called YouCompleteme, and the corresponding Emacs client which seems to be the next cool thing. Because it uses clang it has a better view of the code than tags or global.


Only top voted, non community-wiki answers of a minimum length are eligible