I just pasted this multi-file gist:


For some reason, GitHub decides to display both 20K+ line- files in full, making the master page a bit unresponsive. So I thought I'd work with links to individual files.

GitHub for the main file links provides this:


... which is basically an anchor into the exact same address as the first above.

And then, a raw link is provided:


... which, being plain text, obviously contains no syntax coloring.

There is also this under the link titled "view the full file" (where it appears):


... but it again serves a plain text file, with no syntax coloring.

Can I somehow obtain a link to a single file that will be served using GitHub's usual syntax coloring display?

1 Answer 1


I don't believe Github offers the ability to view a single highlighted file that is part of a multi-file gist, unfortunately.

You could:

A) Re-paste that file into it's own separate gist.

B) Use another service to highlight code for you such as Rouge. It's an open source project that does syntax highlighting and allows you to save the data you highlighted for viewing or sharing.

Sorry it's not exactly what you wanted, but perhaps one of these might work for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.