Skip to content

Instantly share code, notes, and snippets.

Star You must be signed in to star a gist
Embed
What would you like to do?
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

@sayco
Copy link

sayco commented Jan 14, 2023

thanks really appreciated

@tgruenen
Copy link

tgruenen commented Feb 28, 2023

And add ZSH_THEME="powerlevel10k/powerlevel10k" to your ~/.zshrc.
run >source ~/.zshrc
start configuring.
if you are looking for fonts, then I recommend these collection: nerd fonts

@Bruno-Garcia-1
Copy link

Nice, thank you so much!!

@Hannoma
Copy link

Hannoma commented Apr 7, 2023

Really nice work!

@clintonbrito
Copy link

Thank you so much dude, such a great step by step.

@raulpenate
Copy link

Thanks!!

@nico-vromans
Copy link

Why is there 2 plugin for syntax highlight ? Isn't it redundant ?

Indeed, I just tested this, and whichever you put last in your plugins list in .zshrc is the one used. I used to use zsh-syntax-highlighting, but after finding this gist, opted to use the fast-syntax-highlighting instead, since it does pretty much what zsh-syntax-highlighting does, and a bit more.

@jaum20
Copy link

jaum20 commented Apr 26, 2023

Thank yooou

@AdamsGeeky
Copy link

Great works thanks

@NoahPsight
Copy link

NoahPsight commented Jun 8, 2023

I have a setup script for all my configs, are you able to modify this to have a --noconfirm or something similar

@abhisekmazumdar
Copy link

Nice!

@Jrcity
Copy link

Jrcity commented Jul 1, 2023

Thanks a lot

@mhrezabod
Copy link

mhrezabod commented Jul 3, 2023

they don't work properly together!
my terminal randomly crashes and i dont know why
i guess zsh-autocomplete has conflict with others
specifically when i push the up arrow for previous command sometimes the whole terminal crashes
i dont know exactly but the problem it might be from fast-syntax-highlighting

@iago-costa
Copy link

Install ZSH from SourceCode

wget https://sourceforge.net/projects/zsh/files/latest/download -O zsh-latest.tar.gz;

tar -xf zsh-latest.tar.gz;

cd zsh-<version>;

./configure --prefix=/usr/local;

make check;

make;

make install;

zsh --version;

rm -rf zsh*;

@felcadev
Copy link

Thanks!

@arturdj
Copy link

arturdj commented Aug 9, 2023

I had to uninstall brew version of zsh-syntax-highlighting (brew uninstall zsh-syntax-highlighting) to make fast highlight work without any terminal crashes.
Wonderful job!

@s-xiaoxiao
Copy link

Thanks!!!

@edumixer
Copy link

Very nice

@UmairZahid490
Copy link

Jazak Allah

@UmairZahid490
Copy link

may Allah guide you about right path (Islam)

@mazyvan
Copy link

mazyvan commented Sep 8, 2023

This is great, thanks @n1snt

@rayyandeveloper
Copy link

Mashaalloh

@radomir-mijovic
Copy link

Thanks man!

@nicolasassi
Copy link

they don't work properly together! my terminal randomly crashes and i dont know why i guess zsh-autocomplete has conflict with others specifically when i push the up arrow for previous command sometimes the whole terminal crashes i dont know exactly but the problem it might be from fast-syntax-highlighting

Had the same problem and stop using the plugins all together which is a shame because when working as expected its awsome 😢

@yuanshanhshan
Copy link

nice

@Kana-fi
Copy link

Kana-fi commented Nov 18, 2023

I did as it says, now can't open nvim via iterm2 + the which command doesn't work, I tried which fish, which nvim - nvim not found, fish not found. But it works in native terminal, how to fix it

@Mr-NI
Copy link

Mr-NI commented Nov 21, 2023

I did as it says, now can't open nvim via iterm2 + the which command doesn't work, I tried which fish, which nvim - nvim not found, fish not found. But it works in native terminal, how to fix it

that because nvim is neovim, you can use nano, vim, emacs or any other text editor

@Kana-fi
Copy link

Kana-fi commented Nov 23, 2023

I did as it says, now can't open nvim via iterm2 + the which command doesn't work, I tried which fish, which nvim - nvim not found, fish not found. But it works in native terminal, how to fix it

that because nvim is neovim, you can use nano, vim, emacs or any other text editor

Seems to me you sound mean, relax pal🗿, you can clearly see I’m not really familiar to vim.

@juliancorrea
Copy link

does make sense to use fast-syntax-highlighting and zsh-syntax-highlighting together?

@zukonarya
Copy link

this is awesome

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