Skip to content

Instantly share code, notes, and snippets.

@teki
Last active January 2, 2016 18:29
Show Gist options
  • Save teki/8344083 to your computer and use it in GitHub Desktop.
Save teki/8344083 to your computer and use it in GitHub Desktop.
editor
#!/bin/bash
IFS=$'\n'
OS=$(uname)
[ -z "$VISRVNAME" ] && VISRVNAME="ko"
[ -f "$MBE/vim/vimrc" ] && VIMPARAMS=-u "$MBE/vim/vimrc"
if [ "$OS" == "Darwin" ]; then
if [ -h /Applications/MacVim.app ] || [ -d ~/Applications/MacVim.app ] ; then
if [ "$1" == "--printvimbin" ]; then
echo mvim
exit 0
fi
mvim $VIMPARAMS --servername $VISRVNAME --remote-silent "$@" &
exit 0
fi
elif [[ "$OS" == CYGWIN* ]] ; then
FPATH=$(cygpath -w "$@")
"/cygdrive/c/Program Files (x86)/Vim/vim73/gvim.exe" $VIMPARAMS --servername $VISRVNAME --remote-silent $FPATH &
exit 0
elif [[ "$OS" == Linux ]] ; then
gvim $VIMPARAMS --servername $VISRVNAME --remote-silent "$@" &
exit 0
fi
vim -- "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment