Displaying code syntax highlighting by default
Hi, is there some way to make .md documents show proper code syntax highlighting? I'm using marked2 and when I do a quicklook on a file with code
```swift
func somecode() {
print("nothing")
}
```
It just gives me a vanilla block with no highlighting. How do I get it to display a proper preview like I would see in marked2? Thanx.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 25 Jan, 2017 07:00 PM
Do you have syntax highlighting turned on under Style preferences?
-Brett
2 Posted by steven.thompson... on 25 Jan, 2017 07:30 PM
Yes I do. To be clear, I'm looking at the file in Finder not Marked2. So technically it isn't a Marked2 question. Maybe you can point me to a post or something that answers this question. I want to see markdown files similar to the way I'm seeing them in marked2 but using quicklook. Thanx.
Support Staff 3 Posted by Brett on 25 Jan, 2017 07:51 PM
I don't know of a Quick Look generator offhand that previews Markdown
with code highlighting, but you could hack one together using pygments
or something. Here's my fork of Fletcher Penney's:
https://github.com/ttscoff/MMD-QuickLook
And here's one specifically for syntax highlighting that you might be
able to incorporate:
https://github.com/n8gray/QLColorCode
-Brett