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.

Reply via email to