-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_zshrc
61 lines (48 loc) · 1.44 KB
/
dot_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
export ZSH="$HOME/.oh-my-zsh"
# Basic setup
export LC_ALL=en_US.UTF-8
export EDITOR="vim"
# Plugins
plugins=(
git
zsh-autosuggestions
zsh-vi-mode
)
# Themes
ZSH_THEME="powerlevel10k/powerlevel10k"
# Autosuggests
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=60'
# OMZ
source $ZSH/oh-my-zsh.sh
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# Local ZSH config
[[ ! -f ~/.zshrc.local ]] || source ~/.zshrc.local
# FZF
# (zvm) The plugin will auto execute this zvm_after_init function
function zvm_after_init() {
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
}
setopt hist_ignore_dups
setopt hist_ignore_all_dups
# Setting fd as the default source for fzf
export FZF_DEFAULT_COMMAND='fd --type f -E "*.class" -E .git -E CMakeFiles -E CMakeCache'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
# Smart tab
# 16.2.1 Directories # http://zsh.sourceforge.net/Intro/intro_6.html
setopt autocd # no need to type cd before a folder in current location
setopt auto_pushd # push cwd in a stack for cd - <TAB>
setopt pushd_ignore_dups #ignore duplicates in the stack
setopt pushdminus # last working dir is cd -1
setopt chaselinks # resolve symbolic before pushing in stack
# ~/.local/bin
export PATH="$HOME/.local/bin:$PATH"
# Go
export PATH="$HOME/go/bin:$PATH"
# Rust
export PATH="$HOME/.cargo/bin:$PATH"
# Aliases
alias gr="grep -RnsI"
alias f="find . -name"
alias G="git rev-parse --show-toplevel"
alias vim="nvim"