-
Notifications
You must be signed in to change notification settings - Fork 1
/
zshrc
61 lines (47 loc) · 1.54 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
61
#
# Executes commands at the start of an interactive session.
#
# Authors:
# Sorin Ionescu <[email protected]>
#
HISTSIZE=100000
[[ -z "$ZDOTDIR" ]] && export ZDOTDIR="${0%/*}"
# Set to this to use case-sensitive completion
# export CASE_SENSITIVE="true"
# Customize to your needs...
setopt glob_subst
setopt inc_append_history
setopt share_history
bindkey -v
bindkey -M viins 'jj' vi-cmd-mode
bindkey '^R' history-incremental-pattern-search-backward
# Remap Ctrl-S to Ctrl-- for stopping termianl output
stty start stop
[[ -f ${0%/*}/bin/tmuxinator.zsh ]] && source ${0%/*}/bin/tmuxinator.zsh
is_executable rspec && alias rspec='nocorrect rspec'
# autoload -Uz compinit promptinit
# compinit
# promptinit
# prompt bart
# History and history search
autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
[[ -n "$key[Up]" ]] && bindkey -- "$key[Up]" up-line-or-beginning-search
[[ -n "$key[Down]" ]] && bindkey -- "$key[Down]" down-line-or-beginning-search
# precmd() {
# LEFT='%F{magenta}%n%f at %F{yellow}%m%f in %F{green}%~%f ${vcs_info_msg_0_}'
# RIGHT="%{$reset_color%}$(date '+%H:%M:%S') "
# RIGHTWIDTH=$(($COLUMNS-${#LEFT}))
# print $LEFT${(l:$RIGHTWIDTH::.:)RIGHT}
# }
autoload -U colors && colors
setopt prompt_subst
PS1='%F{magenta}%n%f at %F{yellow}%m%f in %F{green}%~%f $(git_summary) · %D{%H:%M:%S}
$ '
#RPROMPT='%D{%H:%M:%S}'
if type brew &>/dev/null; then
autoload -Uz compinit
compinit
fi
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh