HomeContact
Console
Antigen, a plugin manager for Oh My ZSH
March 21, 2020
1 min

On a previous article, I talked about how to improve your developer console experience with Oh My ZSH . If you want to use Antigen you need to previously install OhMyZsh.

Antigen allow us to manage our plugin for console like you will in a package manager file (like package.json in a web project), so that when you change your computer you just need to install Antigen and get your old .zshrc file back to get all your plugin back, instead of manually add them one by one by hand.

Now let’s see how to install Antigen.

First you need to get the file from github :

curl -L git.io/antigen > antigen.zsh

Be careful to place yourself in the console where you want the file.

After that we need to specify to OhMyZsh where antigen is and load it, to do that open the .zshrc file (it’s usually at the root of your computer), if you have code you can open it by using :

code .zshrc

Then add those line before the export at the end of the file :

source /Users/[yourUserName]/antigen.zsh # this depends on where you saved the file

# Load the oh-my-zsh's library.
antigen use oh-my-zsh

# Bundles from the default repo (robbyrussell's oh-my-zsh).
antigen bundle git
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle lein
antigen bundle command-not-found

# Syntax highlighting bundle.
antigen bundle zsh-users/zsh-syntax-highlighting

# Load the theme.
antigen theme robbyrussell

# Tell Antigen that you're done.
antigen apply

This will launch antigen and add git, zsh-autosuggestions, lein, and command-not-found which are great plugins to start with. It will unlock autocomplete and nice highlighting and use default theme.

To add more plugins you can go to the official repo and you just need to add antigen bundle {repoName} When relaunching your console it will automatically download the required dependencies if they are not on your computer yet.

Now that we have seen how to automatically download plugins for our console, we’ll see next how to save our .zshrc file in Github to always have it when needed.


Tags

consoleohmyzsh

Related Posts

Add VS Code path easily to your console
March 10, 2021
1 min
© 2023, All Rights Reserved.

Quick Links

Contact Us

Social Media