http://www.perlmonks.org?node_id=228672


in reply to Templates for Perl Programs and Perl Modules

Well I have almost the same. In my vim config files. It even automatically gives CVS $Id$, last modified, author, ...
It even recognize which type of file: .sh, .pl, .c, ... And wil do the correct templating for that kind of file.
Works very good. Think most people automate this kind of stuff.

--
My opinions may have changed,
but not the fact that I am right

  • Comment on Re: Templates for Perl Programs and Perl Modules

Replies are listed 'Best First'.
The Vim Aproach to Templates for Perl Programs and Perl Modules
by toma (Vicar) on Jan 21, 2003 at 17:11 UTC
    I wonder if there is a way to automatically detect if a user is using CVS, RCS, ClearCase, etc. If so, I could add the appropriate line in the file. Another approach might be to try to read vim's configuration file, or I could use a configuration file custom for this application.

    For this type of easy program it doesn't matter much if you code it in vim or Perl. If I had found a template in vim I might not have written this at all. I would like to see what you use, or get a pointer to a repository of good vim templates. There is a lot of content at http://www.vim.org, and I don't know where the good templates are.

    It should work perfectly the first time! - toma

      I don't know if you've already realized this, but, if the file is in a directory that has a CVS directory you could assume CVS.

      Harley J Pig