4 ms·
The one thing that keeps me from moving lightweight editors like vim or emacs from the bloated IDE stuff if the ability to easily find definitions, etc. If I ha
by non-entity 7y ago
The one thing that keeps me from moving lightweight editors like vim or emacs from the bloated IDE stuff if the ability to easily find definitions, etc. If I have hundreds or thousands of source files and I want to find the definition of say a struct or function, being able to right click->go to definition or similar is a godsend. Maybe emacs or vim have similar features via plugins though? I'm not sure.
- dmortin 7y agoIt's a pretty basic feature, so of course they can do that, and now with language servers they can do even more. What they usually can't do is the more involved stuff, like refactoring, because there is no company who pays people to implement these for emacs/vim.
- fulafel 7y agoYou can do refactoring in Emacs for many languages with packages like js2-refactor, clj-refactor, etc. It's language-specific. It's true that funding is important. CIDER has benefited from this system: https://www.clojuriststogether.org/projects/ https://www.clojuriststogether.org/projects/
- jacktasia 7y agoMy package dumb-jump might be what you want: https://github.com/jacktasia/dumb-jump https://github.com/jacktasia/dumb-jump
- dgtized 7y agoThis functionality is provided by `xref-find-definition`[1]. For many languages this defaults to using keywords from a generated tags index file, but many modes have a language server or some other more specific facility to provide this functionality at runtime. I'm not familiar with what provides that functionality for C/C++, but Ruby has `robe`, python has `jedi`, clojure has `cider`, rust has `racer`, etc. It generally requires a some setup for each language you use, but there is broad support for this functionality (and it often provides some form of symbol auto-completion as well). Some modes also support limited refactoring tools[2], but that's not quite as common. [1] https://www.gnu.org/software/emacs/manual/html_node/emacs/Xref.html https://www.gnu.org/software/emacs/manual/html_node/emacs/Xr... [2] https://github.com/clojure-emacs/clj-refactor.el https://github.com/clojure-emacs/clj-refactor.el, https://github.com/Wilfred/emacs-refactor https://github.com/Wilfred/emacs-refactor, https://www.emacswiki.org/emacs/SemanticRefactor https://www.emacswiki.org/emacs/SemanticRefactor
- deleted 7y ago[deleted]
- alxlaz 7y agoThere's a bunch of "plugins" for Emacs (and vim, I guess, that provide that, but I wouldn't know). xcscope largely does what I want and I've successfully used it on very large codebases (think Linux kernel + vendor-supplied HAL + a very large amount of userspace code). It's hard to beat an IDE on a large, disorganised codebase though, I'd lie if I said I only use Emacs and never reach out for an IDE.
- non-entity 7y agoThat sounds like it might work. The recent instance that I ran into was working on an OS kernel, where I wanted to jump interface definitions that might be in different directories
- guest2143 7y agousing vim for go-to-definition, `gd` takes you to local definition, `gD` to global, q.v. :help gd I find it often quicker than an IDE..
- jwkane 7y agolightweight editors like emacs... The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.
- harrygeez 7y agoThanks to the Language Server Protocol (LSP) pioneered by VSCode, that is no longer the case. Emacs has a great lsp client (lsp-mode) and you get all the capabilities of modern text editors. It's a great time to be alive
- flukus 7y agoA simple one that works out of the box (I think) with vim is ctags, install it and run "ctags -R" in the code directory. Then in vim hit "ctrl-]" when your over a name to jump to it, hit "ctrl-o" take you back up a level. It's not as sophisticated as an IDE, but it works with practically any language and is easy to customize.