Kaynağa Gözat

Fix vi aliases and EDITOR environments

pull/15/head
10sr 8 yıl önce
ebeveyn
işleme
e88f291929
2 değiştirilmiş dosya ile 19 ekleme ve 16 silme
  1. +16
    -7
      profile
  2. +3
    -9
      shrc

+ 16
- 7
profile Dosyayı Görüntüle

@@ -68,17 +68,26 @@ do
done
test -n "$_src_hilite_lp_path" && export LESSOPEN="| $_src_hilite_lp_path %s"

if which vim >/dev/null
if which nvim >/dev/null
then
export EDITOR=vim
else
export EDITOR=vi
_VI_ALT=nvim
elif which vim >/dev/null
then
_VI_ALT=vim
elif which vi >/dev/null
then
_VI_ALT=vi
fi
# export CDPATH=".:~"
export VISUAL="$EDITOR"

if test -n "$_VI_ALT"
then
export EDITOR="$_VI_ALT"
export GIT_EDITOR="$EDITOR"
export VISUAL="$EDITOR"
fi

# export CDPATH=".:~"
export GIT_PAGER="less -F"
export GIT_EDITOR="$EDITOR"
export GIT_MERGE_AUTOEDIT=no

if test -n "$TMUX" && \


+ 3
- 9
shrc Dosyayı Görüntüle

@@ -275,17 +275,11 @@ _timeformat_rfc2822="%a, %d %b %Y %T %z"
_timeformat_num="%Y%m%d%H%M%S"
alias datenum="date +$_timeformat_num"

if null type nvim
if test -n "$_VI_ALT"
then
export EDITOR=nvim
elif null type vim
then
export EDITOR=vim
elif null type vi
then
export EDITOR=vi
alias vi=$_VI_ALT
export EDITOR=$_VI_ALT
fi
test -n "$EDITOR" && alias vi=$EDITOR

# export GREP_OPTIONS=""
alias gr="grep -n --color=always"


Yükleniyor…
İptal
Kaydet