As a developer, we are bound to navigate through files and folders using the terminal.

I've seen folks defining aliases to their commonly-used directories.

$ alias mp="cd /Users/lord/of/the/rings/my/precious"

Now you can just type "mp" and end up at your intended location. Sweet! But what if you're lazy?

"autojump" is a replacement for "cd" that learns your paths automagically and makes switching between them easier. By maintaining a database of the directories you visit, you can just type out a part of the path and it will move you to the matching location intelligently. The ordering is done by "frecency", which is a portmanteau of frequency (which locations are visited the most) and recency (more weight is given to recent locations).

After installing, you continue to use "cd" as you were doing before. After navigating to a couple of places, you can use the "j" command with a substring of the path to go there.

$ j pre

The "pre" would match the path (/Users/lord/of/the/rings/my/precious) and you'll be taken to that folder. Being lazy is good sometimes, it forces you to be smarter.

⬇️brew install autojump

🤓You can also alias "j" to "cd", so you won't have any resistance to start using it immediately.

🤓As a bonus tip, you can also check out "bat" - It's a replacement for "cat", with syntax highlighting.