-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
50 lines (40 loc) · 1.44 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
[[ $(tty) == '/dev/tty1' ]] && startx
TERM=xterm-256color
setopt autocd
zle -N self-insert url-quote-magic
zle -N bracketed-paste bracketed-paste-magic
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
source ~/.config/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source ~/.config/zsh/zsh-autosuggestions.zsh
source ~/.config/zsh/zsh-vim-mode.zsh
source ~/.config/zsh/zsh-history-substring-search.zsh
source ~/.config/zsh/autoswitch_virtualenv.plugin.zsh
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
[ -f ~/.zprofile ] && source ~/.zprofile
[ -f ~/.aliases ] && source ~/.aliases
autoload -U +X compinit && compinit
autoload -Uz url-quote-magic
autoload -Uz bracketed-paste-magic
open-file(){
fzfopen
}
jump(){
_dir="$(fzfjump)"
[ -n $_dir ] && cd "$_dir" && zle reset-prompt
}
zle -N jump{,}
bindkey '^o' jump
# ++++ New history commands ++++
# for arrows
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
# for vim mode
bindkey -M vicmd 'k' history-substring-search-up
bindkey -M vicmd 'j' history-substring-search-down
# for emacs mode
bindkey -M emacs '^P' history-substring-search-up
bindkey -M emacs '^N' history-substring-search-down
eval "$(starship init zsh)"
# export NVM_DIR="$HOME/.nvm"
# [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
# [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion