Last active
January 3, 2022 18:41
-
-
Save kflu/c492dfcba2a32965918f920b046f8d19 to your computer and use it in GitHub Desktop.
use macvim as system vim
This file contains hidden or 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/sh | |
MVIM_DIR="/Applications/MacVim.app/Contents/bin" | |
DEST_DIR="$HOME/.local/bin" | |
mkdir -p "$DEST_DIR" | |
( | |
cd "$MVIM_DIR" || { | |
echo "Cannot change to dir $MVIM_DIR" | |
exit 2 | |
} | |
for fn in vim vimdiff view gvim gvimdiff gview; do | |
target="$(pwd)/$fn" | |
echo "Linking $target into $DEST_DIR..." | |
ln -sf "$target" "$DEST_DIR" | |
done | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment