【Linux】gvim封装至gvi命令

方法1:使用脚本

#!/bin/bash - 
#===============================================================================
#
#          FILE: gvi
# 
#         USAGE: ./gvi 
# 
#   DESCRIPTION: 
# 
#       OPTIONS: ---
#  REQUIREMENTS: ---
#          BUGS: ---
#         NOTES: ---
#        AUTHOR: linkscue (scue), linkscue@gmail.com
#       CREATED: 2013年06月17日 20时16分49秒 CST
#     COPYRIGHT: Copyright (c) 2013, linkscue
#      REVISION: 0.1
#  ORGANIZATION: ATX风雅组
#===============================================================================

set -o nounset                              # Treat unset variables as an error

if [[ "$(which gvim)" != "" ]]; then
    /usr/bin/gvim --remote-tab-silent --disable-crash-dialog "$@"
else
    echo "none gvim installed"
fi

方法二:修改~/.bashrc,往里边添加:

alias gvi='/usr/bin/gvim --remote-tab-silent --disable-crash-dialog'
原文地址:https://www.cnblogs.com/scue/p/3140990.html