-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc.zplug
87 lines (73 loc) · 3.2 KB
/
.zshrc.zplug
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# プラグイン管理ソフト"Zplug"の自動インストール
if [ ! -f ~/.zplug/init.zsh ]; then
printf "Zplug is not installed.\nInstall? [y/N]: "
if read -q; then
source ~/dotfiles/utility/initilizer.sh
# echo;curl -sL --proto-redir -all,https https://zplug.sh/installer | zsh
else
return
fi
fi
# Zplug処理開始
export PATH="~/.zplug:$PATH"
[ -f ~/.zplug/init.zsh ] && source ~/.zplug/init.zsh
# from: では gh-r の他に oh-my-zsh と gist が使える
# oh-my-zsh を指定すると oh-my-zsh のリポジトリにある plugin/ 以下を
# コマンド/プラグインとして管理することができる
# [Warning] this oh-my-zsh plugins destroy my .zshrc settings like ssh.
# zplug "plugins/git", from:oh-my-zsh
# zplug "plugins/python", from:oh-my-zsh
# zplug "plugins/pip", from:oh-my-zsh
# Self Manangement of zplug
zplug 'zplug/zplug', hook-build:'zplug --self-manage'
zplug "chrissicool/zsh-256color", use:"zsh-256color.plugin.zsh"
# Supports checking out a specific branch/tag/commit
zplug "b4b4r07/enhancd"
# fzf-bin にホスティングされているので注意
# またファイル名が fzf-bin となっているので rename-to:fzf としてリネームする
zplug "junegunn/fzf-bin", as:command, from:gh-r, rename-to:fzf
# ついでに tmux 用の拡張も入れるといい
zplug "junegunn/fzf", as:command, use:"bin/fzf-tmux"
# AnyFrameで簡単fzf活用
zplug "mollifier/anyframe"
bindkey '^xb' anyframe-widget-cdr
bindkey '^x^b' anyframe-widget-checkout-git-branch
bindkey '^xr' anyframe-widget-execute-history
bindkey '^x^r' anyframe-widget-execute-history
bindkey '^xp' anyframe-widget-put-history
bindkey '^x^p' anyframe-widget-put-history
bindkey '^xg' anyframe-widget-cd-ghq-repository
bindkey '^x^g' anyframe-widget-cd-ghq-repository
bindkey '^xk' anyframe-widget-kill
bindkey '^x^k' anyframe-widget-kill
bindkey '^xi' anyframe-widget-insert-git-branch
bindkey '^x^i' anyframe-widget-insert-git-branch
bindkey '^xf' anyframe-widget-insert-filename
bindkey '^x^f' anyframe-widget-insert-filename
bindkey '^xt' anyframe-widget-tmux-attach
bindkey '^x^t' anyframe-widget-tmux-attach
# gitのルートに簡単移動
zplug "mollifier/cd-gitroot"
# compinit 以降に読み込むようにロードの優先度を変更する(10~19にすれば良い)
zplug "modules/completion", from:prezto
zplug "zsh-users/zsh-completions", defer:0
fpath=(~/.zplug/repos/zsh-users/zsh-completions/src $fpath)
zplug "zsh-users/zsh-autosuggestions", defer:2, on:"zsh-users/zsh-completions"
zplug "zsh-users/zsh-syntax-highlighting", defer:3, on:"zsh-users/zsh-autosuggestions"
# ZSHの履歴検索を部分一致にアップグレード
zplug "zsh-users/zsh-history-substring-search", defer:3, on:"zsh-users/zsh-syntax-highlighting"
# Plugins from Prezto
zplug "modules/archive", from:prezto
zplug "modules/helper", from:prezto
zplug "pettan0818/zsh-python-prompt", use:"zshrc.zsh"
RPROMPT='[$ZSH_PYTHON_PROMPT `rprompt-git-current-branch` %~]'
# インストール処理
if ! zplug check --verbose; then
printf "Install? [y/N]: "
if read -q; then
echo; zplug install
fi
fi
# プラグインを読み込み、コマンドにパスを通す
zstyle :zplug:tag depth 1
zplug load