Dumb-jump in Action

The other day I wrote that I was considering installing dumb-jump and giving it a try. I did that and have been using it since I watched Mike Zamansky’s video on Projectile and Dumb-jump. It really is the sweet spot for me. I never liked TAG files and their associated machinery but dumb-jump doesn’t require any of that: it just works.

Recently, AT&T graciously released the source code for Research Unix v.8, v.9, and v.10. That’s a boon for us Unix aficionados who like to read code. I downloaded v.10 and started browsing. This is the first time I’ve had access to the source code for a modern AT&T Unix so I’m not familiar with the files layout. Fortunately, dumb-jump is just what I needed. All the kernel source files are in the sys directory so I put an empty .dumbjump file in sys and now when I’m looking at a function and it calls some other function in a different file, I can jump directly to it and then return.

I added two additional keybindings to the ones recommended in the README. For those who are interested, here is my configuration:

(use-package dumb-jump
  :ensure t
  :bind (("M-g o" . dumb-jump-go-other-window)
         ("M-g j" . dumb-jump-go)
         ("M-g b" . dumb-jump-back)
         ("M-g q" . dumb-jump-quick-look)
         ("M-g x" . dumb-jump-go-prefer-external)
         ("M-g z" . dumb-jump-go-prefer-external-other-window))
  :config (setq dumb-jump-selector 'ivy))

You really want a binding to return to your jumping off place so I added that. I also added a binding for dumb-jump-quick-look, which gives you a short popup of the definition and some context.

The Unix kernel isn’t the largest project by any means but it is good sized. Nevertheless, dumb-jump found and moved to the target file almost instantaneously. I really like this package a lot.

This entry was posted in General and tagged . Bookmark the permalink.