4 Essential Oh My Zsh Plugins
Plugin Fatigue
When you first install Oh My Zsh and look into enabling some of the built-in plugins, you will be hit with a list of over 200 plugins. The good news is that I’ve suffered through looking at all of them for you. Most of them are simple application specific aliases (e.g. aliases for git, brew, docker, etc.)
Let’s look at the plugins that have a more general use case!
Quickly move to any folder with z
z
will remember all the different directories you visit using cd
. You will then be able to quickly navigate to them by typing z [part of directory name]
. In the example above, you can go to ~/some/long/path
using z path
.
Install by adding it to your .zshrc
plugins array:
plugins=(... z)
Get notified of a long running task completion with bgnotify
bgnotify
will trigger a bell (or notification if on another desktop) whenever a terminal command that takes longer than a set amount of time (6s by default) finishes. This is very useful when you work on something else whilst a slow task (e.g. compilation, downloads, or literally anything with homebrew) runs because it prevents you from forgetting about the original task.
Install by adding it to your .zshrc
plugins array:
plugins=(... bgnotify)
Have per directory command history with per-directory-history
per-directory-history
localizes your command history to the directory in which said command was executed. You can switch between global/local history with ctrl + g
.
Install by adding it to your .zshrc
plugins array:
plugins=(... per-directory-history)
Enable vim like terminal control with vi-mode
vi-mode
adds many of the common movement and navigation features users have come to expect from vim. This includes a movement and insertion mode that lets you quickly modify the command you have written out. You can see all of the features on its GitHub page.
Install by adding it to your .zshrc
plugins array:
plugins=(... vi-mode)