Last active
May 24, 2017 17:46
-
-
Save ttscoff/5277629 to your computer and use it in GitHub Desktop.
A replacement EDITOR variable for using different editors based on filetypes
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 | |
case "$1" in | |
*_EDITMSG|*MERGE_MSG|*_TAGMSG ) | |
/usr/local/bin/vim "$1" | |
;; | |
*.md ) | |
/usr/local/bin/mmdc "$1" | |
;; | |
*.txt ) | |
/usr/local/bin/mmdc "$1" | |
;; | |
* ) | |
/usr/local/bin/subl -w "$1" | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment