config/shell: fix default editor
This commit is contained in:
parent
81cf937da7
commit
491c1b1faa
|
@ -20,7 +20,7 @@ alias editenv='sudoedit /etc/environment'
|
||||||
editright() {
|
editright() {
|
||||||
test ! -f "$1" && mkdir -p $(dirname "$1") || sudo mkdir -p $(dirname "$1")
|
test ! -f "$1" && mkdir -p $(dirname "$1") || sudo mkdir -p $(dirname "$1")
|
||||||
echo "Editing $1..."
|
echo "Editing $1..."
|
||||||
test -O "$1" && $EDITOR "$1" || sudoedit "$1"
|
(test -O "$1" || (test ! -f "$1" && test -O $(dirname "$1"))) && $EDITOR "$1" || sudoedit "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Underline arg
|
# Underline arg
|
||||||
|
|
|
@ -164,11 +164,7 @@ alias zln='noglob zmv -L'
|
||||||
alias zsy='noglob zmv -Ls'
|
alias zsy='noglob zmv -Ls'
|
||||||
|
|
||||||
# Preferred editor for local and remote sessions
|
# Preferred editor for local and remote sessions
|
||||||
if [[ -n $SSH_CONNECTION ]]; then
|
which nvim >/dev/null && export EDITOR='nvim' || export EDITOR='vim'
|
||||||
export EDITOR='vim'
|
|
||||||
else
|
|
||||||
export EDITOR='nvim'
|
|
||||||
fi
|
|
||||||
|
|
||||||
for file in $CONFIG_SHELLS/*; do source $file; done
|
for file in $CONFIG_SHELLS/*; do source $file; done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue