On Jan 28, 9:25 am, Nicolas Aggelidis <[email protected]> wrote:
> On Wed, Jan 28, 2009 at 5:20 PM, Brett Stahlman
>
> <[email protected]> wrote:
> > There are any number of ways this could be done: perl, sed, awk,
> > etc... If I were going to do it entirely with Vim, I would create a
>
> hi bret, there is no need to do it entirely within VIM....but i am
> asking to find out the most efficient way...
> i was thinking awk...but i am not sure it is the best way to proceed....
Perl is significantly more powerful than awk, although if you're more
familiar with awk, there's no reason not to use it. The Vim approach
would make sense to me if you were planning to create the template
file with Vim and then immediately generate the documentation.
Depending upon the complexity of the substitutions you need to
perform, your function would contain either a series of :%s commands,
or a loop over the lines in the file.
:help :s
If you write an awk or perl script to perform the substitutions, you
might consider filtering the template text in the current buffer
through your documentation generation script as follows:
:%! doc_gen.pl
:help :range!
Brett S.
>
> any suggestions are welcome!
>
> regards,
> nicolas
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---