Currenly, I just decorate the
and tags with CSS (as much as I would love line numbers).31–40 of 41 posts
Currenly, I just decorate the
and tags with CSS (as much as I would love line numbers).Related question: are all syntax highlighters awful to read for people who depend on accessibility tools, or is there actually a way to present code in a way that is accessible to these people? Currenly, I just decorate the and tags with CSS (as much as I would love line numbers).
I don't know if I understood you correctly, but you could add line numbers with before pseudo elements and use JavaScript to add numbers to its content. No need to mess with the markup, just CSS and JavaScript.
Pygments ( http://pygments.org/ ) will also turn code into syntax highlighted HTML.
Unfortunately, with the advent of TextMate/Sublime Text 2, I'm always disappointed when returning to VIM's syntax highlighting. It leaves a lot to be desired. I'd love a JavaScript plugin to parse TextMate theme files and highlight blocks of code.
I don't see why... I've been able to do almost any color scheme from textmate or other editors. I have my favorite color scheme from textmate in VIM (Sunburst). Just make sure you're either using gvim or your terminal has 256 colors turned on.
Probably 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.
It requires Python3 and PyQt (to execute Javascript), so it's pretty heavy weight, but I have them installed anyway, so it's worked well for me.
A brief explanation and the code is here: http://jlarocco.com/2011/12/22/static-gist-creator/
And just the code is here: https://gist.github.com/1513192
let html_use_css = 1
let use_xhtml = 1http://johnmacfarlane.net/pandoc/README.html#verbatim-code-b...
Unfortunately, with the advent of TextMate/Sublime Text 2, I'm always disappointed when returning to VIM's syntax highlighting. It leaves a lot to be desired. I'd love a JavaScript plugin to parse TextMate theme files and highlight blocks of code.
I don't see why... I've been able to do almost any color scheme from textmate or other editors. I have my favorite color scheme from textmate in VIM (Sunburst). Just make sure you're either using gvim or your terminal has 256 colors turned on.
And yeah, I use gvim for the greater color palette. I'd take a screenshot, but my current tether is on 3G and my server is taking too long to launch Gvim over X
Insert plug for pandoc. Among the many benefits pandoc provides is easy code highlighting. By defualt it uses pygments as others have suggested. http://johnmacfarlane.net/pandoc/README.html#verbatim-code-b...