Last active
October 1, 2021 19:57
-
-
Save mill1000/10435ac18e0fb878b1142a7282bf9323 to your computer and use it in GitHub Desktop.
Use VScode as git editor when available otherwise fallback to vim. Good for remote development via VScode.
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 | |
# Put in path and make executable | |
# Configure with git config --global core.editor git_editor | |
if type code 2> /dev/null; then | |
code --wait $* | |
else | |
vim $* | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment