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 ...


20

I ran into a similar issue with emacs, so I made Dumb Jump. I tried many of the solutions mentioned in the accepted answer, but I always ran into one or more of the following issues: Solution only worked for a single programming language Solution required an index (TAG) file or persistent process I badly wanted a solution that "just worked" and didn't ...


20

I'm going to be conservative and say no, Emacs is not a drop-in replacement for Eclipse (especially not out of the box). However, that doesn't mean that it's not suitable for Java development. Since you are already familiar with Eclipse I suggest you have a look at eclim: Eclim provides the ability to access Eclipse code editing features (code completion,...


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 ...


14

You can jump to any definition/reference of entire project as large as Linux kernel source tree (more than 36k) in an instant. See my C/C++ guide for details. For C/C++, I suggest using GNU Global that supports C, C++, Yacc, Java, PHP4 and assembly. The key is, if you want to have IDE features of a language, you have to install plugin of that language. Here ...


11

Emacs/eclim has been my primary Java IDE for the last couple of years and would say it works fairy well, even with large code bases (my current emacs/eclim workspace has more than 4000 Java files). It's true that emacs-eclim requires the file to be saved before making its call to eclimd, but it's not that big of a problem IMO. The editing experience is still ...


10

In Dired you can include a subdirectory using i, with the cursor on the subdir line. You can do likewise on a subdir line within a subdir listing, so you can list any number of levels of any number of subdirs in the same Dired buffer. $ on a subdir-listing header line hides/shows that subdir listing. So it corresponds more or less with the expand/contract ...


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 ...


9

At this point(2018), LSP Java(https://github.com/emacs-lsp/lsp-java) is pretty good. Few of the features: Autocomplete Refactoring (extract method, rename, implement interface, extract local, extract constant and so on.) Auto import Code navigation while working on multiple projects Find references, implementations, open type. Maven/Gradle project import, ...


8

That's a lot of questions, but I will try to answer them in such a way that you can look up all the answers in detail. Emacs is primarily a text editor; you will use it to edit your C++ files. Converting those files into a program that your computer can run is the job of a compiler. There are many C++ compilers, but you will want to use one called gcc. ...


5

Thanks to @Dmitry's comment above, I was able to resolve this issue by configuring the default plugins for Tern. In the tern file from the repo under bin/tern, I edited the default plugins here: var defaultConfig = { libs: [], loadEagerly: false, plugins: {"commonjs":{}, "node":{}, "requirejs":{}, "node_resolve":{}}, ecmaScript: true, ecmaVersion:...


5

If you want to customize per project basis, you can create a setup.cfg with custom config like this [flake8] max-line-length = 160 If you want to change this globally, you can change flake8 config as mentioned here https://flake8.readthedocs.io/en/latest/config.html#global


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 primary solution for this in emacs is using TAGS files, which are created by programs such as etags or gtags. I myself use (and recommend) exuberant ctags, and etags-select.el to help you narrow down destinations when the search symbol lies in multiple destinations. The supported languages are quite numerous, see the individual tools' manuals. There is ...


3

dired-subtree is an option and looks as follows: If using use-package, you can enable in your init.el and bind to TAB and SHIFT-TAB with: (use-package dired-subtree :ensure t :after dired :config (bind-key "<tab>" #'dired-subtree-toggle dired-mode-map) (bind-key "<backtab>" #'dired-subtree-cycle dired-mode-map)) I wrote a little about ...


3

Dunno exactly what constitutes a "project" in your context, but have a look at desktop bookmarks, with Bookmark+. An Emacs desktop records (and subsequently restores) the kinds of thing you mention: frames, windows, buffers (open files etc.), variable values,... With only vanilla Emacs, people tend to use only a single desktop, and they use it only to save ...


3

For code completion, I suggest you to use irony-mode along with company-irony. You can easily get them from MELPA. When you finished installing, you have to build Irony server with M-x irony-install-server. You also have to add a .clang_complete file at the project root path with compile flags for including source header paths, so Irony can use that ...


3

CEDET is a complete package that is supposed to give Emacs IDE features comparable to Visual Studio or Eclipse. It has a reputation for being fairly complicated to set up, but there are a lot of tutorials on it in both web page and YouTube form: here's one that looks pretty easy to follow. Alternatively, if all you want is auto-suggestion of member ...


3

Elpy can do this with elpy-goto-definition (bound to M-. by default).


3

For folding, I use Hideshow mode (built-in) with Hydra like this: (global-set-key (kbd "M-F") (defhydra hydra-fold (global-map "M-F") "Fold" ("h" hs-hide-all "hide all") ("s" hs-show-all "show all") ("f" hs-toggle-hiding "toggle"))) To mark the current function, press C-M-h to run mark-defun. These work for nearly any language.


3

Here is a bare-bones minimum viable function, which I hope does what you want. (defun wjh3pane-create-3pane-layout () "Create 3-pane layout of windows in the current frame. Layout is as follows: |--------------------------------------| | source code buffer | | source code buffer | | source ...


3

The layer for idris in Spacemacs use this https://github.com/idris-hackers/idris-mode. So for my part, using spacemacs and helm, I succesfully load a file using contrib using the following shortcut: SP+: idris-set-idris-load-packages + RET contrib + RET CTR + RET


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

http://cedet.sourceforge.net/speedbar.shtml Speedbar is an Emacs Lisp program which allows you to create a special skinny frame with a specialized directory listing in it. This listing will have both directories and filtered files in it. You can then load files into your emacs frame, or expand the files to display all the tags that are in them and jump to ...


2

Elpy knows of two "roots" for your directory, the "project root" and the "library root". The project root is used for file searches and similar, while the library root is the directory added to sys.path. In your example, my_project/ should be the project root, while my_project/src/ should be the library root. You can verify this using M-: (elpy-project-root)...


2

Python: https://github.com/python-rope/ropemacs https://github.com/jorgenschaefer/elpy (also base on rope) C++: https://github.com/tuhdo/semantic-refactor https://github.com/thoni56/c-xrefactory


1

The following code demonstrates the direct use of semantic for jumping to tags. Make sure you configured semantic-c-dependency-system-include-path right. The following code displays the tag in another buffer. You can adapt the code to jump to the tag if you really want that. There should already exist something like that. But, I did not find it. (defun ...


1

Here is the easy solution for newbies. It works at Linux/OSX/Cygwin (should work at Windows, but I don't develop at Windows). The setup is minimum. You need install GNU Global and two Emacs plugins: company for code completion (https://github.com/company-mode/company-mode) emacs-helm-gtags for code navigation (https://github.com/syohex/emacs-helm-gtags) ...


1

Both packages are available in melpa. You can follow instructions on how to add this repo: (require 'package) ;; You might already have this line (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) (when (< emacs-major-version 24) ;; For important compatibility libraries like cl-lib (add-to-list 'package-archives '("...


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