Dumb-jump: an Emacs “jump to definition” package
github.com
github.com
BTW, did you know that you can just do README.org and github parses it? I noticed that you have org file checked in, but README is in md. For example see https://github.com/kozikow/keyremaplinux .
> Dumb Jump uses The Silver Searcher ag (and falls back to grep) ... [and] a set of regular expressions
If you're going to install ag, you might as well install universal-ctags[1], a revival of ctags with many improved and new parsers. It allowed me to discard my C and javascript ctags config entirely.
Combined with gutentags[2] you have a "just works" and "Less Dumb" setup.
I have rtags set up, but it periodically stops working (too many parsing errors, indexer crashes, etc) or it is just slow, then I fall back to ag. It can search a ~1M lines C++ codebase in seconds (and you can start browsing the results while the search is in progress of course). Of couse it also works if you do not have a project setup, or you just switched to a wildly diverged git branch.
I'm definitely going to try this dumb-jump.
Respond to this comment if you need pointers on how to set things up.
The only problem with ag is that it can't find definitions until you save the buffer to a file. Not that ctags does any better. Some tool running inside emacs could do that too but it's not so important.
One other thing no other tool does (AFAIK) is that you can get a "call hierarchy" for a function or any variable and it's laid out as a tree and you can expand each node to trace the calls. This makes understanding the code and refactoring faster by an order of magnitude.
I have avoided Eclipse for years because of cpu/memory usage, but ever since I got a computer with Intel i7 CPU and 16GB of RAM, I have completely switched to Eclipse because it makes me so much more productive than any other environment I tried.
Whenever the point is over a word in a C++ codebase, e.g. FooSystem, it will be underlined, and you can click on it and jump to definition, show all references, etc. Then if you type Foo, CompanyMode should pop up a dialog box that will autocomplete FooManager.
I think you can also install a fuzzy matching package for CompanyMode which allows you to type e.g. "FSy" to complete "FooSystem", though I may be confusing Helm and CompanyMode.
You may also want to check out the Projectile package. It's for large project navigation, and I think it helps with automatically running ETags / GTags on an as-needed basis.
I wrote an article that should be introduction to CEDET: http://alexott.net/en/writings/emacs-devenv/EmacsCedet.html - maybe it will be useful
Rtags is a also nice alternative. Both packages work as daemons outside emacs that read your compile commands.
Why does dumb-jump-go want me to save my files before jumping?
Free Software: http://www.gnu.org/philosophy/free-sw.html
>how is hosting stuff on Github antithetical to it?
Github is s a proprietary cloud service: http://www.gnu.org/philosophy/who-does-that-server-really-se...
i notice one of the supported languages is go -- if you're doing much go, i recommend installing godef and using go-mode.el. no tags files or anything like that, and works perfectly well for jumping to definition.
(i also highly recommend gorename and guru.)
For rails projects I wrote a script that kicks off ctags with the following options. "ctags --tag-relative -Rf.git/tags.$$ --exclude=.git --exclude=log --exclude=tmp --exclude=public --languages=ruby --languages=javascript `bundle show --paths` $MY_RUBY_HOME ."
I'd wager there is a better way. That's just the way I roll.
Plugin 'majutsushi/tagbar'
Plugin 'xolox/vim-easytags'
Plugin 'xolox/vim-misc'
Later on I have: nnoremap <silent> <Leader>b :TagbarToggle<CR>
I may have also separately installed ctags, but I don't remember.Now you can have an outline of the file you're working on in a small pane to the right. You can use this to navigate or see what arguments a function needs (or what attributes a class has). Whenever you save, ctags are automatically generated so you never have to worry about setting that up. ctrl+] will bring directly to the definition, including if it is in another file entirely. Use ctrl+T to go back to where you came. More often than not, I use this not because I forgot what the code says, but because I made an alteration to how I wanted a function or class to behave and I need to go back and change a line or two.