Added the EDITOR and VISUAL vim or nvim

This commit is contained in:
Marcin Woźniak 2023-02-19 12:28:41 +01:00
parent 98f7a22f8c
commit 5e4a91f283
Signed by: y0rune
GPG Key ID: F204C385F57EB348
1 changed files with 8 additions and 0 deletions

8
.zshrc
View File

@ -143,6 +143,14 @@ if [[ "$(uname)" == "Darwin" ]]; then
alias meraki="cd $HOME/git/ansible_collections/cisco/meraki/"
fi
# Setting the right editor
if which nvim > /dev/null 2>&1; then
export VISUAL='nvim -u $HOME/.vimrc'
export EDITOR='nvim -u $HOME/.vimrc'
else
export VISUAL='vim -u $HOME/.vimrc-def'
export EDITOR='vim -u $HOME/.vimrc-def'
fi
# Aliases
alias vimc="$EDITOR $HOME/.vimrc"