Skip to content

Instantly share code, notes, and snippets.

@kflu
Last active January 3, 2022 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kflu/c492dfcba2a32965918f920b046f8d19 to your computer and use it in GitHub Desktop.
Save kflu/c492dfcba2a32965918f920b046f8d19 to your computer and use it in GitHub Desktop.
use macvim as system vim
#!/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