zsh plugins, tmux tweaks

This commit is contained in:
Petr Nyc
2024-08-22 09:54:07 +02:00
parent e4af88ee68
commit 2aab479968
7 changed files with 232 additions and 112 deletions

51
.zshrc
View File

@@ -9,6 +9,30 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# if not present, install zsh-syntax-highlighting plugin
if [ ! -d "${HOME}/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" ];
then
cd "${HOME}/.oh-my-zsh/custom/plugins/"
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git &> /dev/null
fi
# if not present, install zsh-completions plugin
if [ ! -d "${HOME}/.oh-my-zsh/custom/plugins/zsh-completions" ];
then
cd "${HOME}/.oh-my-zsh/custom/plugins/"
git clone https://github.com/zsh-users/zsh-completions.git &> /dev/null
fi
# if not present, install zsh-autosuggestions plugin
if [ ! -d "${HOME}/.oh-my-zsh/custom/plugins/zsh-autosuggestions" ];
then
cd "${HOME}/.oh-my-zsh/custom/plugins/"
git clone https://github.com/zsh-users/zsh-autosuggestions.git &> /dev/null
fi
# doesn't work well on remote hosts
# [[ -f .iterm2_shell_integration.zsh ]] && source .iterm2_shell_integration.zsh
@@ -53,7 +77,7 @@ ZSH_THEME="powerlevel10k/powerlevel10k"
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
@@ -62,7 +86,7 @@ ZSH_THEME="powerlevel10k/powerlevel10k"
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
# COMPLETION_WAITING_DOTS="true"
COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
@@ -85,7 +109,10 @@ ZSH_THEME="powerlevel10k/powerlevel10k"
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git rsync colorize colored-man-pages vi-mode common-aliases macos themes dircycle iterm2 docker docker-compose zsh-navigation-tools urltools history mercurial tmux )
plugins=(git rsync colorize colored-man-pages vi-mode common-aliases macos themes dircycle iterm2 docker docker-compose zsh-navigation-tools urltools history mercurial tmux zsh-syntax-highlighting zsh-autosuggestions)
# consider plugin fzf - only available for Mac/Linux
# colorize - adds ccat and cless
# common-aliases: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/common-aliases
# themes: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/themes
@@ -164,9 +191,25 @@ fi
# zsh history is too short
# - https://unix.stackexchange.com/questions/273861/unlimited-history-in-zsh
HISTFILE=~/.zsh_history
# inspiration taken from yt video:
# https://youtu.be/ud7YxC33Z3w
HISTSIZE=999999999
HISTFILE=~/.zsh_history
SAVEHIST=$HISTSIZE
HISTDUP=erase
setopt appendhistory
setopt sharehistory
setopt hist_ignore_space
setopt hist_ignore_all_dups
setopt hist_save_no_dups
setopt hist_ignore_dups
setopt hist_find_no_dups
bindkey '^p' history-search-backward
bindkey '^n' history-search-forward
# bindkey '^f' autosuggest-accept
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=10"
### MANAGED BY RANCHER DESKTOP START (DO NOT EDIT)