RogerThiede / dotfiles_cider

OS X dotfiles managed via cider
MIT License
0 stars 0 forks source link

Add zsh-syntax-highlighting #3

Open RogerThiede opened 8 years ago

RogerThiede commented 8 years ago

brew install zsh-syntax-highlighting instead of adding it into $ZSH/custom/plugins README.md includes instructions to git clone git://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH/custom/plugins/zsh-syntax-highlighting.git

RogerThiede commented 6 years ago

oh-my-zsh is itself a zsh plugin manager, and when using oh-my-zsh the recommended way is to clone a plugin into ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/ and then activate the plugin in ~/.zshrc: plugins=( [plugins...] zsh-syntax-highlighting). This may get complicated to keep up to date through routine git pull's unless zsh's AUTO_UPDATE will cycle through each plugin directory with a git pull.

Using Homebrew, after brew install zsh-syntax-highlighting, to activate it add the following at the end of your .zshrc: ~/.zshrc: source #{HOMEBREW_PREFIX}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

#.# zsh-syntax-highlighting
#
# Fish shell like syntax highlighting for Zsh
#
# @link: http://github.com/zsh-users/zsh-syntax-highlighting
source ~/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor)
ZSH_HIGHLIGHT_PATTERNS=('rm -rf *' 'fg=white,bold,bg=red') # To have commands starting with `rm -rf` in red: