aboutsummaryrefslogtreecommitdiff
path: root/.zshrc
blob: e836e6ab271026e3898510fe5693e9f73f6800a1 (plain)
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
setopt histignorealldups sharehistory

# Use emacs keybindings even if our EDITOR is set to vi
bindkey -e

# Keep 1000 lines of history within the shell and save it to ~/.zsh_history:
HISTSIZE=1000
SAVEHIST=1000
HISTFILE=~/.zsh_history

export EDITOR=/usr/bin/vim

# autojump
if [ ! -d /usr/share/autojump ]; then
    echo 'Installing autojump ... '
    sudo apt install autojump
fi
. /usr/share/autojump/autojump.zsh 

# proxy
export http_proxy='http://127.0.0.1:7890'
export https_proxy='http://127.0.0.1:7890'

# zplug
if [ ! -d ~/.zplug ]; then
    echo 'Installing zplug ... '
    git clone [email protected]:zplug/zplug.git ~/.zplug
fi
source ~/.zplug/init.zsh 
zplug "plugins/git", from:oh-my-zsh
zplug "zsh-users/zsh-completions"
zplug "zsh-users/zsh-syntax-highlighting"
zplug "dracula/zsh", as:theme
if ! zplug check --verbose; then
    printf "Install? [y/N]: "
    if read -q; then
        echo; zplug install
    fi
fi
zplug load

# fzf
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

# alias
if grep -q Microsoft /proc/version; then
    alias psh='powershell.exe'
    alias expl='explorer.exe'
fi