-
-
Save gregmalcolm/3969143 to your computer and use it in GitHub Desktop.
Script for opening MacVim with gvim style file argument handling
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 | |
args="$*" | |
first="$1" | |
if [[ "$first" == "" ]]; then | |
# Open mvim at the current directory | |
args="." | |
else | |
if [[ ! -a "$first" ]]; then | |
# If the file doesn't exist yet, create it | |
touch $first | |
fi | |
fi | |
open -a MacVim $args |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment