-
zsh syntax hightlight 적용개발 환경 설정 2021. 12. 26. 00:36728x90
맥에서 zsh 사용시sytax hightlight 적용하면 타이핑시 가독성이 올라간다.
#1 zsh-syntax-highlighting 설치
brew 를 이용해 설치 합니다.
brew install zsh-syntax-highlighting
➜ ~ brew install zsh-syntax-highlighting Running `brew update --preinstall`... ==> Auto-updated Homebrew! Updated 2 taps (homebrew/core and homebrew/cask). ==> Updated Formulae Updated 25 formulae. ==> Deleted Formulae exomizer ==> Updated Casks Updated 36 casks. ==> Downloading https://ghcr.io/v2/homebrew/core/zsh-syntax-highlighting/manifes ######################################################################## 100.0% ==> Downloading https://ghcr.io/v2/homebrew/core/zsh-syntax-highlighting/blobs/s ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh ######################################################################## 100.0% ==> Pouring zsh-syntax-highlighting--0.7.1.arm64_monterey.bottle.1.tar.gz ==> Caveats To activate the syntax highlighting, add the following at the end of your .zshrc: source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh If you receive "highlighters directory not found" error message, you may need to add the following to your .zshenv: export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/opt/homebrew/share/zsh-syntax-highlighting/highlighters ==> Summary 🍺 /opt/homebrew/Cellar/zsh-syntax-highlighting/0.7.1: 27 files, 164.8KB ==> Running `brew cleanup zsh-syntax-highlighting`... Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
설치가 끝난모습!
#2 설치가 끝나면 적용합니다
To activate the syntax highlighting, add the following at the end of your .zshrc:
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zshsource /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
vi 로 .zshrc 파일을 열고 위 라인을 입력하고 종료해 줍니다.
.zshrc 파일에 위 라인을 넣어주어야만 shell 을 다시 시작해도 syntax highlight 가 적용 됩니다.
#3 적용된 모습
728x90'개발 환경 설정' 카테고리의 다른 글
Visual code 개발 환경 설정 (0) 2021.08.08 Windows Terminal(윈도우 터미널) (0) 2021.01.17