From 928097912990c92dc7cd69c692374b1a5b4636e8 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Fri, 10 Sep 2021 00:26:04 +0300 Subject: refactor: move zsh to a separate stow package --- env/.gitconfig | 7 ------- env/.zshrc | 48 ------------------------------------------------ git/.gitconfig | 7 +++++++ zsh/.zshenv | 3 +++ zsh/.zshrc | 43 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 53 insertions(+), 55 deletions(-) delete mode 100644 env/.gitconfig delete mode 100644 env/.zshrc create mode 100644 git/.gitconfig create mode 100644 zsh/.zshenv create mode 100644 zsh/.zshrc diff --git a/env/.gitconfig b/env/.gitconfig deleted file mode 100644 index 571d725..0000000 --- a/env/.gitconfig +++ /dev/null @@ -1,7 +0,0 @@ -[user] - email = eugene@eug-vs.xyz - name = eug-vs -[core] - editor = nvim -[pull] - rebase = true diff --git a/env/.zshrc b/env/.zshrc deleted file mode 100644 index 89cbbca..0000000 --- a/env/.zshrc +++ /dev/null @@ -1,48 +0,0 @@ -autoload -U colors && colors -PS1="%B%{$fg[white]%}[%{$fg[cyan]%}%n%{$fg[white]%}@%{$fg[green]%}%M %{$fg[yellow]%}%~%{$fg[white]%}]%{$reset_color%}$%b " -bindkey -e - -# History in cache directory: -export HISTSIZE=10000 -export SAVEHIST=10000000 -export HISTFILE=~/.cache/zsh/history -setopt HIST_IGNORE_ALL_DUPS -setopt INC_APPEND_HISTORY -setopt SHARE_HISTORY - -# Completion -autoload -U compinit -zstyle ':completion:*' menu select -zmodload zsh/complist -compinit -_comp_options+=(globdots) - -# FZF -source /usr/share/fzf/key-bindings.zsh -source /usr/share/fzf/completion.zsh - -# Edit line in vim with ctrl-e: -autoload edit-command-line; zle -N edit-command-line -bindkey '^e' edit-command-line - -# Aliases -alias vi=nvim -alias vim=nvim -alias vf=vifm -alias g=git -alias t=task -alias tw=timew -alias s="sudo systemctl" - -# Env -export LESS=R # Option to less so that git log/diff hide output after exit -export EDITOR=nvim -export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" --no-use # This loads nvm -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion - -export PATH=$PATH:~/.local/bin - - -# Syntax highlighting, must be last -source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh diff --git a/git/.gitconfig b/git/.gitconfig new file mode 100644 index 0000000..571d725 --- /dev/null +++ b/git/.gitconfig @@ -0,0 +1,7 @@ +[user] + email = eugene@eug-vs.xyz + name = eug-vs +[core] + editor = nvim +[pull] + rebase = true diff --git a/zsh/.zshenv b/zsh/.zshenv new file mode 100644 index 0000000..25d4468 --- /dev/null +++ b/zsh/.zshenv @@ -0,0 +1,3 @@ +export LESS=R # Option to less so that git log/diff hide output after exit +export EDITOR=nvim +export PATH=$PATH:~/.local/bin diff --git a/zsh/.zshrc b/zsh/.zshrc new file mode 100644 index 0000000..76ed964 --- /dev/null +++ b/zsh/.zshrc @@ -0,0 +1,43 @@ +autoload -U colors && colors +PS1="%B%{$fg[white]%}[%{$fg[cyan]%}%n%{$fg[white]%}@%{$fg[green]%}%M %{$fg[yellow]%}%~%{$fg[white]%}]%{$reset_color%}$%b " +bindkey -e + +# History in cache directory: +export HISTSIZE=10000 +export SAVEHIST=10000000 +export HISTFILE=~/.cache/zsh/history +setopt HIST_IGNORE_ALL_DUPS +setopt INC_APPEND_HISTORY +setopt SHARE_HISTORY + +# Completion +autoload -U compinit +zstyle ':completion:*' menu select +zmodload zsh/complist +compinit +_comp_options+=(globdots) + +# Edit line in vim with ctrl-e: +autoload edit-command-line; zle -N edit-command-line +bindkey '^e' edit-command-line + +# Aliases +alias vi=nvim +alias vim=nvim +alias vf=vifm +alias g=git +alias t=task +alias tw=timew +alias s="sudo systemctl" + +# FZF +source /usr/share/fzf/key-bindings.zsh +source /usr/share/fzf/completion.zsh + +# Node version manager +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" --no-use # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion + +# Syntax highlighting, must be last +source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -- cgit v1.2.3