-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
60 lines (49 loc) · 1.14 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
# antigen
source ~/.zsh/antigen.zsh
# antigen
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-syntax-highlighting
antigen apply
# general
umask 002
bindkey -v
bindkey -e
HISTFILE=~/.zsh_history
HISTSIZE=1000000
SAVEHIST=1000000
WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
# lang
export LANG="en_US.UTF-8"
export LANGUAGE="en_US"
# path
export PATH="/usr/local/sbin:$PATH"
export PATH="${HOME}/.dotfiles/node_modules/.bin:$PATH"
# colors
autoload colors
colors
# autoload
autoload history-search-end
# prompt
PROMPT="$(echo -e '\U1F9F8') %M:%c
$ "
# completion
zstyle ':completion:*' matcher-list '' 'm:{[:lower:]}={[:upper:]}' '+m:{[:upper:]}={[:lower:]}'
# compinit
autoload -Uz compinit
compinit
# history
setopt share_history
setopt incappendhistory
setopt append_history
setopt inc_append_history
setopt hist_no_store
setopt hist_reduce_blanks
setopt hist_ignore_all_dups
setopt hist_ignore_dups
setopt histignorealldups
function fzf-history() {
BUFFER=$(history -n 1 | fzf --exact --no-sort +m --tac -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort --query "$LBUFFER")
CURSOR=$#BUFFER
}
zle -N fzf-history
bindkey '^r' fzf-history