From 0e48729e9acbb85964a024b494b1576dacd465af Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Fri, 23 Sep 2022 19:55:35 -0700 Subject: [PATCH] move zsh hook to rc, use nvim as default editor --- runcoms/zshenv | 6 +----- runcoms/zshrc | 8 ++++++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/runcoms/zshenv b/runcoms/zshenv index 72befe6..ea6ab44 100644 --- a/runcoms/zshenv +++ b/runcoms/zshenv @@ -10,11 +10,7 @@ if [[ ( "$SHLVL" -eq 1 && ! -o LOGIN ) && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; t source "${ZDOTDIR:-$HOME}/.zprofile" fi -if command -v direnv &> /dev/null; then - eval "$(direnv hook zsh)" -fi - if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then . $HOME/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer if [ -e $HOME/.cargo/env ]; then . "$HOME/.cargo/env"; fi -export PATH="$HOME/.dotfiles/bin:$HOME/.local/bin:$PATH" +export PATH="$HOME/.local/bin:$PATH" diff --git a/runcoms/zshrc b/runcoms/zshrc index a347d7c..1045936 100644 --- a/runcoms/zshrc +++ b/runcoms/zshrc @@ -10,12 +10,16 @@ if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" fi +if command -v direnv &> /dev/null; then + eval "$(direnv hook zsh)" +fi + export NIX_PATH=${NIX_PATH:+$NIX_PATH:}$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels zstyle :prompt:pure:prompt:success color green -export EDITOR=vim -export VISUAL=vim +export EDITOR=nvim +export VISUAL=nvim export RPROMPT= unsetopt correct # Don't autocorrect