Muddassirali Mirzani wrote:
Thanks Tony..
But the command doesn't work.. vim pops up and
closes down but no files generated .
Then the must be something I missed. Try replacing "wq" by "only"; if that
doesn't work, try doing the first couple of files by hand to see what I did
wrong. Then you'll be able to wrap it up with a (corrected) ":argdo" command.
see
:help :args
:help :argdo
:help :TOhtml
:help -c
etc.
Best regards,
Tony.
--- "A.J.Mechelynck" <[EMAIL PROTECTED]>
wrote:
Muddassirali Mirzani wrote:
Hi,
i'd like to know how can use the vim convert to
html utility without opening the file..
You can't. But read on.
I have a bunch
of files i need in html format with the syntax
highlighted and would like to write a script to do
it.
Thanks..
Ah, that's another question. You can do it with Vim
in batch mode: let's say
you want to convert all *.txt files in the whole
tree starting at ./project/
(untested)
vim project/**/*.txt -c "set autochdir" -c "argdo
%TOhtml | wq" -c q
For every *.txt file this will add a *.txt.html file
in the same directory.
Best regards,
Tony.
____________________________________________________________________________________
Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com