Hi, > On Jul 16, 12:14 am, Masatake YAMATO <[email protected]> wrote: >> > On Jul 15, 5:33 am, Masatake YAMATO <[email protected]> wrote: >> >> Hi, >> >> >> How do you think putting the name of syntax into html file generated by >> >> TOhtml? >> >> Following patch does it. >> >> > What purpose does this serve? I'm not necessarily opposed to including >> > it, but I'm not sure why it's needed. >> >> Sorry, I didn't tell the backgroud of patch. >> >> I'm developing web based source code viewer. >> In the system vim is used in batch mode as html converter. >> Converted html files are delivered through web server. >> >> With javascript I'd like to provide some interactive commands working >> on the generated html file. The behavior of commands will be changed >> according to the ``syntax'' of original source code. >> > > That actually sounds pretty cool. It sure is a use case I hadn't > thought of before! > >> >> > It should be pretty easy to do a comma-separated list showing the >> > syntax for each window. Would that meet your needs? >> >> I'm using vim batch mode and in my purpose the diff feature will not >> be used in my web based source code viewer. So embeding multiple >> syntax names in to the meta tag is overspec for ME. If you mean you >> will accept my patch if the patch handles the diff feature and embeds >> the comma-separated list to generated html file, I will try to rewrite >> the patch. But I'm really new to vim scripting, I may not do it well >> quickly. >> > > Mainly I was asking if you needed anything particular done in this > case. I had not thought about it before, but I like the idea in > general of adding some meta tags including information like this. Not > just for purposes like what you'll be using it for, but also for > helping debug problems. I think the following meta information might > be nice to have: > > * Syntax of buffer, or comma-separated syntax list if more than one > buffer > * Version of the 2html script (I plan to add this in my next update) > * Comma-separated list of active options given in :help TOhtml > * Comma-separated list of Vim option settings that change script > behavior > * Metrics: time taken to do the conversion, number of lines in the > buffer, number of folds, number of highlight classes, etc. (probably > just a list)
+ number of characters(not bytes) > By the way, since you're using Vim in batch mode for this...you should > take special note of a recent change Bram just pushed in Mercurial. A > progress bar was added, with an option to turn it off. I assume you > won't be needing the progress bar in your batch processing, so I'd > suggest turning it off for a minor speed gain. You may want to turn on > some other options, though...look through :help :TOhtml if you have > not already done so. Thanks for the information. BTW, it seems that vim always requires terminal. So I'm running vim in GNU screen. Masatake YAMATO -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
