Some time ago I set up Sublime text 2 as my default editor for GIT in the command line terminal. I would now like to change it to LightTable, but am having some trouble. I have set both the VISUAL and EDITOR environment variables to LightTable and that does the trick for most extensions. But even though I set the .gitconfig file editor variable to LightTable as well, using several variations of this command:
git config --global core.editor "'/Applications/LightTable.app' -w"
and this one:
export GIT_EDITOR=LightTable
it is continuing to open .md files with sublime text 2. Other file extensions are also opening with TextEdit or other applications. Is there an easy way to rein in the chaos and set my default opening applications based on extension? I have read the man page for open and it mentions LaunchServices, but I can't find that on my hard-drive. I'm using bash with Unix(Darwin) on a mac running OSX. Thanks in advance!
Get Info
command, theOpen With
setting, and theChange All
button. – SomervilleInfo.plist
. In the common case where more than one app is prepared to handle the same file type, it's a bit of a crap shoot which one wins; most likely, the app that was most recently installed. But it's kind of magic and magic that Apple has tweaked a number of times over the life of OS X. I believe you can change file type associations from the terminal but it's painful. – Somerville