Skip to content

Instantly share code, notes, and snippets.

@jodoherty
Created September 9, 2017 13:56
Show Gist options
  • Save jodoherty/0932c9a932bdc4cb5d793eedb9046667 to your computer and use it in GitHub Desktop.
Save jodoherty/0932c9a932bdc4cb5d793eedb9046667 to your computer and use it in GitHub Desktop.
Run native Windows gvim from within msys or cygwin
#!/bin/bash
GVIM=/c/Windows/gvim.bat
args=()
TEMP="$(cygpath -w "$ORIGINAL_TEMP")"
for arg in "$@"; do
if [[ $arg == /* ]]; then
args+="$(cygpath -w "$arg")"
else
args+="$arg"
fi
done
exec "$GVIM" "${args[@]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment