Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


This 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/Xr...

[2] https://github.com/clojure-emacs/clj-refactor.el, https://github.com/Wilfred/emacs-refactor, https://www.emacswiki.org/emacs/SemanticRefactor


My package dumb-jump might be what you want:

https://github.com/jacktasia/dumb-jump


It's easily the best zero-configuration, nigh any language symbol locator, for _any_ editor or IDE.


Thank you for that package!


Thanks 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


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


Ahh. "Eight Megabytes And Constantly Swapping".

Happy sigh...those were the days :-)


Is Emacs Lews Therin Telamon?


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


That 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


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


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


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


You 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/




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: