From 28e049d94de2c8214f3f486b854cada72c2923be Mon Sep 17 00:00:00 2001 From: Luna Komorebi Date: Sun, 6 Jun 2021 19:24:35 +0200 Subject: [PATCH] func --- .zsh/func.zsh | 10 ++++++++++ .zshrc | 14 +------------- 2 files changed, 11 insertions(+), 13 deletions(-) create mode 100644 .zsh/func.zsh diff --git a/.zsh/func.zsh b/.zsh/func.zsh new file mode 100644 index 0000000..605c694 --- /dev/null +++ b/.zsh/func.zsh @@ -0,0 +1,10 @@ +# Turn control+z into a toggle switch +ctrlz() { + if [[ $#BUFFER == 0 ]]; then + fg >/dev/null 2>&1 && zle redisplay + else + zle push-input + fi +} +zle -N ctrlz +bindkey '^Z' ctrlz diff --git a/.zshrc b/.zshrc index 0a55ab4..1280cdd 100644 --- a/.zshrc +++ b/.zshrc @@ -7,8 +7,6 @@ export OTHER=$HOME/.zsh export ZSH=$HOME/.oh-my-zsh export ZSH_THEME="powerlevel10k/powerlevel10k" source $OTHER/powerlevel_settings.sh -# source $ZSH/oh-my-zsh.sh - #COMPLETION_WAITING_DOTS="false" plugins=(git docker docker-compose virtualenv) @@ -24,17 +22,6 @@ for f in $OTHER/*.zsh; do fi done -# Turn control+z into a toggle switch -ctrlz() { - if [[ $#BUFFER == 0 ]]; then - fg >/dev/null 2>&1 && zle redisplay - else - zle push-input - fi -} -zle -N ctrlz -bindkey '^Z' ctrlz - if [ -d "$HOME/.zsh-custom" ]; then for f in $HOME/.zsh-custom/*; do if [ -f $f ]; then @@ -44,3 +31,4 @@ if [ -d "$HOME/.zsh-custom" ]; then fi source $ZSH/oh-my-zsh.sh # autoload -Uz compinit && compinit -i +source $OTHER/func.zsh