Autojump is a way to navigate directory paths using fuzzy and intelligent search.
I started using about 4 years ago, and it have probably saved an entire month of my time typing
cd paths. It's my #1 recommended shell tool. Here's a scenario:
# Let's start working on a project cd ~/devel/work/backends/project1 vim . # Hmm.. we need to edit some module feature cd node_modules/fancy_module/lib/feature vim file.js # Aah... gotta edit my nginx config cd /etc/nginx/sites_available/ vim my-site.conf # Back to the project.... cd ~/devel/work/backends/project1
# Let's start working on a project j pro vim . # Hmm.. we need to edit some module feature j fan lib vim file.js # Aah... gotta edit my nginx config j si a vim my-site.conf # Back to the project.... j pro
As you can see, I don't even have to remember the full name of the path with autojump (the
j command). I just need to remember some parts of the name, and autojump auto-jumps you to a location based on how much time you've spent there, and how long ago you've accessed it (or probably using some kind of mind-reading magic).
This tool is an absolute must-have for anyone who spends their days in a terminal.
To install on OSX:
brew install autojump && echo \ '[[ -s `brew --prefix`/etc/autojump.sh ]] && . `brew --prefix`/etc/autojump.sh' >> \ $(ls ~/.bash_profile 2>/dev/null || ls ~/.zshrc)
An example to get started:
mkdir test-dir another-dir cd test-dir cd ../another-dir j test j another