LoginSignup
7

More than 5 years have passed since last update.

Pretzoでzsh-syntax-highlightingを有効にする方法

Posted at

Why

Pretzoを導入しているzshzsh-syntax-highlightingを有効にする方法がすこし分かりづらかったので書きました。

Result

結果はこんな風にコマンドの色が変わります。
Screen Shot 2017-06-17 at 9.22.23 AM.png

How

  1. open ~/.zpreztorc でPretzoの設定ファイルを開きます。

  2. # Set the Prezto modules to load (browse modules).のとこに'syntax-highlighting' \を追加します。
    こんな感じ。

.zpreztorc
# Set the Prezto modules to load (browse modules).
# The order matters.
zstyle ':prezto:load' pmodule \
  'environment' \
  'terminal' \
  'editor' \
  'history' \
  'directory' \
  'spectrum' \
  'utility' \
  'completion' \
  'syntax-highlighting' \
  'prompt'

3.zstyle ':prezto:module:syntax-highlighting' color 'yes'.zpreztorcに追加したら完成です。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7