In another post, I wrote about getting syntax-hilighted code in your favourite color scheme in html format to publish in blogger. Today, I added two more functions to the blog-htmlize.el file (link here) (save the file as blog-htmlize.el).
- blog-htmlize-region-with-linum
- blog-htmlize-buffer-with-linum
And unlinke many other online code snippets (see example here), when you try to select the code for copy pasting, only the code is selected and not the numbers. Go ahead and try copy-pasting / selecting text from the following test snippet.
1 2 3 4 5 6 7 8 9 10 11
#include <iostream> using namespace std; int main () { cout << "Hello World!" << endl; cout << "Here is the code in my favourite color scheme." << endl; cout << "You can get it too!" << endl; return 0; }
Scroll-bar !??!
Reply DeleteHey! Forgot :P
Reply Delete