2html optimization

2011-06-14 Thread Benjamin Koltai
Hi vim users, I am using vim to syntax highlight and convert plain text files to html. My server usually has multiple requests coming in at once, so I would love to optimize vim to work as quickly as possible. I would love to get a better understanding on what the minimum requirements for doing

Re: 2html optimization

2011-06-14 Thread Andy Spencer
On 2011-06-14 16:23, Benjamin Koltai wrote: > I am currently using the command: > > HOME=#{ CONFIG.paths.lib_dir }/vimfiles/ vi -n -X '+runtime! > syntax/2html.vim' '+xa' Using '+runtime! syntax/2html.vim' is acting funny on my computer. I haven't looked into it, but it's generating html for , a

Re: 2html optimization

2011-06-14 Thread George V. Reilly
On Tue, Jun 14, 2011 at 1:23 PM, Benjamin Koltai wrote: > I am using vim to syntax highlight and convert plain text files to > html. My server usually has multiple requests coming in at once, so I > would love to optimize vim to work as quickly as possible. I would > love to get a better understan

Re: 2html optimization

2011-06-15 Thread Ben Fritz
On Jun 14, 11:00 pm, Andy Spencer wrote: > On 2011-06-14 16:23, Benjamin Koltai wrote: > > > I am currently using the command: > > > HOME=#{ CONFIG.paths.lib_dir }/vimfiles/ vi -n -X '+runtime! > > syntax/2html.vim' '+xa' > > Using '+runtime! syntax/2html.vim' is acting funny on my computer. >

Re: 2html optimization

2011-06-15 Thread Ben Fritz
On Jun 14, 3:23 pm, Benjamin Koltai wrote: > > I am using vim to syntax highlight and convert plain text files to html. > What sort of syntax highlighting are you using for your plain text files? By default "plain text" receives no syntax highlighting. TOhtml's primary purpose is to put the syn

Re: 2html optimization

2011-06-15 Thread Benjamin Koltai
Thanks for all the help so far. See below for my responses. On Jun 15, 2011, at 11:53 AM, Ben Fritz wrote: > > > On Jun 14, 3:23 pm, Benjamin Koltai wrote: >> >> I am using vim to syntax highlight and convert plain text files to html. >> > > What sort of syntax highlighting are you using f

Re: 2html optimization

