-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzshrc
More file actions
67 lines (46 loc) · 1.65 KB
/
Copy pathzshrc
File metadata and controls
67 lines (46 loc) · 1.65 KB
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
# shellcheck source=shared_shell.sh
source "$HOME"/.shared_shell.sh
if [[ -n "$ABORT_INIT" ]]; then
return
fi
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache}
P10K_INSTANT_PROMPT="${XDG_CACHE_HOME}/p10k-instant-prompt-${(%):-%n}.zsh"
if [[ -r "$P10K_INSTANT_PROMPT" ]]; then
source "$P10K_INSTANT_PROMPT"
fi
# For completion
CASE_SENSITIVE="true"
COMPLETION_WAITING_DOTS="true"
DISABLE_CORRECTION="true"
export TERM="xterm-256color"
###############################antigen stuff####################################
source ~/.antigen/antigen.zsh
antigen use oh-my-zsh
antigen bundles <<EOBUNDLES
# more autocompletion
zsh-users/zsh-completions src
EOBUNDLES
# TODO find way to add plugin based on version
antigen theme romkatv/powerlevel10k
antigen apply
##############################Further config####################################
# use vim mode
bindkey -v
# Better searching in command mode
bindkey -M vicmd "k" up-line-or-beginning-search
bindkey -M vicmd "j" down-line-or-beginning-search
# Use regex for searching
bindkey '^R' history-incremental-pattern-search-backward
source "$HOME"/.autocompletion.zsh
setopt APPEND_HISTORY
export HISTSIZE=1000000
export SAVEHIST=$HISTSIZE
# allow to open editor for a command line
autoload -U edit-command-line
zle -N edit-command-line
bindkey -M vicmd v edit-command-line
source "$HOME"/.zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh