Skip to main content
6 events
when toggle format what by license comment
Sep 18, 2015 at 22:00 comment added VanLaser Yes - I was thinking of a general solution, in which you insert - in Vim comments - any html patterns which you want to replace those entire comment lines with, in html - then use a single, generic substitute command after TOhtml that deals with all of them at once.
Sep 18, 2015 at 12:50 comment added Cbhihe Yes, possible, but why further complicate one's life ? Better yet stick with :%s/^.*&quot;\s*^L.*/<P CLASS="pgbrk">/ or :%s/^.*#\s*^L.*/<P CLASS="pgbrk">/ and write a post processing function in ~/.vimrc or as a script: (i) to insert a new class P.pgbrk definition at an appropriate location between <HEAD> and </HEAD> and (ii) to perform the above substitution, all in the emergent html buffer, i.e. after running syntax/2html.vim.
Sep 17, 2015 at 21:39 comment added VanLaser Indeed - although using the above model you could place "special html snippets" between some markers in Vim comments and look for them afterwards in the html buffer, in order to replace the whole line with one of those special html snippets. E.g. from " *<p>* to <p>, using a substitution such as: :%s/^.*"\s*\*\(.*\)\*.*/\1/ (not tested).
Sep 17, 2015 at 20:07 comment added Cbhihe Thanks ! Yr doc wide substitution cmd :%s/.../.../ looks good especially because as you point out I can always retain the # ^L in the original code for :hardcopy compatibility. I don't think the html snippet included as substitute would work though. Better to define a new class up in the HEAD section of the html doc and invoke it whenever you break pages. -- I was looking for something probably not doable, i.e. to introduce an html snippet from the original vim buffer prior to running syntax/2html.vim, not in the new buffer containing the html code. No automation here unfortunately.
Sep 17, 2015 at 19:49 vote accept Cbhihe
Sep 17, 2015 at 17:41 history answered VanLaser CC BY-SA 3.0