-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
77 lines (60 loc) · 2.08 KB
/
.zshrc
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
## History
HISTFILE="$HOME/.zsh_history"
HISTSIZE=10000
SAVEHIST=20000
setopt inc_append_history share_history
# fzf keybindings and completion
[[ -f ~/.nix-profile/share/fzf/key-bindings.zsh ]] && source ~/.nix-profile/share/fzf/key-bindings.zsh
[[ -f ~/.nix-profile/share/fzf/completion.zsh ]] && source ~/.nix-profile/share/fzf/completion.zsh
## Misc. Settings
# The following lines were added by compinstall
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
zstyle :compinstall filename '$HOME/.zshrc'
# Completion Makefile targets
zstyle ':completion:*:make:*:targets' call-command true
autoload -Uz compinit
compinit
# End of lines added by compinstall
setopt extended_glob
setopt interactivecomments
skip_global_compinit=1
autoload -U promptinit
promptinit
setopt prompt_subst
## Keybindings
bindkey '^[[1;3C' forward-word
bindkey '^[f' forward-word
bindkey '^[[1;3D' backward-word
bindkey '^[b' backward-word
bindkey '^A' beginning-of-line
bindkey '^E' end-of-line
bindkey '^[[1;5D' emacs-backward-word
bindkey '^[[1;5C' emacs-forward-word
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
## Packages
export ZPLUG_HOME=~/.zplug
source $ZPLUG_HOME/init.zsh
zplug "zsh-users/zsh-completions"
zplug "zsh-users/zsh-autosuggestions"
zplug "srijanshetty/zsh-pandoc-completion"
zplug "plugins/ssh-agent", from:oh-my-zsh
zplug "lib/directories", from:oh-my-zsh
zplug "lib/clipboard", from:oh-my-zsh, if:"[[ $OSTYPE == *darwin* ]]"
zplug "zsh-users/zsh-syntax-highlighting", defer:3
zplug "zsh-users/zsh-history-substring-search", defer:3
zplug "zsh-users/zsh-autosuggestions", defer:3
zplug "romkatv/powerlevel10k", use:powerlevel10k.zsh-theme
# Install plugins if there are plugins that have not been installed
if ! zplug check; then
printf "Install? [y/N]: "
if read -q; then
echo; zplug install
fi
fi
# Then, source plugins and add commands to $PATH
zplug load
# Theme
# source ~/.liquidprompt/liquidprompt
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ -f ~/.p10k.zsh ]] && source ~/.p10k.zsh