22 lines
489 B
Bash
22 lines
489 B
Bash
# Preferred editor for local and remote sessions
|
|
if [[ -n $SSH_CONNECTION ]]; then
|
|
if (( $+commands[helix] )); then
|
|
export EDITOR='helix'
|
|
elif (( $+commands[nvim] )); then
|
|
export EDITOR='nvim'
|
|
else
|
|
export EDITOR='vim'
|
|
fi
|
|
else
|
|
if (( $+commands[helix] )); then
|
|
export EDITOR='helix'
|
|
elif (( $+commands[nvim] )); then
|
|
export EDITOR='nvim'
|
|
else
|
|
export EDITOR='vim'
|
|
fi
|
|
fi
|
|
|
|
# operating system
|
|
export OS=$(uname -s)
|