From bdf71bec4398048ab58d962495f6455dda4880f7 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Thu, 4 Aug 2022 05:26:32 +0000 Subject: [PATCH] update vim selector --- lib/alias.sh | 6 +++++- lib/env.sh | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/alias.sh b/lib/alias.sh index a5aeaac..5cd433f 100755 --- a/lib/alias.sh +++ b/lib/alias.sh @@ -42,7 +42,11 @@ is-executable lazygit && alias lg=lazygit alias tmux="tmux -f ~/.config/tmux/tmux.conf" alias rc="rclone --filter-from ~/.config/rclone/filter-file.txt" # prefer nvim if installed -is-executable nvim && alias vim=nvim +if is-executable lvim; then + alias vim=lvim +elif is-executable nvim; then + alias vim=nvim +fi # gdu defualts is-executable gdu && alias gdu -I '.*node_modules' -H # more fzf diff --git a/lib/env.sh b/lib/env.sh index 57f69f1..e2d6e52 100755 --- a/lib/env.sh +++ b/lib/env.sh @@ -23,6 +23,7 @@ unsetopt autocd # Vim Settings # export VIMINIT='source $MYVIMRC' # export MYVIMRC='$DOTFILES_DIR/lib/.vimrc' + if is-executable lvim; then export EDITOR=lvim elif is-executable nvim; then