Live data from Hacker News

Dumb-jump: an Emacs “jump to definition” package

github.com

1–10 of 53 posts

Re: Dumb-jump: an Emacs “jump to definition” package

#4
post #2

Still learning VIM user here, do we have something like this?

On first blush, this looks like ctags[0] (or etags[1]). In nvi, I go to a function or structure I want to see the definition of and (/me loads nvi to see what I actually do...) ^] (ctrl-bracket) to jump to a definition, and ^T (ctrl-t) to pop that ctag jump off the stack that it maintains. Because it's stack oriented, that means that you can jump through to definitions until you're satisfied, and pop back the same route you took getting to your ultimate destination.

[0] https://en.wikipedia.org/wiki/Ctags

[1] http://ctags.sourceforge.net/

Re: Dumb-jump: an Emacs “jump to definition” package

#5
post #3

Nice! Just tried it out and it seems to work well. Why does dumb-jump-go want me to save my files before jumping?

I assume because it uses an external tool that looks at your files, not the state of your emacs buffers, to find references.

Re: Dumb-jump: an Emacs “jump to definition” package

#8
post #7

Nice package! Unfortunately is completely falling on its face for my ruby on rails project, but I'm sure it can be improved.

Agreed. Was so hopeful that it would "just work". Still hopeful that it will improve, because the README just sounds sooo good.

Re: Dumb-jump: an Emacs “jump to definition” package

#9
post #2

Still learning VIM user here, do we have something like this?

I have this in my vimrc under vundle:

    Plugin 'majutsushi/tagbar'
    Plugin 'xolox/vim-easytags'
    Plugin 'xolox/vim-misc'
Later on I have:

    nnoremap  b :TagbarToggle
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.

Post reply on HN