From 8cd49f3ac4aa76f9ec5293241092877bb7378b1c Mon Sep 17 00:00:00 2001 From: EnricoGuccii Date: Fri, 8 Aug 2025 20:23:29 +0200 Subject: zsh conf --- .zshrc | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .zshrc diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..1fb9952 --- /dev/null +++ b/.zshrc @@ -0,0 +1,49 @@ +setopt correct +setopt histignoredups +setopt sharehistory +setopt incappendhistory +setopt interactivecomments + +HISTFILE=~/.zsh_history +HISTSIZE=5000 +SAVEHIST=5000 + +bindkey -v +export KEYTIMEOUT=1 + +autoload -Uz compinit && compinit +autoload -Uz bashcompinit && bashcompinit +zstyle ':completion:*' menu select +zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' + +PROMPT='%F{green}%n@%m%f %F{yellow}%~%f' + +export CLICOLOR=1 +export LSCOLORS=GxFxCxDxBxegedabagaced + +alias grep='grep --color=auto' +alias ll='lsd -all' +alias l='lsd -l' +alias lg='lazygit' +alias v='nvim' +alias vi='nvim' +alias vim='nvim' +alias c='clear' +alias wiki='wikiman' + +bindkey -M vicmd 'jj' vi-cmd-mode +bindkey -M viins 'jj' vi-cmd-mode + +AUTOSUGGEST_DIR="${HOME}/.zsh-autosuggestions" +if [ ! -d "$AUTOSUGGEST_DIR" ]; then + git clone https://github.com/zsh-users/zsh-autosuggestions "$AUTOSUGGEST_DIR" +fi +source "$AUTOSUGGEST_DIR/zsh-autosuggestions.zsh" +ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=8' + +if command -v tmux >/dev/null 2>&1; then + if [ -z "$TMUX" ] && [ -n "$PS1" ] && [[ "$TERM" != "linux" ]]; then + tmux attach -t default || tmux new -s default + fi +fi + -- cgit v1.2.3