Quellcode durchsuchen

Fix vi aliases and EDITOR environments

pull/15/head
10sr vor 8 Jahren
Ursprung
Commit
e88f291929
2 geänderte Dateien mit 19 neuen und 16 gelöschten Zeilen
  1. +16
    -7
      profile
  2. +3
    -9
      shrc

+ 16
- 7
profile Datei anzeigen

@@ -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 Datei anzeigen

@@ -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"


Laden…
Abbrechen
Speichern