From a52a730658403e7fdc51defeaabffc7856575459 Mon Sep 17 00:00:00 2001 From: Julian T Date: Sat, 5 Sep 2020 20:19:06 +0200 Subject: Cleanup in zsh config --- zsh/.zshrc | 48 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 33989ae..82b25b9 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,5 +1,4 @@ # The following lines were added by compinstall - zstyle ':completion:*' completer _expand _complete _ignored _approximate zstyle ':completion:*' group-name '' zstyle ':completion:*' list-colors '' @@ -10,6 +9,7 @@ zstyle :compinstall filename '/home/julian/.zshrc' autoload -Uz compinit compinit + # # End of lines added by compinstall # Lines configured by zsh-newuser-install @@ -19,6 +19,9 @@ SAVEHIST=1000000 unsetopt beep # End of lines configured by zsh-newuser-install +# +# Prompt setup +# autoload -U colors && colors function git_info { @@ -36,24 +39,13 @@ function git_info { setopt PROMPT_SUBST PROMPT='%F{032}%~$(git_info)%F{032} %(!.#.>) %F{255}' -bindkey "^P" up-line-or-search -bindkey "^[[A" history-search-backward -bindkey "^[[B" history-search-forward - - -export EDITOR=nvim -export SUDO_EDITOR=$EDITOR -export LANG=en_US.UTF-8 -export TERM="xterm-256color" -export LSCOLORS="Gxfxcxdxbxegedabagacad" - +# +# General setting +# # Same colors for tab completion and ls eval "$(dircolors)" zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} -alias vim="nvim" -alias ls='ls --color=auto' - # Expand with dots # https://michael.thegrebs.com/2012/09/04/zsh-completion-waiting-dots/ expand-or-complete-with-dots() { @@ -63,3 +55,29 @@ expand-or-complete-with-dots() { } zle -N expand-or-complete-with-dots bindkey "^I" expand-or-complete-with-dots + +# Shift-tab +zmodload zsh/complist +bindkey -M menuselect '^[[Z' reverse-menu-complete + +# +# Keybinding +# +bindkey "^P" up-line-or-search +bindkey "^[[A" history-search-backward +bindkey "^[[B" history-search-forward + +# +# Env +# +export EDITOR=nvim +export SUDO_EDITOR=$EDITOR +export LANG=en_US.UTF-8 +export TERM="xterm-256color" +export LSCOLORS="Gxfxcxdxbxegedabagacad" + +# +# Alias +# +alias vim="nvim" +alias ls='ls --color=auto' -- cgit v1.2.3