方法1:使用脚本
#!/bin/bash -
#===============================================================================
#
# FILE: gvi
#
# USAGE: ./gvi
#
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: linkscue (scue), [email protected]
# CREATED: 2013年06月17日 20时16分49秒 CST
# COPYRIGHT: Copyright (c) , 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'