Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save n1snt/454b879b8f0b7995740ae04c5fb5b7df to your computer and use it in GitHub Desktop.
Save n1snt/454b879b8f0b7995740ae04c5fb5b7df to your computer and use it in GitHub Desktop.
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Install plugins.

  • autosuggesions plugin

    git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions

  • zsh-syntax-highlighting plugin

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

  • zsh-fast-syntax-highlighting plugin

    git clone https://github.com/zdharma-continuum/fast-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fast-syntax-highlighting

  • zsh-autocomplete plugin

    git clone --depth 1 -- https://github.com/marlonrichert/zsh-autocomplete.git $ZSH_CUSTOM/plugins/zsh-autocomplete

Enable plugins by adding them to .zshrc.

  • Open .zshrc

    nvim ~/.zshrc

  • Find the line which says plugins=(git).

  • Replace that line with plugins=(git zsh-autosuggestions zsh-syntax-highlighting fast-syntax-highlighting zsh-autocomplete)

References

@benyaminbeyzaie
Copy link

That was great! Thanks!

@Simatwa
Copy link

Simatwa commented Feb 25, 2024

This is really cool.

One liner :

bash -c "$(curl -fsSL 'https://github.com/Simatwa/style-zsh/blob/main/style-zsh.sh?raw=true')"

@El-khamisi
Copy link

what a quick reference thanks

@mpartipilo
Copy link

mpartipilo commented Mar 4, 2024

If I may have everyone's attention, I'm looking for a way to have aliases being suggested to me while I'm typing a full command. Does anyone know a way to do this? So far I have only found omz plugins alias-tips and alias-finder, but those only show the alias tips after the command has been executed, which usually goes off screen with the command's output and requires scrolling back to see them.

e.g.

 ↳  git
Alias tips:
g=git
ga='git add'
gb='git branch'
gc='git commit --verbose'
gd='git diff'
gf='git fetch'
gg='git gui citool'
gl='git pull'
gm='git merge'
gp='git push'
gr='git remote'

@pratik-mahalle
Copy link

Thanks

@ogoes
Copy link

ogoes commented Apr 9, 2024

That is awesome! Thanks

@chill-patel
Copy link

Thanks

@glsconsulting
Copy link

Perfect

@johndfowler
Copy link

The goat post. Thank you.

@A-Moussa0
Copy link

This is slick.. thank you!

@technofreak
Copy link

Love this, super helpful ❤️

@a-z-hub
Copy link

a-z-hub commented May 8, 2024

WOW, its awesome 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment