1 # vim: foldmethod=marker:foldlevel=0
4 setopt APPEND_HISTORY SHARE_HISTORY INC_APPEND_HISTORY HIST_IGNORE_ALL_DUPS
5 setopt HIST_IGNORE_SPACE
6 setopt INTERACTIVE_COMMENTS
7 setopt GLOB_STAR_SHORT GLOB_DOTS EXTENDED_GLOB
9 setopt AUTO_PUSHD PUSHD_IGNORE_DUPS
18 bindkey "^[[1~" beginning-of-line
19 bindkey "^[[4~" end-of-line
22 # Command-line editing {{{
23 autoload -U edit-command-line
24 zle -N edit-command-line
25 bindkey -M vicmd v edit-command-line
29 autoload -U history-search-end
30 zle -N history-beginning-search-backward-end history-search-end
31 zle -N history-beginning-search-forward-end history-search-end
32 bindkey "^[[A" history-beginning-search-backward-end
33 bindkey "^[[B" history-beginning-search-forward-end
34 bindkey "^R" history-incremental-search-backward
38 function zle-line-init zle-keymap-select {
39 mode_vi="${${KEYMAP/vicmd/+}/(main|viins)/-}"
40 [ $timer ] && timer_show=$(( $SECONDS - $timer ))
42 prompt+="%U${timer_show}%u|"
45 prompt+="%F{magenta}%#%f "
50 zle -N zle-keymap-select
64 printf "\033]2;\033\\"
72 alias ssh="TERM=xterm ssh"
78 bindkey -s "
\eOS" " popd\n" # F4
81 # find . -name "*$1*" -print
86 ssh -C -t "$1" tmux attach -t0
88 alias sshnm='ssh -S none'
94 alias Gc="git checkout"
97 alias Gm="git diff --name-only --diff-filter=M"
98 alias Gam="git commit --amend"
100 git_common="--oneline --abbrev-commit"
101 alias Gl="git log $git_common --graph --decorate=short"
102 alias Gr="git --no-pager log $git_common -n 20 | perl -ne 'print \"@~\$n \$_\"; \$n++'"
103 alias Grr="git --no-pager log $git_common --graph -n 1024 | vi -c 'e ++enc=utf8' -"
104 alias Grpck="git gc --prune=now ; git repack -a -d --depth=4095 --window=10240"
106 bindkey -s "
\eOQ" " git status\n" # F2
107 bindkey -s "
\eOR" " git status --short\n" # F3
111 GREP=/usr/local/bin/grep
113 $GREP --color=always --with-filename --line-number --recursive $@ | less --RAW-CONTROL-CHARS
115 alias -g G="| $GREP --color"
127 . /usr/local/bin/virtualenvwrapper.sh
133 ~/mail/mbox"?Neue Nachrichten in =mbox"
134 ~/mail/arbeit"?Neue Nachrichten in =arbeit"
136 alias arr="mutt -f =arbeit -e 'source ~/.mutt/accounts/stcnet.ru'"
137 alias rss="mutt -f =rss"
138 bindkey -s "
\eOP" " inc\n" # F1
148 zstyle ":completion:*:functions" ignored-patterns "_*"
149 zstyle ":completion:*" matcher-list "" 'm:{a-z\-}={A-Z\_}' 'r:|?=** m:{a-z\-}={A-Z\_}'
152 [ $CURRENT -eq 1 ] && _command_names || _files
154 zstyle ":completion:*" completer _mycomp _parameters
156 autoload -U compinit ; compinit -d /tmp/.zcompdump
158 zstyle ":completion:*:default" list-colors ""
163 ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets)
164 . ~/work/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
165 typeset -A ZSH_HIGHLIGHT_STYLES
166 ZSH_HIGHLIGHT_STYLES[globbing]="fg=magenta"
167 ZSH_HIGHLIGHT_STYLES[history-expansion]="fg=magenta"
168 ZSH_HIGHLIGHT_STYLES[commandseparator]="fg=red"
169 ZSH_HIGHLIGHT_STYLES[redirection]="fg=red"
170 ZSH_HIGHLIGHT_STYLES[assign]="fg=cyan"
174 . ~/work/zsh-autosuggestions/zsh-autosuggestions.zsh
175 ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=6"