From 6d507fab49a5d6eaa934834cac741ed287f849e8 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Mon, 28 Sep 2020 17:05:15 +0200 Subject: [PATCH] zsh muckery --- .tmux.conf | 1 + .zshrc | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.tmux.conf b/.tmux.conf index 171f238..34384e6 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -18,6 +18,7 @@ bind-key ] paste-buffer -p set -g update-environment "XAUTHORITY DISPLAY WINDOWID SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION" set -g default-command zsh set -g history-limit 50000 +set -g default-terminal "xterm-kitty" #set -g default-terminal "tmux-256color" #set -ga terminal-overrides ',*:Tc' # this is for 256 color #set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' # this is for the cursor shape diff --git a/.zshrc b/.zshrc index 3be4177..c7ea360 100644 --- a/.zshrc +++ b/.zshrc @@ -5,6 +5,7 @@ zplug "zsh-users/zsh-completions" zplug 'zsh-users/zsh-syntax-highlighting', defer:2 zplug 'zsh-users/zsh-history-substring-search', defer:3 zplug 'zsh-users/zsh-autosuggestions' +zplug 'Aloxaf/fzf-tab' if ! zplug check --verbose; then printf "Install? [y/N]: " @@ -46,6 +47,12 @@ setopt null_glob autoload -Uz compinit compinit +## Autosuggest +ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#D7CCC8,italic" +ZSH_AUTOSUGGEST_USE_ASYNC=1 +ZSH_AUTOSUGGEST_STRATEGY=(history completion) +bindkey '^ ' autosuggest-accept + ## Keybindings bindkey -e bindkey '^[[A' history-substring-search-up @@ -64,7 +71,7 @@ export LESS="--mouse --wheel-lines=1 -nRX" ## Aliases alias cdiff='colordiff -u' alias dotgit='git --work-tree $HOME --git-dir $HOME/.dot_git' -alias l='less -nRX' +alias l=bat alias ls=exa alias tail='tail -n $LINES' alias timestamp='TZ=Z date "+%Y%m%dT%H%M%SZ"'