-
-
Save teki/8344083 to your computer and use it in GitHub Desktop.
editor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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