color / highlight #157

Closed
ralpheeee88 opened this Issue May 12, 2016 · 4 comments

2 participants

@ralpheeee88

when i choose the highlight color it works until i close a terminal. when i open a new terminal my color choice is no longer applied

http://ix.io/DyS

@ericfreese
zsh-users member

Where are you setting the highlight color variable? It needs to be set in your .zshrc file (or another file executed on startup).

Your .zshrc file should have something like this:

source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=white'

setting the highlight variable after you source the plugin.

http://ix.io/DyS

Can you give more context about this link?

@ericfreese ericfreese added the support label May 12, 2016
@ralpheeee88

..using oh my zsh so followed those instructions ...the config file is from ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions/src/config.zsh

Was not aware I need to add syntax in my .zshrc

@ericfreese
zsh-users member

Ok, if you're using oh-my-zsh you shouldn't need to add additional config to your .zshrc.

I think the problem is that you've modified the actual source instead of overriding it in a custom config.

Try this:

  • Revert any changes you made to ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions/src/config.zsh
  • Put your configuration (only the things you want to override, you don't need to copy/paste the whole thing) into a file at ~/.oh-my-zsh/custom/zsh-autosuggestions-config.zsh

    • For you the contents of that file would just be:

      ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=white'

  • Restart your shell

Read carefully the section on configuration in the readme for more info: https://github.com/zsh-users/zsh-autosuggestions#configuration

@ralpheeee88
ralpheeee88 commented May 12, 2016 edited

Yep that did the trick....thxs....

Does not seem to be efficient or may be there might be an easier way to implement a color of choice during installation.... ..but I am a noob...(just seems a bit long winded to implement a color of choice)

Thxs for all your hard work...love your work...

@ericfreese ericfreese closed this May 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment