From a40501f31454c7c2d116efc236bddfbae0e8847f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Sun, 3 Sep 2023 13:54:02 +0200 Subject: [PATCH] Use vi-mode in ZSH and use better cpr/mvr --- zsh/.zshrc | 36 ++++++++++-------------------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 19c9427..8c05d80 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -21,6 +21,10 @@ setopt autocd # to add other keys to this hash, see: man 5 terminfo typeset -g -A key +# Use vi-mode +bindkey -v +bindkey jj vi-cmd-mode + key[Home]="${terminfo[khome]}" key[End]="${terminfo[kend]}" key[Insert]="${terminfo[kich1]}" @@ -104,15 +108,7 @@ source $XDG_CONFIG_HOME/zsh/powerlevel10k/powerlevel10k.zsh-theme unsetopt share_history -# Compilation flags -export ARCHFLAGS="-arch x86_64" - -# ssh -export SSH_KEY_PATH="~/.ssh/rsa_id" - -export PYTHONDONTWRITEBYTECODE=1 BROWSER=/usr/bin/firefox -export EDITOR=nvim # Add bash aliases. if [ -f ~/.bash_aliases ]; then @@ -127,21 +123,14 @@ export GPULAB_DEV='False' export SMARTCD_QUIET=1 source ~/.smartcd_config -# CCache -# export USE_CCACHE=1 -#ccache -M 50G - -# CMake GCC colours export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' - +export EDITOR=nvim export LANG=en_US.UTF-8 - +export ARCHFLAGS="-arch x86_64" +export SSH_KEY_PATH="~/.ssh/rsa_id" +export PYTHONDONTWRITEBYTECODE=1 export TERM="screen-256color" - -# Local python installation export PATH=$HOME/.local/bin:$PATH - -# GO export GOPATH=/tmp/go # >>> mamba initialize >>> @@ -165,13 +154,6 @@ autoload -Uz add-zsh-hook eval "$(zoxide init zsh --cmd j)" -function cpr() { - rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 "$@" -} -function mvr() { - rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 --remove-source-files "$@" -} - function xterm_title_precmd () { print -Pn -- '\e]2;%n@%m %~\a' } @@ -202,3 +184,5 @@ alias wget=wget --hsts-file="$XDG_DATA_HOME/wget-hsts" alias xbindkeys="xbindkeys -f $XDG_CONFIG_HOME/xbindkeys/config" alias python=python3 alias r=". ranger" +alias cpr=rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 +alias mvr=rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 --remove-source-files