From 5d4a01713ff278935ef87b7624eaa4b124a793a8 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 8 Apr 2016 12:36:52 +0900 Subject: [PATCH] Update EDITOR and vi alias --- shrc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/shrc b/shrc index bd5981b..fe0613c 100755 --- a/shrc +++ b/shrc @@ -275,12 +275,23 @@ _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 +then + export EDITOR=nvim +elif null type vim +then + export EDITOR=vim +elif null type vi +then + export EDITOR=vi +fi +test -n "$EDITOR" && alias vi=$EDITOR + # export GREP_OPTIONS="" alias gr="grep -n --color=always" $iswindows && alias gr="grep -n" alias less="less -F" __safe_alias em="emacs -nw" -__safe_alias vi=vim alias pstree="LANG=C pstree" alias cp="cp -v" alias mv="mv -v"