Smarter filetype detection, link back to gists. Fixes #12