Add Syntax Highlighting To Your Blog With VIM
alexanderle.com
Add Syntax Highlighting To Your Blog With VIM
1–10 of 41 posts
Re: Add Syntax Highlighting To Your Blog With VIM
#2Re: Add Syntax Highlighting To Your Blog With VIM
#3Here's a sample of the output: http://inst.eecs.berkeley.edu/~tikhon/Interpreter.hs.html
EDIT: Also, note that while the VIM one uses a bunch of tags, the Emacs one uses a bunch of span tags with reasonable class names like "function-name" or "string", so it produces much nicer code and is easy to use with your own CSS.
Re: Add Syntax Highlighting To Your Blog With VIM
#4This probably won't matter to most people, but if you're the kind of person that has tutorials or examples or any other kind of thing you try to keep up to date in a blog post over the years, things like TOhtml make it hard to quickly edit and maintain the code, while WordPress plugins invariably do a poor job, add too much to the processing time (though you should be using a caching solution), and break on upgrade. For me, GitHub's Gists were a godsend.
Re: Add Syntax Highlighting To Your Blog With VIM
#5In the beginning it sometimes produced Mojibake, which I finally nailed on a missing locale. And it's a bit slower than the usual hilighter, because it spawns a new vim process for each snippet to be hilighted. Still a good choice.
Re: Add Syntax Highlighting To Your Blog With VIM
#6Probably a little too off-topic, but after years of using similar "custom" methods of doing syntax highlighting, trying several WordPress plugins to automatically highlight, and several other options, I have found embedding GitHub Gists in blog posts to be the most reliable and lowest maintenance approach. This probably won't matter to most people, but if you're the kind of person that has tutorials or examples or an…
I'm kinda skeptical about embedding stuff from external sites; the more external dependencies you have, the less reliable your own blog becomes.
Re: Add Syntax Highlighting To Your Blog With VIM
#7Re: Add Syntax Highlighting To Your Blog With VIM
#8Probably a little too off-topic, but after years of using similar "custom" methods of doing syntax highlighting, trying several WordPress plugins to automatically highlight, and several other options, I have found embedding GitHub Gists in blog posts to be the most reliable and lowest maintenance approach. This probably won't matter to most people, but if you're the kind of person that has tutorials or examples or an…
The key is to store the original, and to display the tohtml output. I'm kinda skeptical about embedding stuff from external sites; the more external dependencies you have, the less reliable your own blog becomes.