Skip to content

Instantly share code, notes, and snippets.

@turusuke
Created September 26, 2016 17:06
Show Gist options
  • Save turusuke/2151676734f5ad6817f51b7bc3049589 to your computer and use it in GitHub Desktop.
Save turusuke/2151676734f5ad6817f51b7bc3049589 to your computer and use it in GitHub Desktop.
Zsh をデフォルトに設定して Powerline を適用するまで

Zsh

// Zsh起動
$ zsh
 
// リポジトリをclone
$ git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
 
// 既存の設定ファイルを退避(必要な場合)
$ mkdir zsh_orig && mv zshmv .zlogin .zlogout .zprofile .zshenv .zshrc zsh_orig
 
// 設定ファイルを作成
$ setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
  ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done
 
// Shellのデフォルトに設定
$ chsh -s /bin/zsh

アップデート

git pull && git submodule update --init --recursive

テーマの変更

// テーマ一覧
$ prompt -l
 
// テーマをプレビュー
$ prompt -p <テーマ名>
 
// すべてのテーマをプレビュー
$ prompt -p
 
// テーマを適用(再起動したら戻る)
$ prompt <テーマ名>

テーマの永続的変更

.zpreztorc に以下を書き込む

zstyle ':prezto:module:prompt' theme 'steeef'

Powerline を使う

Ricky が必要になるのでインストールする

$ brew tap sanemat/font
$ brew reinstall --powerline --vim-powerline ricty
$ cp -f /usr/local/Cellar/ricty/3.2.4/share/fonts/Ricty*.ttf ~/Library/Fonts/
$ fc-cache -vf
# Rictyを指定

フォントの指定を変更する -> 完了

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