From c15cd7ac14aa4ab8bb691335f9a476624d1025a8 Mon Sep 17 00:00:00 2001 From: surtur Date: Mon, 20 Jan 2020 05:31:44 +0100 Subject: [PATCH] several changes to zshrc * tell ohmyzsh git prompt to not perform a check for untracked files, which is now done by spaceship-prompt thingy * a little plugin reorder aiming for speed gains with zplug * added an alias to create a tmp directory --- zsh/zshrc | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/zsh/zshrc b/zsh/zshrc index b6711d6..8514fea 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -3,9 +3,28 @@ source ~/.zplug/init.zsh zplug "denysdovhan/spaceship-prompt", use:spaceship.zsh, from:github, as:theme zplug "zsh-users/zsh-autosuggestions" - source ~/.zplug/repos/zsh-users/zsh-autosuggestions/zsh-autosuggestions.zsh zplug "zsh-users/zsh-syntax-highlighting" + zplug "zsh-users/zsh-history-substring-search" + zplug "plugins/git", from:oh-my-zsh + zplug "plugins/gitignore", from:oh-my-zsh + zplug "plugins/systemd", from:oh-my-zsh + zplug "plugins/dnf", from:oh-my-zsh + + # Install plugins if there are plugins that have not been installed + if ! zplug check --verbose; then + printf "Install? [y/N]: " + if read -q; then + echo; zplug install + fi + fi + + source ~/.zplug/repos/zsh-users/zsh-autosuggestions/zsh-autosuggestions.zsh source ~/.zplug/repos/zsh-users/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh + source ~/.zplug/repos/zsh-users/zsh-history-substring-search/zsh-history-substring-search.zsh + source ~/.zplug/repos/robbyrussell/oh-my-zsh/plugins/git/git.plugin.zsh + source ~/.zplug/repos/robbyrussell/oh-my-zsh/plugins/gitignore/gitignore.plugin.zsh + source ~/.zplug/repos/robbyrussell/oh-my-zsh/plugins/systemd/systemd.plugin.zsh + source ~/.zplug/repos/robbyrussell/oh-my-zsh/plugins/dnf/dnf.plugin.zsh ZSH_THEME="spaceship" SPACESHIP_PROMPT_ADD_NEWLINE=true @@ -94,33 +113,24 @@ # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. - plugins=( - dnf - systemd - git - gitignore + plugins=( safe-paste - history-substring-search ) -#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 + bindkey -a '^[[3~' delete-char # map arrow up/down to control fish-like history substring search and highlighting bindkey '^[[A' history-substring-search-up bindkey '^[[B' history-substring-search-down + HISTORY_SUBSTRING_SEARCH_FUZZY=" " # User configuration # export MANPATH="/usr/local/man:$MANPATH" - export PATH="$PATH:/home/vis/utils/bin" + export PATH="$PATH:$HOME/utils/bin" # You may need to manually set your language environment export LANG=en_GB.UTF-8 @@ -188,6 +198,7 @@ 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' + alias tmpdir='mktemp -d && cd /tmp/$(ls -t /tmp | grep tmp. | head -1)' alias tprconfig='/usr/bin/git --git-dir=$HOME/MEGA/Projects/utb/3semester/TPR/tasks-wip --work-tree=$HOME/MEGA/Projects/utb/3semester/TPR/' @@ -206,6 +217,7 @@ alias zshconfig="vimx ~/.zshrc" alias zshist="vimx ~/.zsh_history" # alias ohmyzsh="mate ~/.oh-my-zsh" + export DISABLE_UNTRACKED_FILES_DIRTY="true" 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