Skip to content

Instantly share code, notes, and snippets.

@mill1000
Last active October 1, 2021 19:57
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 mill1000/10435ac18e0fb878b1142a7282bf9323 to your computer and use it in GitHub Desktop.
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.
#! /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