"function to post-process the html file created by TOhtml for blogger "copyright @ http://scriptdemo.blogspot.com :if exists("TOblogger_loaded") : delfun TOblogger : delfun RePlaceSpace :endif :function TOblogger() :set nowrap :1,$ call RePlaceSpace() :endfunction :function RePlaceSpace() :let line = getline(".") :if line =~ "^\ " : let line = substitute(line,"^\ ",'\ ',"g") : while line =~ " " : let line = substitute(line,' \ ','\ \ ',"g") : endwhile : call setline(".",line) :endif :unlet line :endfunction :let TOblogger_loaded = 1 |
To use it, you need to open the html file first, then
:source TOblogger.vim #using the path if necessary
:call TOblogger()
and save your new html file using :w
Enjoy!
1 comment:
Do you use vim?
If you do, you can follow what i said in the post to generate the html source code and then post in blogger.
It's not a necessary procedure, but make the code block look better.
Post a Comment