From 0f08d04698c814955116b6bae50752e64b774d8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Thu, 23 Dec 2021 18:28:03 +0000 Subject: Thu Dec 23 06:28:03 PM UTC 2021 --- .zshrc | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100755 .zshrc (limited to '.zshrc') diff --git a/.zshrc b/.zshrc new file mode 100755 index 0000000..f30f562 --- /dev/null +++ b/.zshrc @@ -0,0 +1,62 @@ +# ~/.zshrc configuration ~~ rgoncalves.se + +. ~/.cprofile + +set -o vi + +precmd() { + vcs_info +} + +# keybinds +autoload -U history-search-end +zle -N history-beginning-search-backward-end history-search-end +zle -N history-beginning-search-forward-end history-search-end +bindkey "^[[A" history-beginning-search-backward-end +bindkey "^[[B" history-beginning-search-forward-end +bindkey "^[[1;5C" forward-word +bindkey "^[[1;5D" backward-word +bindkey "\[[H" beginning-of-line +bindkey "\[[F" end-of-line +bindkey "\e[3~" delete-char +bindkey '^[[Z' reverse-menu-complete +zstyle ':completion:*' completer _complete +zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' '+l:|=* r:|=*' +autoload -Uz compinit +compinit -u + +# history +HISTSIZE=1000 +HISTFILE=~/.zsh_history +SAVEHIST=1000 +HISTDUP=erase +setopt INC_APPEND_HISTORY +setopt HIST_IGNORE_ALL_DUPS + +# prompt +setopt PROMPT_SUBST +_hostname="@${HOST}" +_user="${USER}" +_separator=" " +_prompt="%%" +_dir="%~" +_color=002 + +autoload -Uz vcs_info +zstyle ':vcs_info:*' enable git svn +zstyle ':vcs_info:*' enable git +zstyle ':vcs_info:*' get-revision true +zstyle ':vcs_info:*' check-for-changes true +zstyle ':vcs_info:*' stagedstr "●" +zstyle ':vcs_info:*' unstagedstr "+" +zstyle ":completion:*" menu select +zstyle ':vcs_info:git*' formats "%F{$_color} ▒ %b %u%c" +vcs_info + +PROMPT="${_user}%F{$_color}${_hostname}:" +PROMPT="${PROMPT}%F{015}${_dir}" +PROMPT="${PROMPT}${_separator}${_prompt}${_separator}%f" +RPROMPT='${vcs_info_msg_0_}' + +(cat ~/.cache/dot/sequences 2>/dev/null &) +# clear -- cgit v1.2.3