2011-06-15 Thread Benjamin Fritz
On Wed, Jun 15, 2011 at 10:37 AM, Ben Fritz wrote: >> You can also speed it up a little but by using: >> >>   let g:html_no_progress = 1 >> > > Other options which might speed things up slightly (if their effects > are acceptable): > > g:html_ignore_folding = 1 or g:html_dynamic_folds = 0 (otherwi

Re: 2html optimization

2011-06-15 Thread Benjamin Fritz
On Wed, Jun 15, 2011 at 11:12 AM, Benjamin Koltai wrote: > > I would like to see this metric but could not get the --startuptime option to > be recognized: > > vim --startuptime > > I also looked in the help for startuptime and in the man page, and couldn't > find such a thing? What am I missin

Re: 2html optimization

2011-06-15 Thread Benjamin Koltai
Hi Ben, Thank you so much for all the help with this. I really appreciate it. I ran the following command: HOME=/path/to//directory/with/vimrc/ vim -N -u NONE -i NONE --cmd "filetype on" --cmd "syntax on" "+runtime plugin/TOhtml.vim" "+runtime syntax/2html.vim" This opened a terminal vim wi

Re: 2html optimization

2011-06-15 Thread ZyX
Reply to message «Re: 2html optimization», sent 20:14:08 15 June 2011, Wednesday by Benjamin Fritz: > Also, I have an item on my TODO list to allow the HTML output to use > an external CSS file. My goal is that this external file can be > generated just once and then used over and over,

Re: 2html optimization

2011-06-15 Thread Ben Fritz
On Jun 15, 1:35 pm, ZyX wrote: > > I suggest you to use formatvim as output can be altered easier. How do you mean? Are you referring only to the different output formats (HTML/bbcode/etc.)? > The reason for > speed improvements is that I first generate a function that does formatting > and >

Re: 2html optimization

2011-06-15 Thread ZyX
Reply to message «Re: 2html optimization», sent 22:59:48 15 June 2011, Wednesday by Ben Fritz: > > I suggest you to use formatvim as output can be altered easier. > > How do you mean? Are you referring only to the different output > formats (HTML/bbcode/etc.)? Everythin

Re: 2html optimization

2011-06-15 Thread Benjamin Fritz
On Wed, Jun 15, 2011 at 1:47 PM, ZyX wrote: > By the way, I noticed that TOhtml creates links out of things like > `http://www.rsyslog.com'. My plugin does not (and won't, it will only create > links for tags). Can this be turned off so that comparison will be more fair? > > I had forgotten that

Re: 2html optimization

2011-06-15 Thread Benjamin Fritz
On Wed, Jun 15, 2011 at 1:22 PM, Benjamin Koltai wrote: > HOME=/path/to//directory/with/vimrc/ vim -N -u NONE -i NONE --cmd "filetype > on" --cmd "syntax on" "+runtime plugin/TOhtml.vim" "+runtime > syntax/2html.vim" > This opened a terminal vim window with and the html genreated from > that fil

Re: 2html optimization

2011-06-15 Thread Benjamin Koltai
Got it. The commands now make much more sense. Thanks for all the help! On Jun 15, 2011, at 4:35 PM, Benjamin Fritz wrote: > On Wed, Jun 15, 2011 at 1:22 PM, Benjamin Koltai wrote: >> HOME=/path/to//directory/with/vimrc/ vim -N -u NONE -i NONE --cmd "filetype >> on" --cmd "syntax on" "+runtime p

Re: 2html optimization

2011-06-15 Thread ZyX
Reply to message «2html optimization», sent 00:23:50 16 June 2011, Thursday by Benjamin Koltai: > I also saw something online about a vim client server? Would that be > something that would allow me to keep a vim instance running and send > files to be converted to that server? Would t

Re: 2html optimization

2011-06-15 Thread Benjamin Fritz
On Wed, Jun 15, 2011 at 3:35 PM, Benjamin Fritz wrote: > The -u NONE means "don't read any configuration files, including the > .vimrc" so your .vimrc should not have been applied. Are you sure? > Check the output of :scriptnames. > > You can add any additional commands with --cmd to take place be

Re: 2html optimization

2011-06-15 Thread Benjamin Koltai
Ok that does sound like a cleaner command. I have: HOME=/path/to/vimfiles/ vim -N -u /path/to/config.vim -i NONE --noplugin {file} And this is my config.vim has: filetype on runtime colors/simplewhite.vim colorscheme simplewhite set number syntax on runtime plugin/TOhtml.vim runtime syntax/2h

Re: 2html optimization

2011-06-15 Thread Benjamin Fritz
On Wed, Jun 15, 2011 at 5:06 PM, Benjamin Koltai wrote: > And this is my config.vim has: > > filetype on > runtime colors/simplewhite.vim > colorscheme simplewhite > set number > syntax on > runtime plugin/TOhtml.vim Good. I'm not 100% sure on the order, but it looks like you have a nice minimal

Re: 2html optimization

2011-06-15 Thread Andy Spencer
On 2011-06-15 08:36, Ben Fritz wrote: > On my system, I have a ~/.vim/syntax/2html.vim, and also the default > $VIMRUNTIME/syntax/2html.vim. When I use "+runtime! syntax/2html.vim" > I see what you describe, as I would expect, because the '!' in the > runtime command says "source all files found".

Re: 2html optimization

2011-06-15 Thread ZyX
Reply to message «Re: 2html optimization», sent 02:35:38 16 June 2011, Thursday by Benjamin Fritz: Just look at my configuration for tohtml and formatvim testing. It is minimal. You may need to add ftdetect directory and do something to collect syntax/*.vim from different runtime directories

Re: 2html optimization

2011-06-16 Thread Benjamin Fritz
On Wed, Jun 15, 2011 at 1:22 PM, Benjamin Koltai wrote: > Also, the result of :version is: > VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Jul  5 2010 16:33:43) > Included patches: 1-127, 257 > Compiled by 'http://www.opensuse.org/' > Is this out of date? What is the easiest way to update? I don't

Re: 2html optimization

2011-06-16 Thread Benjamin Koltai
Great thanks for that. Do you have any idea how I am get past the prompt to press enter with the last command you suggested? Why is it happening? Here is the prompt again: $ HOME=/path/to/vimfiles/ vim -N -u /path/to/config.vim -i NONE --noplugin -c 'runtime syntax/2html.vim' -c 'xa' {file} "c

Re: 2html optimization

2011-06-16 Thread Benjamin Fritz
On Thu, Jun 16, 2011 at 4:26 PM, Benjamin Koltai wrote: > Do you have any idea how I am get past the prompt to press enter with the > last command you suggested? Why is it happening? > > Here is the prompt again: > > $ HOME=/path/to/vimfiles/ vim -N -u /path/to/config.vim -i NONE --noplugin -c >

Re: 2html optimization

2011-06-16 Thread Benjamin Koltai
Will do. Thanks. I was meaning to add those extra options once I got it working with the minimums. Thanks everyone for all the help! On Jun 16, 2011, at 5:42 PM, Benjamin Fritz wrote: > On Thu, Jun 16, 2011 at 4:26 PM, Benjamin Koltai wrote: >> Do you have any idea how I am get past the prompt

Re: 2html optimization

2011-06-17 Thread Tony Mechelynck
On 16/06/11 21:33, Benjamin Fritz wrote: On Wed, Jun 15, 2011 at 1:22 PM, Benjamin Koltai wrote: Also, the result of :version is: VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Jul 5 2010 16:33:43) Included patches: 1-127, 257 Compiled by 'http://www.opensuse.org/' Is this out of date? What is th