From 626be522d05dac86be240684e4d0d83a89d06850 Mon Sep 17 00:00:00 2001 From: fedora Date: Wed, 15 May 2019 03:24:13 +0200 Subject: [PATCH] Added vi(m) mode support for zsh via ohmyzsh pkg and a custom little hook; new rsync aliases --- zsh/zshrc | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/zsh/zshrc b/zsh/zshrc index dad683f..5128f50 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -2,12 +2,13 @@ # export PATH=$HOME/bin:/usr/local/bin:$PATH # Path to your oh-my-zsh installation. - export ZSH=/home/fedora/.oh-my-zsh + export ZSH=/home/fedora/.oh-my-zsh # Set name of the theme to load. Optionally, if you set this to "random" # it'll load a random theme each time that oh-my-zsh is loaded. # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes ZSH_THEME="myowntheme_with_time" + #ZSH_THEME="spaceship" # Set list of themes to load # Setting this variable when ZSH_THEME=random @@ -62,16 +63,21 @@ dnf systemd git - rsync zsh-autosuggestions + vi-mode ) #history #lol #python - to be enabled once needed +# vi-mode via git clone https://github.com/Nyquase/vi-mode.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/vi-mode source $ZSH/oh-my-zsh.sh source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern) + + # map Del escape sequence to actual Del key in all (n,i) modes to resemble vim instead of vi + bindkey -a '^[[3~' delete-char + # User configuration # export MANPATH="/usr/local/man:$MANPATH" @@ -107,7 +113,7 @@ alias free='free -m -l -t' alias c='clear' #alias dnfin='sudo dnf info' --> is dnfp - alias hs='history | grep' + alias hs='history | grep -i' alias grep='grep --color=auto' alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' @@ -115,11 +121,13 @@ alias rwlan='ip link set wlp3s0 down; ip link set wlp3s0 up' alias ads='/home/fedora/MEGAsync/utb/2semester/ADS/' alias spt='/home/fedora/MEGAsync/utb/2semester/SPT/' - alias megg='/home/fedora/MEGAsync/' alias wget='wget -c' # allows to restore progress after interruption alias v='vim' # life's too short to type "vim" every time in full - # https://thejh.net/misc/website-terminal-copy-paste - # ^ this is interesting + alias vimrc='vim ~/.vim/vimrc' + alias rsync-copy='rsync -avz --progress -h' + alias rsync-move='rsync -avz --progress -h --remove-source-files' + alias rsync-synchronize='rsync -avzu --delete --progress -h' + alias rsync-update='rsync -avzu --progress -h' export WORKON_HOME=~/utils/venv #source utils/venv/bin/activate @@ -129,3 +137,5 @@ alias zshist="vim ~/.zsh_history" # alias ohmyzsh="mate ~/.oh-my-zsh" export DOTNET_CLI_TELEMETRY_OPTOUT=1 # why do I always have to take care of this myself... + + #bindkey -v # enabled ohmyzsh vi-mode - more customizable than the original