Code Template

w3bvision wrote on Mon Jun 23 07:15:25 MEST 2008:
I came here hoping to find some code templates, with no luck. I found an
XML file that needed some major touch-up work here:
I know nothing about XML or making code templates ... yet, and the code
didn't work for me as cut-and-paste so I went through and cleaned up the
XML as best as I could. The file seems to work all right. I've posted the
XML file to my site if you would like to download it from there.
achim66 wrote on Mon Jun 23 10:46:17 MEST 2008:
Yeah, I had the same problem some time ago. A wonderful template facility,
but empty by default. Too bad.
I happened to have quite some templates for XEmacs, which I converted to
EPIC. Additionally, I added a lot of templates created by Matthias Faulstich
so most of the credit goes to him.

Here is my current template file, I think it already includes everything
yours has, and much more:

It has all special perl variables included (thanks to Matthias Faulstich),
so it is kind of reference information also :-) Just type a dollar sign
and hit Ctrl-Space, and you get a list of special variables, with their
English names. Very cool.
If you are unsure about character classes in regular expressions, type "ch"
and hit Ctrl-Space.
There are some commonly used "use xy" directives included, too.

Very nice templates are the ones for the different "open" operations, and
the "filter" template. Give it a try, saves hours of typing.
w3bvision wrote on Mon Jun 23 16:46:54 MEST 2008:
Wow, thanks a lot. I just started a Perl class and I don't know any of the
syntax yet. I'm sure this will help a lot. Do you mind if I post this on
my site? Would you like credit or a link back?
achim66 wrote on Mon Jun 23 17:01:54 MEST 2008:
You'll get to love Perl, it's simply the best :-)
Post it if you want to, but maybe it's better to include the link that I
gave you - from time to time I'll update the file there. 
Would be nice if you mentioned Matthias Faulstich and me as contributors...

Have fun with Perl, and of course with EPIC!
w3bvision wrote on Mon Jun 23 17:09:48 MEST 2008:
I'll definitely give credit where it is due. I hope to be able to add something
to the file as well by the end of my course. Have you thought about submitting
this to the EPIC developers?

Note: The above is an archived snapshot of a forum thread. Use the original thread at to post comments.