DEV Community

Sonia Singla
Sonia Singla

Posted on • Originally published at soniasingla.com

How to customize Oh My Zsh with Auto-Suggestions and Syntax Highlighting?

Alt Text
As a developer, we spend a lot of time working on the terminal and having personalized shell makes the working environment perfect, decreases frustration and also, increases productivity.

In this blog, we will discuss how to quickly install plugins Auto-Suggestions and Syntax Highlighting in the oh-my-zsh theme.

Install Oh-My-Zsh using Curl:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Enter fullscreen mode Exit fullscreen mode

NOTE: ZSH and OhMyZsh both are different.

Let's take a look how to install plugins, and configure Zsh:

Install zsh-autosuggestions by running:

git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
Enter fullscreen mode Exit fullscreen mode

Install zsh-syntax-highlighting by running:

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
Enter fullscreen mode Exit fullscreen mode

Now, open .zshrc file with your favourite editor:

nano ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

And simply add zsh-autosuggestions & zsh-syntax-highlighting to plugins() section, it will do the magic for you:

plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
Enter fullscreen mode Exit fullscreen mode

Reopen terminal to reconfigure the settings and Voila! 🎉

Latest comments (0)