r898 - in /trunk/packages/vim-scripts: bin/ debian/
debian/vim-registry/
doc/ html/ plugin/ share/ share/sokoban-levels/ share/vimplate-templates/
sokoban-levels/
zack at users.alioth.debian.org
zack at users.alioth.debian.org
Wed Feb 7 10:52:05 UTC 2007
Author: zack
Date: Wed Feb 7 11:52:04 2007
New Revision: 898
URL: http://svn.debian.org/wsvn/pkg-vim/?sc=1&rev=898
Log:
added vimplate (closing a wishlist bug report)
Added:
trunk/packages/vim-scripts/bin/vimplate (with props)
trunk/packages/vim-scripts/doc/vimplate.txt
trunk/packages/vim-scripts/html/plugin_vimplate.vim.html
trunk/packages/vim-scripts/plugin/vimplate.vim
trunk/packages/vim-scripts/share/
trunk/packages/vim-scripts/share/sokoban-levels/
- copied from r883, trunk/packages/vim-scripts/sokoban-levels/
trunk/packages/vim-scripts/share/vimplate-templates/
trunk/packages/vim-scripts/share/vimplate-templates/LaTeX.tt
trunk/packages/vim-scripts/share/vimplate-templates/Makefile-C.tt
trunk/packages/vim-scripts/share/vimplate-templates/Makefile-LaTeX.tt
trunk/packages/vim-scripts/share/vimplate-templates/Test.tt
trunk/packages/vim-scripts/share/vimplate-templates/cpp-default.tt
trunk/packages/vim-scripts/share/vimplate-templates/hpp-default.tt
trunk/packages/vim-scripts/share/vimplate-templates/perl.tt
Removed:
trunk/packages/vim-scripts/sokoban-levels/
Modified:
trunk/packages/vim-scripts/debian/changelog
trunk/packages/vim-scripts/debian/copyright
trunk/packages/vim-scripts/debian/install
trunk/packages/vim-scripts/debian/vim-registry/vim-scripts.yaml
trunk/packages/vim-scripts/debian/vim-scripts.status
trunk/packages/vim-scripts/html/ftplugin_xml.vim.html
trunk/packages/vim-scripts/html/index.html
trunk/packages/vim-scripts/html/macros_closetag.vim.html
trunk/packages/vim-scripts/html/plugin_AlignPlugin.vim.html
trunk/packages/vim-scripts/html/plugin_EnhancedCommentify.vim.html
trunk/packages/vim-scripts/html/plugin_NERD_comments.vim.html
trunk/packages/vim-scripts/html/plugin_a.vim.html
trunk/packages/vim-scripts/html/plugin_bufexplorer.vim.html
trunk/packages/vim-scripts/html/plugin_calendar.vim.html
trunk/packages/vim-scripts/html/plugin_cvsmenu.vim.html
trunk/packages/vim-scripts/html/plugin_gnupg.vim.html
trunk/packages/vim-scripts/html/plugin_info.vim.html
trunk/packages/vim-scripts/html/plugin_minibufexpl.vim.html
trunk/packages/vim-scripts/html/plugin_project.vim.html
trunk/packages/vim-scripts/html/plugin_sokoban.vim.html
trunk/packages/vim-scripts/html/plugin_taglist.vim.html
trunk/packages/vim-scripts/html/plugin_tetris.vim.html
trunk/packages/vim-scripts/html/plugin_themes.vim.html
trunk/packages/vim-scripts/html/plugin_utl.vim.html
trunk/packages/vim-scripts/html/plugin_vcscommand.vim.html
trunk/packages/vim-scripts/html/plugin_winmanager.vim.html
Added: trunk/packages/vim-scripts/bin/vimplate
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/bin/vimplate?rev=898&op=file
==============================================================================
--- trunk/packages/vim-scripts/bin/vimplate (added)
+++ trunk/packages/vim-scripts/bin/vimplate Wed Feb 7 11:52:04 2007
@@ -1,0 +1,368 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+
+=head1 NAME
+
+vimplate - the vim template system.
+
+=cut
+
+use constant VERSION => '0.2.3';
+
+use POSIX qw(strftime cuserid setlocale LC_ALL);
+use English qw(-no_match_vars);
+use Getopt::Long qw(:config no_ignore_case );
+use Pod::Usage;
+
+my $vimplaterc='';
+
+=head1 DEPENDS on PACKAGES
+
+B<Template-Toolkit> http://search.cpan.org/~abw/Template-Toolkit-2.14
+
+please install Template-Toolkit on your system.
+
+=cut
+
+BEGIN {
+ eval { require Template; };
+ if ($EVAL_ERROR=~/Can't locate Template.pm/) {
+ print STDERR "$EVAL_ERROR";
+ print STDERR '-' x 60, "\n";
+ print STDERR "please install Template-Toolkit!\n";
+ print STDERR "example with $^X -MCPAN -e\"install Template\"\n";
+ print STDERR '-' x 60, "\n";
+ exit 1;
+ }
+}
+
+=head1 DEPENDS on SETTINGS
+
+B<variable HOME>
+
+on unix/bsd/linux the variable home is set.
+On Windows please set the variable home to the value
+where _vimplaterc should be locatet.
+
+=cut
+
+unless ( $ENV{'HOME'} ) {
+ print STDERR "Variable HOME isn't set!\n";
+ print STDERR "Please read the documentation.\n";
+ exit 1;
+}
+else {
+ if ( $^O =~ /Win/ ) {
+ $vimplaterc = $ENV{'HOME'} . '/_vimplaterc';
+ unless ( $ENV{'USER'} ) {
+ $ENV{'USER'}=$ENV{'USERNAME'};
+ }
+ else {
+ print STDERR "Variable USER isn't set!\n";
+ print STDERR "Please set this variable.\n";
+ }
+ }
+ else {
+ $vimplaterc = $ENV{'HOME'} . '/.vimplaterc';
+ }
+}
+
+=head1 SYNOPSIS
+
+=over 4
+
+=item vimplate <-template=<template>> [-out=<file>]
+ [-user=<user>] [-dir=<dir>] [-config=<file>]
+
+=item vimplate <-createconfig>
+
+=item vimplate <-listtemplates>
+
+=item vimplate <-listusers>
+
+=item vimplate <-version>
+
+=item vimplate <-help|-h|-?>
+
+=item vimplate <-man>
+
+=back
+
+=cut
+
+my %opt = ();
+GetOptions(
+ \%opt, 'template|t=s', '-out|o=s',
+ 'user=s', 'dir=s', 'config=s',
+ 'createconfig',
+ 'listtemplates!',
+ 'listusers!',
+ 'version!',
+ 'help|h|?!',
+ 'man!',
+ )
+ or pod2usage( -verbose => 0, -exitval => 1, -output => \*STDERR );
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-help|-h|-?>
+
+Print a brief help message and exit.
+
+=cut
+
+if ( defined $opt{help} ) {
+ pod2usage( -verbose => 1, -exitval => 0 )
+}
+
+=item B<-man>
+
+Print the manual page and exit.
+
+=cut
+
+if ( defined $opt{man} ) {
+ pod2usage( -verbose => 2, -exitval => 0 )
+}
+
+=item B<-version>
+
+Print the version and exit.
+
+=cut
+
+if ( defined $opt{version} ) {
+ print 'vimplate version ' . VERSION . "\n";
+ exit 0;
+}
+
+=item B<-createconfig>
+
+Write a vimplate config to $HOME/.vimplaterc
+or %HOME%\_vimplaterc (on Windows) and exit.
+
+=cut
+
+if ( defined $opt{createconfig} ) {
+ if ( -f $vimplaterc ) {
+ print STDERR "I don't overwrite " . $vimplaterc . "\n";
+ print STDERR $vimplaterc . " already exist!\n";
+ exit 1;
+ }
+ eval {
+ open( F, '>', $vimplaterc )
+ };
+ if ($EVAL_ERROR) {
+ print STDERR "Can't write " . $vimplaterc . ": $!\n";
+ exit 1;
+ }
+ print F "# This is an example configuration.\n";
+ print F "# please see: http://napali.ch/vimplate\n";
+ print F "\n";
+ print F "# you can use \$Config::opt instead command options:\n";
+ print F "# -user=<user> -dir=<dir>\n";
+ print F "\$Config::opt = {\n";
+ print F " dir => '$ENV{HOME}/vimplate/Templates',\n";
+ print F " user => '$ENV{USER}',\n";
+ print F "};\n";
+ print F "\n";
+ print F "# we need \$Config::user with the option -user=<name>\n";
+ print F "\$Config::user = {\n";
+ print F " $ENV{USER} => {\n";
+ print F " firstname => 'yourFirstname',\n";
+ print F " lastname => '$ENV{USER}',\n";
+ print F " mail => '$ENV{USER}\@example.org',\n";
+ print F " etc => '...',\n";
+ print F " },\n";
+ print F " otherUser => {\n";
+ print F " firstname => 'otherFirstname',\n";
+ print F " lastname => 'otherLastname',\n";
+ print F " mail => 'otherMail\@example.org',\n";
+ print F " },\n";
+ print F "};\n";
+ print F "\n";
+ print F "# use \$Config::var for your own variables or subroutines\n";
+ print F "\$Config::var = {\n";
+ print F " yourArray => [ 'Perl', 'C', 'C++' ],\n";
+ print F " example => sub{ time },\n";
+ print F "};\n";
+ close F
+ and print $vimplaterc . " written.\n";
+ exit 0;
+}
+
+{
+ package Config;
+ our $user;
+ our $var;
+ our $opt;
+ if ( -f $vimplaterc ) {
+ do $vimplaterc
+ or die "error in $vimplaterc: $!\n";
+ }
+}
+
+=item B<-listtemplate>
+
+Print the avaible templates and exit.
+
+=cut
+
+sub listTemplates {
+ opendir(DIR, $Config::opt->{dir});
+ my ($file, @files);
+ FILE: foreach $file (readdir(DIR)) {
+ next FILE if ($file!~/\.tt$/);
+ $file=~s/\.tt//;
+ push @files, $file;
+ }
+ close DIR;
+ return @files;
+}
+if ( defined $opt{listtemplates} ) {
+ print "$_\n" for listTemplates();
+ exit 0;
+}
+
+=item B<-listusers>
+
+Print the avaible users and exit.
+
+=cut
+
+sub listUsers {
+ return ( sort keys %$Config::user )
+}
+if ( defined $opt{listusers} ) {
+ print "$_\n" for listUsers();
+ exit 0;
+}
+
+=item B<-user|u=<username>>
+
+Use the information form user <username> while parsing templates.
+
+=cut
+
+if ( defined $opt{user} ) {
+ $Config::opt->{user}=$opt{user}
+}
+
+=item B<-dir|d=<templatedir>>
+
+Search templatefiles in <templatedir>.
+
+=cut
+
+if ( defined $opt{dir} ) {
+ $Config::opt->{dir}=$opt{dir}
+}
+
+=item B<-template=<templatefile>>
+
+Use the <templatefile>.
+
+=cut
+
+if ( defined $opt{template} ) {
+ my $tt = Template->new(
+ {
+ INCLUDE_PATH => $Config::opt->{dir},
+ EVAL_PERL => 1,
+ }
+ );
+
+ my $ttvar = {
+ user => $Config::user->{ $Config::opt->{user} },
+ var => $Config::var,
+ locale => sub {
+ if ( @_ > 0 ) {
+ setlocale( LC_ALL, shift );
+ return undef;
+ } else {
+ return setlocale(LC_ALL);
+ }
+ },
+ date => sub {
+ my $loc = setlocale(LC_ALL);
+ setlocale( LC_ALL, shift ) if ( @_ > 1 );
+ my $timestring = POSIX::strftime( shift, localtime );
+ setlocale( LC_ALL, $loc );
+ return $timestring;
+ },
+ uc => sub {
+ return uc $_[0];
+ },
+ ucfirst => sub {
+ return ucfirst $_[0];
+ },
+ lc => sub {
+ return lc $_[0];
+ },
+ choice => sub {
+ my $text=shift;
+ my $i=0;
+ print "$text\n";
+ foreach my $line (@_)
+ {
+ printf("%2d) %s\n", $i++, $line);
+ }
+ my $input=0;
+ do {
+ chomp($input=<STDIN>);
+ unless ($input=~/^\d+$/){$input=-1};
+ } while ( $input<0 or $input>=scalar(@_) );
+ return $_[$input];
+ },
+ input => sub {
+ print "$_[0]";
+ chomp(my $input=<STDIN>);
+ return $input;
+ },
+ };
+
+ $tt->process( $opt{template} . '.tt', $ttvar, $opt{out} );
+ if ( $EVAL_ERROR =~ /file error - .*: not found/ ) {
+ $tt->process(
+ $ttvar->{'choice'}("choice: ", listTemplates()) . '.tt', $ttvar, $opt{out}
+ );
+ }
+ if ($EVAL_ERROR) {
+ print STDERR $EVAL_ERROR;
+ exit 1;
+ }
+ exit 0;
+}
+
+pod2usage( -verbose => 1, -exitval => 1, -output => \*STDERR );
+
+=back
+
+=cut
+
+__END__
+
+=head1 DESCRIPTION
+
+B<vimplate> Print a spezified template to standard output.
+
+=head1 AUTHOR
+
+Urs Stotz <stotz at gmx.ch>
+
+=head1 COPYRIGHT
+
+Copyright (c) 2004-2005, Urs Stotz <stotz at gmx.ch>
+
+All rights reserved. This program is free software; you can redistribute it
+and/or modify it under the same terms as Perl itself.
+
+=head1 SEE ALSO
+
+L<perl(1)|perl> L<Template(3)|Template>
+
+=cut
Propchange: trunk/packages/vim-scripts/bin/vimplate
------------------------------------------------------------------------------
svn:executable = *
Modified: trunk/packages/vim-scripts/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/debian/changelog?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/debian/changelog (original)
+++ trunk/packages/vim-scripts/debian/changelog Wed Feb 7 11:52:04 2007
@@ -3,6 +3,7 @@
* addons adds/removals/upgrades(/other changes)
- added binary dtd2vim to generate XML data file for Vim 7 DTD-based omni
completion
+ - added vimplate with its binaries and samples (closes: #398650)
- moved games from games/ to plugin/ so that they are automatically loaded
(if enabled); affected addon: tetris, sokoban
- moved sokoban levels to /usr/share/vim-scripts/sokoban-levels/
@@ -40,7 +41,7 @@
- added a manpage for the dtd2vim binary (and the companions
debian/manpages file)
- -- Stefano Zacchiroli <zack at debian.org> Wed, 7 Feb 2007 09:44:07 +0100
+ -- Stefano Zacchiroli <zack at debian.org> Wed, 7 Feb 2007 11:47:44 +0100
vim-scripts (7.0.4) unstable; urgency=low
Modified: trunk/packages/vim-scripts/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/debian/copyright?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/debian/copyright (original)
+++ trunk/packages/vim-scripts/debian/copyright Wed Feb 7 11:52:04 2007
@@ -122,6 +122,11 @@
url: http://www.vim.org/scripts/script.php?script_id=69
license: no license
+script: plugin/vimplate.vim
+author: Urs Stotz < stotz at gmx.ch >
+url: http://www.vim.org/scripts/script.php?script_id=1311
+license: GNU GPL, see /usr/share/common-licenses/GPL-2
+
script: dtd2vim
author: Mikolaj Machowski < mikmach at wp.pl >
url: http://www.vim.org/scripts/script.php?script_id=1462
Modified: trunk/packages/vim-scripts/debian/install
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/debian/install?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/debian/install (original)
+++ trunk/packages/vim-scripts/debian/install Wed Feb 7 11:52:04 2007
@@ -5,6 +5,6 @@
macros/ usr/share/vim-scripts/
plugin/ usr/share/vim-scripts/
syntax/ usr/share/vim-scripts/
-sokoban-levels/ usr/share/vim-scripts/
bin/* usr/bin/
+share/* usr/share/vim-scripts/
debian/vim-registry/*.yaml usr/share/vim/registry/
Modified: trunk/packages/vim-scripts/debian/vim-registry/vim-scripts.yaml
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/debian/vim-registry/vim-scripts.yaml?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/debian/vim-registry/vim-scripts.yaml (original)
+++ trunk/packages/vim-scripts/debian/vim-registry/vim-scripts.yaml Wed Feb 7 11:52:04 2007
@@ -316,3 +316,11 @@
- plugin/project.vim
- doc/project.txt
---
+addon: vimplate
+description: "template system based on template-toolkit"
+basedir: /usr/share/vim-scripts/
+disabledby: "let loaded_vimplate = 1"
+files:
+ - plugin/vimplate.vim
+ - doc/vimplate.txt
+---
Modified: trunk/packages/vim-scripts/debian/vim-scripts.status
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/debian/vim-scripts.status?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/debian/vim-scripts.status (original)
+++ trunk/packages/vim-scripts/debian/vim-scripts.status Wed Feb 7 11:52:04 2007
@@ -266,6 +266,18 @@
disabledby: let loaded_project = 1
version: 1.4.1
+script_name: plugin/vimplate.vim
+addon: vimplate
+description: template system based on template-toolkit
+script_url: http://www.vim.org/scripts/script.php?script_id=1311
+author: Urs Stotz
+author_url: http://www.vim.org/account/profile.php?user_id=5415
+email: stotz at gmx.ch
+license: GNU GPL, see /usr/share/common-licenses/GPL-2
+extras: doc/vimplate.txt
+disabledby: let loaded_vimplate = 1
+version: 0.2.3
+
script_name: dtd2vim
description: create XML data file for Vim7 XML omni-completion from DTDs
script_url: http://www.vim.org/scripts/script.php?script_id=1462
Added: trunk/packages/vim-scripts/doc/vimplate.txt
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/doc/vimplate.txt?rev=898&op=file
==============================================================================
--- trunk/packages/vim-scripts/doc/vimplate.txt (added)
+++ trunk/packages/vim-scripts/doc/vimplate.txt Wed Feb 7 11:52:04 2007
@@ -1,0 +1,350 @@
+*vimplate* vimplate - vim template (example for C++, Perl, LaTeX and make)
+
+Author: Urs Stotz <stotz at gmx.ch>
+Last change: 2005 August 20
+
+==============================================================================
+1. Contents *vimplate-contents*
+===========
+ 1. Contents.................: |vimplate-contents|
+ 2. Description..............: |vimplate-description|
+ 3. Usage....................: |vimplate-usage|
+ 4. Subroutines..............: |vimplate-subroutines|
+ 5. Example..................: |vimplate-example|
+ 6. Requirements.............: |vimplate-requirements|
+ 7. Documentation............: |vimplate-documentation|
+
+==============================================================================
+2. Description *vimplate-description*
+==============
+Vimplate provides an extensible and powerful template processing system.
+It is based on Perl and Template-Toolkit.
+You can create templates for program code, makefiles, letters, html pages,
+latex etc. As example vimplate contains templates for C++, LaTeX, Perl
+and Makefile.
+With vimplate you can write templates which interact with the user.
+For themes are the functions choice() and input().
+You can choose different locale for the function date() and locale().
+You can write your own perl code directly in the templates.
+
+In case you find my template useful,
+or have suggestions for improvements, please let me know.
+
+If you write a new template,
+and would like me to add it to the vimplate package
+please send it to: stotz at gmx.ch
+
+==============================================================================
+3. Usage *vimplate-usage*
+========
+Usage:
+ :Vimplate <template> [options]
+ choice <template> whit <TAB> (command line completion is supported).
+ With <TAB> all templates are listed.
+ [options]
+ -user|u=<username>
+ Use the information form user <username> while parsing templates.
+ -dir|d=<templatedir>
+ Search templatefiles in <templatedir>.
+
+==============================================================================
+4. Subroutines *vimplate-subroutines*
+==============
+ locale() for locale please see: man locale
+ [% loc=locale() %] get the current locale
+ and write it to the variable loc
+ [% locale('C') %] set global the current locale to C
+ [% locale('de_DE') %] set global the current locale to de_DE
+ date() for date please see: man date
+ [% date('%c') %] print the current date
+ with the current locale setting
+ [% date('de_DE', '%c') %] print the current date with the locale de_DE
+ input()
+ [% var=input() %] read input from user
+ and write it to the variable var
+ choice()
+ [% day=choice('day:', 'Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa') %]
+ let the user choice between different values
+ and write it to the variable day
+
+ please try :Vimplate Test
+
+==============================================================================
+5. Example *vimplate-example*
+==========
+
+Example:
+ the template letter.tt:
+ ________________________________________________________
+ [%
+ sex=choice('sex: ', 'female', 'male')
+ name=input('name: ')
+ location=input('your location: ')
+ -%]
+ [% ucfirst(location) %], [% date('C', '%b %d, %Y') %]
+
+ Dear [% IF sex=='female'; 'Ms'; ELSE; 'Mr'; END %] [% ucfirst(name) %]
+
+ ...
+
+ Sincerely
+
+ [% user.firstname %] [% user.lastname %]
+ ________________________________________________________
+
+ run vim:
+ :Vimplate letter
+ sex:
+ 0) female
+ 1) male
+ 0
+ name: Meier
+ your location: Olten
+
+ your input was:
+ :Vimplate letter<CR>0<CR>Meier<CR>Olten<CR>
+
+ this will produce this letter:
+ ________________________________________________________
+ Olten, Jul 11, 2005
+
+ Dear Ms Meier
+
+ ...
+
+ Sincerely
+
+ Urs Stotz
+ ________________________________________________________
+
+Example:
+ the template hpp-default.tt:
+ ________________________________________________________
+ [% classname=input('Class name: ')
+ doxygen=choice('with Doxygen comments: ', 'no', 'yes')
+ -%]
+ #ifndef [% uc(classname) %]_HPP
+ #define [% uc(classname) %]_HPP
+
+ [% IF doxygen=='yes' -%]
+ /**
+ * @brief [% classname %] ... short description ...
+ * @author [% user.firstname %] [% user.lastname %] <[% user.mail %]>
+ * @date [% date('%Y-%m-%d') %]
+ * ... description ...
+ */
+
+ [% END -%]
+ class [% classname %]
+ {
+ public:
+ [% IF doxygen=='yes' -%]
+
+ /**
+ * Default constructor
+ */
+ [% END -%]
+ [% classname %]();
+ [% IF doxygen=='yes' -%]
+
+ /**
+ * Copy constructor
+ * @param other reference on object to copy
+ */
+ [% END -%]
+ [% classname %](const [% classname %]& other);
+ [% IF doxygen=='yes' -%]
+
+ /**
+ * Assignment operator
+ * @param other reference on object to copy
+ * @return reference on initialisated object
+ */
+ [% END -%]
+ [% classname %]& operator=(const [% classname %]& other);
+ [% IF doxygen=='yes' -%]
+
+ /**
+ * Destructor
+ */
+ [% END -%]
+ virtual ~[% classname %]();
+
+ private:
+ [% IF doxygen=='yes' -%]
+
+ /**
+ * Base initialisation should be called
+ * at beginning of each constructor
+ */
+ [% END -%]
+ void init();
+ [% IF doxygen=='yes' -%]
+
+ /**
+ * Method to copy each member (deep copy)
+ * @param other reference on object to copy
+ */
+ [% END -%]
+ void init(const [% classname %]& other);
+ };
+
+ #endif /* #ifndef [% uc(classname) %]_HPP */
+ ________________________________________________________
+
+ run vim:
+ :Vimplate hpp-default
+ Class name: Parent
+ with Doxygen comments:
+ 0) no
+ 1) yes
+ 1
+
+ your input was:
+ :Vimplate hpp-default<CR>Parent<CR>1<CR>
+
+ this will produce this c++ include file:
+ ________________________________________________________
+ #ifndef PARENT_HPP
+ #define PARENT_HPP
+
+ /**
+ * @brief Parent ... short description ...
+ * @author Urs Stotz <stotz at gmx.ch>
+ * @date 2005-07-18
+ * ... description ...
+ */
+
+ class Parent
+ {
+ public:
+
+ /**
+ * Default constructor
+ */
+ Parent();
+
+ /**
+ * Copy constructor
+ * @param other reference on object to copy
+ */
+ Parent(const Parent& other);
+
+ /**
+ * Assignment operator
+ * @param other reference on object to copy
+ * @return reference on initialisated object
+ */
+ Parent& operator=(const Parent& other);
+
+ /**
+ * Destructor
+ */
+ virtual ~Parent();
+
+ private:
+
+ /**
+ * Base initialisation should be called
+ * at beginning of each constructor
+ */
+ void init();
+
+ /**
+ * Method to copy each member (deep copy)
+ * @param other reference on object to copy
+ */
+ void init(const Parent& other);
+ };
+
+ #endif /* #ifndef PARENT_HPP */
+ ________________________________________________________
+
+==============================================================================
+6. Requirements *vimplate-requirements*
+===============
+ Perl
+ http://www.perl.org
+ Windows users:
+ http://www.activestate.com/Products/ActivePerl
+ Template-Toolkit
+ http://search.cpan.org/~abw/Template-Toolkit-2.14
+ or apt-get install libtemplate-perl
+ or perl -MCPAN -e"install Template"
+ Windows users:
+ ppm install
+ http://openinteract.sourceforge.net/ppmpackages/AppConfig.ppd
+ ppm install
+ http://openinteract.sourceforge.net/ppmpackages/Template-Toolkit.ppd
+
+==============================================================================
+7. Documentation *vimplate-documentation*
+================
+Documentation:
+ - http://www.template-toolkit.org/docs.html
+ - http://perldoc.perl.org/perl.html
+
+Todo:
+ - better exception handling
+ - write more templates
+
+License:
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License, version 2, as published
+ by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ A copy of the GNU GPL is available as /usr/share/common-licenses/GPL-2
+ on Debian systems, or on the World Wide Web at
+ http://www.gnu.org/copyleft/gpl.html
+ You can also obtain it by writing to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+
+Copyright:
+ Copyright (c) 2005, Urs Stotz <stotz at gmx.ch>
+
+Version:
+ vimplate 0.2.3
+
+==============================================================================
+8. Installation *vimplate-installation*
+===============
+Depends:
+ Perl:
+ http://www.perl.org
+ Template-Toolkit:
+ http://search.cpan.org/~abw/Template-Toolkit-2.14
+
+Suggests:
+ TT2 syntax:
+ http://www.vim.org/scripts/script.php?script_id=830
+
+Installation steps:
+ 1. change to your $HOME/.vim directory
+ (on windows: set the variable HOME
+ set HOME=c:\vim)
+ 2. untar vimplate.tar.gz: gzip -dc vimplate.tar.gz |tar xpvf -
+ 3. move the vimplate into your preferred directory
+ for example in $HOME/bin or /usr/local/bin
+ 4. move the directory Template with the example templates
+ to the place that you prefer
+ 5. edit your $HOME/.vimrc and set the variable Vimplate to
+ to the place where vimplate is located
+ for example let Vimplate = "$HOME/bin/vimplate"
+ (on windows: let Vimplate = "$HOME/bin/vimplate.cmd" )
+ 6. run vimplate to create your configuration file $HOME/.vimplaterc
+ for example $HOME/bin/vimplate -createconfig
+ (on windows: $HOME/bin/vimplate.cmd -createconfig" )
+ 7. edit your $HOME/.vimplaterc
+ (on windows: $HOME/_vimplaterc)
+ 8. change to the $HOME/.vim/doc directory,
+ start Vim and run the ":helptags ." command to process the
+ taglist help file. (see: |helptags| )
+ 9. happy vimplating
+==============================================================================
+
+vim:tw=78:ts=2:ft=help
Modified: trunk/packages/vim-scripts/html/ftplugin_xml.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/ftplugin_xml.vim.html?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/ftplugin_xml.vim.html (original)
+++ trunk/packages/vim-scripts/html/ftplugin_xml.vim.html Wed Feb 7 11:52:04 2007
@@ -153,8 +153,8 @@
<tr>
<td class="lightbg"><b> script karma </b></td>
<td>
- Rating <b>800/298</b>,
- Downloaded by 13848 </td>
+ Rating <b>801/299</b>,
+ Downloaded by 13870 </td>
</tr>
</table>
<p>
Modified: trunk/packages/vim-scripts/html/index.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/index.html?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/index.html (original)
+++ trunk/packages/vim-scripts/html/index.html Wed Feb 7 11:52:04 2007
@@ -14,8 +14,6 @@
<li><a href="dtd2vim.html">dtd2vim.html</a></li>
<li><a href="ftplugin_po.vim.html">ftplugin/po.vim.html</a></li>
<li><a href="ftplugin_xml.vim.html">ftplugin/xml.vim.html</a></li>
- <li><a href="games_VimSokoban_sokoban.vim.html">games/VimSokoban_sokoban.vim.html</a></li>
- <li><a href="games_tetris.vim.html">games/tetris.vim.html</a></li>
<li><a href="macros_closetag.vim.html">macros/closetag.vim.html</a></li>
<li><a href="plugin_Align.vim.html">plugin/Align.vim.html</a></li>
<li><a href="plugin_AlignPlugin.vim.html">plugin/AlignPlugin.vim.html</a></li>
@@ -35,12 +33,13 @@
<li><a href="plugin_themes.vim.html">plugin/themes.vim.html</a></li>
<li><a href="plugin_utl.vim.html">plugin/utl.vim.html</a></li>
<li><a href="plugin_vcscommand.vim.html">plugin/vcscommand.vim.html</a></li>
+ <li><a href="plugin_vimplate.vim.html">plugin/vimplate.vim.html</a></li>
<li><a href="plugin_whatdomain.vim.html">plugin/whatdomain.vim.html</a></li>
<li><a href="plugin_winmanager.vim.html">plugin/winmanager.vim.html</a></li>
<li><a href="syntax_CVSAnnotate.vim.html">syntax/CVSAnnotate.vim.html</a></li>
</ul>
<p>
- Page generated on Sun, 04 Feb 2007 18:51:33 +0100
+ Page generated on Wed, 07 Feb 2007 11:46:04 +0100
.
</p>
</body>
Modified: trunk/packages/vim-scripts/html/macros_closetag.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/macros_closetag.vim.html?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/macros_closetag.vim.html (original)
+++ trunk/packages/vim-scripts/html/macros_closetag.vim.html Wed Feb 7 11:52:04 2007
@@ -154,7 +154,7 @@
<td class="lightbg"><b> script karma </b></td>
<td>
Rating <b>532/190</b>,
- Downloaded by 6846 </td>
+ Downloaded by 6862 </td>
</tr>
</table>
<p>
Modified: trunk/packages/vim-scripts/html/plugin_AlignPlugin.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/plugin_AlignPlugin.vim.html?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/plugin_AlignPlugin.vim.html (original)
+++ trunk/packages/vim-scripts/html/plugin_AlignPlugin.vim.html Wed Feb 7 11:52:04 2007
@@ -153,8 +153,8 @@
<tr>
<td class="lightbg"><b> script karma </b></td>
<td>
- Rating <b>761/238</b>,
- Downloaded by 7248 </td>
+ Rating <b>765/239</b>,
+ Downloaded by 7266 </td>
</tr>
</table>
<p>
Modified: trunk/packages/vim-scripts/html/plugin_EnhancedCommentify.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/plugin_EnhancedCommentify.vim.html?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/plugin_EnhancedCommentify.vim.html (original)
+++ trunk/packages/vim-scripts/html/plugin_EnhancedCommentify.vim.html Wed Feb 7 11:52:04 2007
@@ -153,8 +153,8 @@
<tr>
<td class="lightbg"><b> script karma </b></td>
<td>
- Rating <b>747/244</b>,
- Downloaded by 10573 </td>
+ Rating <b>751/245</b>,
+ Downloaded by 10601 </td>
</tr>
</table>
<p>
Modified: trunk/packages/vim-scripts/html/plugin_NERD_comments.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/plugin_NERD_comments.vim.html?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/plugin_NERD_comments.vim.html (original)
+++ trunk/packages/vim-scripts/html/plugin_NERD_comments.vim.html Wed Feb 7 11:52:04 2007
@@ -154,7 +154,7 @@
<td class="lightbg"><b> script karma </b></td>
<td>
Rating <b>346/125</b>,
- Downloaded by 4776 </td>
+ Downloaded by 4784 </td>
</tr>
</table>
<p>
Modified: trunk/packages/vim-scripts/html/plugin_a.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/plugin_a.vim.html?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/plugin_a.vim.html (original)
+++ trunk/packages/vim-scripts/html/plugin_a.vim.html Wed Feb 7 11:52:04 2007
@@ -153,8 +153,8 @@
<tr>
<td class="lightbg"><b> script karma </b></td>
<td>
- Rating <b>1616/507</b>,
- Downloaded by 12461 </td>
+ Rating <b>1620/508</b>,
+ Downloaded by 12496 </td>
</tr>
</table>
<p>
Modified: trunk/packages/vim-scripts/html/plugin_bufexplorer.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/plugin_bufexplorer.vim.html?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/plugin_bufexplorer.vim.html (original)
+++ trunk/packages/vim-scripts/html/plugin_bufexplorer.vim.html Wed Feb 7 11:52:04 2007
@@ -153,8 +153,8 @@
<tr>
<td class="lightbg"><b> script karma </b></td>
<td>
- Rating <b>1412/468</b>,
- Downloaded by 23882 </td>
+ Rating <b>1416/469</b>,
+ Downloaded by 23932 </td>
</tr>
</table>
<p>
Modified: trunk/packages/vim-scripts/html/plugin_calendar.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/plugin_calendar.vim.html?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/plugin_calendar.vim.html (original)
+++ trunk/packages/vim-scripts/html/plugin_calendar.vim.html Wed Feb 7 11:52:04 2007
@@ -154,7 +154,7 @@
<td class="lightbg"><b> script karma </b></td>
<td>
Rating <b>1028/417</b>,
- Downloaded by 15651 </td>
+ Downloaded by 15683 </td>
</tr>
</table>
<p>
Modified: trunk/packages/vim-scripts/html/plugin_cvsmenu.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/plugin_cvsmenu.vim.html?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/plugin_cvsmenu.vim.html (original)
+++ trunk/packages/vim-scripts/html/plugin_cvsmenu.vim.html Wed Feb 7 11:52:04 2007
@@ -153,8 +153,8 @@
<tr>
<td class="lightbg"><b> script karma </b></td>
<td>
- Rating <b>82/27</b>,
- Downloaded by 1431 </td>
+ Rating <b>83/28</b>,
+ Downloaded by 1434 </td>
</tr>
</table>
<p>
Modified: trunk/packages/vim-scripts/html/plugin_gnupg.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/plugin_gnupg.vim.html?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/plugin_gnupg.vim.html (original)
+++ trunk/packages/vim-scripts/html/plugin_gnupg.vim.html Wed Feb 7 11:52:04 2007
@@ -153,8 +153,8 @@
<tr>
<td class="lightbg"><b> script karma </b></td>
<td>
- Rating <b>359/136</b>,
- Downloaded by 2651 </td>
+ Rating <b>363/137</b>,
+ Downloaded by 2664 </td>
</tr>
</table>
<p>
Modified: trunk/packages/vim-scripts/html/plugin_info.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/plugin_info.vim.html?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/plugin_info.vim.html (original)
+++ trunk/packages/vim-scripts/html/plugin_info.vim.html Wed Feb 7 11:52:04 2007
@@ -154,7 +154,7 @@
<td class="lightbg"><b> script karma </b></td>
<td>
Rating <b>554/194</b>,
- Downloaded by 4768 </td>
+ Downloaded by 4769 </td>
</tr>
</table>
<p>
Modified: trunk/packages/vim-scripts/html/plugin_minibufexpl.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/plugin_minibufexpl.vim.html?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/plugin_minibufexpl.vim.html (original)
+++ trunk/packages/vim-scripts/html/plugin_minibufexpl.vim.html Wed Feb 7 11:52:04 2007
@@ -153,8 +153,8 @@
<tr>
<td class="lightbg"><b> script karma </b></td>
<td>
- Rating <b>2031/626</b>,
- Downloaded by 19488 </td>
+ Rating <b>2039/628</b>,
+ Downloaded by 19525 </td>
</tr>
</table>
<p>
Modified: trunk/packages/vim-scripts/html/plugin_project.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/plugin_project.vim.html?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/plugin_project.vim.html (original)
+++ trunk/packages/vim-scripts/html/plugin_project.vim.html Wed Feb 7 11:52:04 2007
@@ -153,8 +153,8 @@
<tr>
<td class="lightbg"><b> script karma </b></td>
<td>
- Rating <b>1491/434</b>,
- Downloaded by 13637 </td>
+ Rating <b>1495/435</b>,
+ Downloaded by 13702 </td>
</tr>
</table>
<p>
Modified: trunk/packages/vim-scripts/html/plugin_sokoban.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/plugin_sokoban.vim.html?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/plugin_sokoban.vim.html (original)
+++ trunk/packages/vim-scripts/html/plugin_sokoban.vim.html Wed Feb 7 11:52:04 2007
@@ -154,7 +154,7 @@
<td class="lightbg"><b> script karma </b></td>
<td>
Rating <b>501/138</b>,
- Downloaded by 4329 </td>
+ Downloaded by 4332 </td>
</tr>
</table>
<p>
Modified: trunk/packages/vim-scripts/html/plugin_taglist.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/plugin_taglist.vim.html?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/plugin_taglist.vim.html (original)
+++ trunk/packages/vim-scripts/html/plugin_taglist.vim.html Wed Feb 7 11:52:04 2007
@@ -153,8 +153,8 @@
<tr>
<td class="lightbg"><b> script karma </b></td>
<td>
- Rating <b>4216/1306</b>,
- Downloaded by 45023 </td>
+ Rating <b>4228/1309</b>,
+ Downloaded by 45148 </td>
</tr>
</table>
<p>
Modified: trunk/packages/vim-scripts/html/plugin_tetris.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/plugin_tetris.vim.html?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/plugin_tetris.vim.html (original)
+++ trunk/packages/vim-scripts/html/plugin_tetris.vim.html Wed Feb 7 11:52:04 2007
@@ -154,7 +154,7 @@
<td class="lightbg"><b> script karma </b></td>
<td>
Rating <b>618/223</b>,
- Downloaded by 11178 </td>
+ Downloaded by 11192 </td>
</tr>
</table>
<p>
Modified: trunk/packages/vim-scripts/html/plugin_themes.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/plugin_themes.vim.html?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/plugin_themes.vim.html (original)
+++ trunk/packages/vim-scripts/html/plugin_themes.vim.html Wed Feb 7 11:52:04 2007
@@ -154,7 +154,7 @@
<td class="lightbg"><b> script karma </b></td>
<td>
Rating <b>953/344</b>,
- Downloaded by 17520 </td>
+ Downloaded by 17567 </td>
</tr>
</table>
<p>
Modified: trunk/packages/vim-scripts/html/plugin_utl.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/plugin_utl.vim.html?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/plugin_utl.vim.html (original)
+++ trunk/packages/vim-scripts/html/plugin_utl.vim.html Wed Feb 7 11:52:04 2007
@@ -153,8 +153,8 @@
<tr>
<td class="lightbg"><b> script karma </b></td>
<td>
- Rating <b>1132/364</b>,
- Downloaded by 2462 </td>
+ Rating <b>1139/368</b>,
+ Downloaded by 2469 </td>
</tr>
</table>
<p>
Modified: trunk/packages/vim-scripts/html/plugin_vcscommand.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/plugin_vcscommand.vim.html?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/plugin_vcscommand.vim.html (original)
+++ trunk/packages/vim-scripts/html/plugin_vcscommand.vim.html Wed Feb 7 11:52:04 2007
@@ -154,7 +154,7 @@
<td class="lightbg"><b> script karma </b></td>
<td>
Rating <b>1040/342</b>,
- Downloaded by 14461 </td>
+ Downloaded by 14509 </td>
</tr>
</table>
<p>
Added: trunk/packages/vim-scripts/html/plugin_vimplate.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/plugin_vimplate.vim.html?rev=898&op=file
==============================================================================
--- trunk/packages/vim-scripts/html/plugin_vimplate.vim.html (added)
+++ trunk/packages/vim-scripts/html/plugin_vimplate.vim.html Wed Feb 7 11:52:04 2007
@@ -1,0 +1,285 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+
+<head>
+ <link rel="Stylesheet" type="text/css" href="/css/style.css" >
+ <title>vimplate - template system for vim (example for C++, Perl, LaTeX and make) : vim online</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <meta name="KEYWORDS" content="Vim, Vi IMproved, text editor, home, documentation, tips, scripts, news">
+ <link rel="shortcut icon" type="image/x-icon" href="/images/vim_shortcut.ico">
+</head>
+
+<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#ffffff">
+
+<!-- HEADER, SPONSOR IMAGE, VIM IMAGE AND BOOK AD -->
+<table width="100%" cellpadding="0" cellspacing="0" border="0" bordercolor="red">
+ <tr>
+ <td colspan="4" class="lightbg"><img src="/images/spacer.gif" width="1" height="5" alt=""></td>
+ </tr>
+ <tr>
+ <td class="lightbg"> </td>
+ <td class="lightbg" align="left"><a href="/sponsor/index.php"><img src="/images/sponsorvim.gif" alt="sponsor Vim development" border="0"></a></td>
+ <td class="lightbg" align="center"><a href="/index.php"><img src="/images/vim_header.gif" border="0" alt="Vim logo"></a></td>
+ <td class="lightbg" align="right"><a href="http://iccf-holland.org/click5.html"><img src="/images/buyhelplearn.gif" alt="Vim Book Ad" border="0"></a></td>
+ </tr>
+ <tr>
+ <td colspan="4" class="lightbg"><img src="/images/spacer.gif" width="1" height="5" alt=""></td>
+ </tr>
+ <tr>
+ <td colspan="4" class="darkbg"><img src="/images/spacer.gif" width="1" height="10" alt=""></td>
+ </tr>
+</table>
+<!-- THE PAGE BODY: BETWEEN HEADER AND FOOTER -->
+
+<table cellpadding="0" cellspacing="0" border="0" width="100%">
+ <col width="180">
+ <col width="1">
+
+ <tr valign="top">
+ <td class="sidebar">
+ <table width="180" cellpadding="4" cellspacing="0" border="0">
+ <tr valign="top">
+ <td class="sidebar">
+
+<!-- INCLUDE THE PAGE NAVIGATION -->
+<table width="100%" cellpadding="0" cellspacing="0" border="0" bordercolor="red">
+ <tr>
+ <td><small>not logged in (<a href="/login.php">login</a>)</small></td>
+ </tr>
+ <tr>
+ <td><img src="/images/spacer.gif" alt="" border="0" width="1" height="1"></td>
+ </tr>
+ <tr>
+ <td class="darkbg"><img src="/images/spacer.gif" alt='' border="0" height="3"></td>
+ </tr>
+ <tr>
+ <td><img src="/images/spacer.gif" alt="" border="0" width="1" height="2"></td>
+ </tr>
+ <tr>
+ <td class="sidebarheader"><a href="/index.php">Home</a></td>
+ </tr>
+ <tr>
+ <td class="sidebarheader"><a href="/search.php">Search</a></td>
+ </tr>
+ <tr>
+ <td><img src="/images/spacer.gif" alt="" border="0" width="1" height="7"></td>
+ </tr>
+ <tr>
+ <td class="checker"><img src="/images/spacer.gif" alt='' border="0" height="1"></td>
+ </tr>
+ <tr>
+ <td><img src="/images/spacer.gif" alt="" border="0" width="1" height="7"></td>
+ </tr>
+ <tr>
+ <td class="sidebarheader"><a href="/about.php">About Vim</a></td>
+ </tr>
+ <tr>
+ <td class="sidebarheader"><a href="/community.php">Community</a></td>
+ </tr>
+ <tr>
+ <td class="sidebarheader"><a href="/news/news.php">News</a></td>
+ </tr>
+ <tr>
+ <td class="sidebarheader"><a href="/sponsor/index.php">Sponsoring</a></td>
+ </tr>
+ <tr>
+ <td class="sidebarheader"><a href="/trivia.php">Trivia</a></td>
+ </tr>
+ <tr>
+ <td class="sidebarheader"><a href="/docs.php">Documentation</a></td>
+ </tr>
+ <tr>
+ <td class="sidebarheader"><a href="/download.php">Download</a></td>
+ </tr>
+ <tr>
+ <td><img src="/images/spacer.gif" alt="" border="0" width="1" height="7"></td>
+ </tr>
+ <tr>
+ <td class="checker"><img src="/images/spacer.gif" alt='' border="0" height="1"></td>
+ </tr>
+ <tr>
+ <td><img src="/images/spacer.gif" alt="" border="0" width="1" height="7"></td>
+ </tr>
+ <tr>
+ <td class="sidebarheader"><a href="/scripts/index.php">Scripts</a></td>
+ </tr>
+ <tr>
+ <td class="sidebarheader"><a href="/tips/index.php">Tips</a></td>
+ </tr>
+ <tr>
+ <td class="sidebarheader"><a href="/account/index.php">My Account</a></td>
+ </tr>
+ <tr>
+ <td><img src="/images/spacer.gif" alt="" border="0" width="1" height="7"></td>
+ </tr>
+ <tr>
+ <td class="checker"><img src="/images/spacer.gif" alt='' border="0" height="1"></td>
+ </tr>
+ <tr>
+ <td><img src="/images/spacer.gif" alt="" border="0" width="1" height="7"></td>
+ </tr>
+ <tr>
+ <td class="sidebarheader"><a href="/huh.php">Site Help</a></td>
+ </tr>
+</table>
+
+ <table width="172" cellpadding="0" cellspacing="0" border="0">
+ <tr><td><img src="/images/spacer.gif" alt="" border="0" width="1" height="8"></td></tr>
+ <tr><td class="darkbg"><img src="/images/spacer.gif" width="1" height="3" alt=""></td></tr>
+ </table>
+ <br>
+
+<!-- INCLUDE THE PAGE SIDEBAR TEXT -->
+
+
+ </td>
+ </tr>
+ </table>
+ </td>
+
+ <td class="darkbg"><img src="/images/spacer.gif" width="1" height="1" border="0" alt=""><br></td>
+ <td>
+ <table width="100%" cellpadding="10" cellspacing="0" border="0" bordercolor="red">
+ <tr>
+ <td valign="top">
+
+<span class="txth1">vimplate : template system for vim (example for C++, Perl, LaTeX and make)</span>
+
+<br>
+<br>
+
+<!-- karma table -->
+<table cellpadding="4" cellspacing="0" border="1" bordercolor="#000066">
+<tr>
+ <td class="lightbg"><b> script karma </b></td>
+ <td>
+ Rating <b>129/39</b>,
+ Downloaded by 1037 </td>
+</tr>
+</table>
+<p>
+
+<table cellspacing="0" cellpadding="0" border="0">
+<tr><td class="prompt">created by</td></tr>
+<tr><td><a href="/account/profile.php?user_id=5415">Urs Stotz</a></td></tr>
+<tr><td> </td></tr>
+<tr><td class="prompt">script type</td></tr>
+<tr><td>utility</td></tr>
+<tr><td> </td></tr>
+<tr><td class="prompt">description</td></tr>
+<tr><td> 1. Description
<br> 2. Usage
<br> 3. Subroutines
<br> 4. Example
<br> 5. Documentation
<br> 6. Depends
<br> 7. Installation
<br>
<br>
<br>1. Description *vimplate-description*
<br>
<br>Vimplate provides an extensible and powerful template processing system.
<br>It is based on Perl and Template-Toolkit.
<br>You can create templates for program code, makefiles, letters, html pages,
<br>latex etc. As example vimplate contains templates for C++, LaTeX, Perl
<br>and Makefile.
<br>With vimplate you can write templates which interact with the user.
<br>For themes are the functions choice() and input().
<br>You can choose different locale for the function date() and locale().
<br>You can write your own perl code directly in the templates.
<br>
<br>In case you find my template useful,
<br>or have suggestions for improvements, please let me know.
<br>
<br>If you write a new template,
<br>and would like me to add it to the vimplate package
<br>please send it to: stotz at gmx.ch
<br>
<br>
<br>2. Usage *vimplate-usage*
<br>
<br>Usage:
<br> :Vimplate <template> [options]
<br> choice <template> whit <TAB> (command line completion is supported).
<br> With <TAB> all templates are listed.
<br> [options]
<br> -user|u=<username>
<br> Use the information form user <username> while parsing templates.
<br> -dir|d=<templatedir>
<br> Search templatefiles in <templatedir>.
<br>
<br>
<br>3. Subroutines *vimplate-subroutines*
<br>
<br> locale() for locale please see: man locale
<br> [% loc=locale() %] get the current locale
<br> and write it to the variable loc
<br> [% locale('C') %] set global the current locale to C
<br> [% locale('de_DE') %] set global the current locale to de_DE
<br> date() for date please see: man date
<br> [% date('%c') %] print the current date
<br> with the current locale setting
<br> [% date('de_DE', '%c') %] print the current date with the locale de_DE
<br> input()
<br> [% var=input() %] read input from user
<br> and write it to the variable var
<br> choice()
<br> [% day=choice('day:', 'Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa') %]
<br> let the user choice between different values
<br> and write it to the variable day
<br>
<br> please try :Vimplate Test
<br>
<br>
<br>4. Example *vimplate-example*
<br>
<br>a LaTeX Template:
<br> <a target="_blank" href="http://www.napali.ch/vimplate/example/LaTeX.tt.html">http://www.napali.ch/vimplate/example/LaTeX.tt.html</A>
<br>the generated LaTeX File:
<br> <a target="_blank" href="http://www.napali.ch/vimplate/example/Example.tex.html">http://www.napali.ch/vimplate/example/Example.tex.html</A>
<br>a Makefile Template for LaTeX:
<br> <a target="_blank" href="http://www.napali.ch/vimplate/example/Makefile-LaTeX.tt.html">http://www.napali.ch/vimplate/example/Makefile-LaTeX.tt.html</A>
<br>the generated Makefile:
<br> <a target="_blank" href="http://www.napali.ch/vimplate/example/Makefile.html">http://www.napali.ch/vimplate/example/Makefile.html</A>
<br>c++ Templates:
<br> <a target="_blank" href="http://www.napali.ch/vimplate/example/hpp-default.tt.html">http://www.napali.ch/vimplate/example/hpp-default.tt.html</A>
<br> <a target="_blank" href="http://www.napali.ch/vimplate/example/cpp-default.tt.html">http://www.napali.ch/vimplate/example/cpp-default.tt.html</A>
<br>the generated class:
<br> <a target="_blank" href="http://www.napali.ch/vimplate/example/Example.hpp.html">http://www.napali.ch/vimplate/example/Example.hpp.html</A>
<br> <a target="_blank" href="http://www.napali.ch/vimplate/example/Example.cpp.html">http://www.napali.ch/vimplate/example/Example.cpp.html</A>
<br>the generated class with doxygen:
<br> <a target="_blank" href="http://www.napali.ch/vimplate/example/ExampleDoxy.hpp.html">http://www.napali.ch/vimplate/example/ExampleDoxy.hpp.html</A>
<br> <a target="_blank" href="http://www.napali.ch/vimplate/example/ExampleDoxy.cpp.html">http://www.napali.ch/vimplate/example/ExampleDoxy.cpp.html</A>
<br>a perl Template:
<br> <a target="_blank" href="http://www.napali.ch/vimplate/example/perl.tt.html">http://www.napali.ch/vimplate/example/perl.tt.html</A>
<br>the genereated program:
<br> <a target="_blank" href="http://www.napali.ch/vimplate/example/Example.pl.html">http://www.napali.ch/vimplate/example/Example.pl.html</A>
<br>the genereated program with Log4Perl:
<br> <a target="_blank" href="http://www.napali.ch/vimplate/example/ExampleLog.pl.html">http://www.napali.ch/vimplate/example/ExampleLog.pl.html</A>
<br>
<br>Example:
<br> the template letter.tt:
<br> ________________________________________________________
<br> [%
<br> sex=choice('sex: ', 'female', 'male')
<br> name=input('name: ')
<br> location=input('your location: ')
<br> -%]
<br> [% ucfirst(location) %], [% date('C', '%b %d, %Y') %]
<br>
<br> Dear [% IF sex=='female'; 'Ms'; ELSE; 'Mr'; END %] [% ucfirst(name) %]
<br>
<br> ...
<br>
<br> Sincerely
<br>
<br> [% user.firstname %] [% user.lastname %]
<br> ________________________________________________________
<br>
<br> run vim:
<br> :Vimplate letter
<br> sex:
<br> 0) female
<br> 1) male
<br> 0
<br> name: Meier
<br> your location: Olten
<br>
<br> your input was:
<br> :Vimplate letter<CR>0<CR>Meier<CR>Olten<CR>
<br>
<br> this will produce this letter:
<br> ________________________________________________________
<br> Olten, Jul 11, 2005
<br>
<br> Dear Ms Meier
<br>
<br> ...
<br>
<br> Sincerely
<br>
<br> Urs Stotz
<br> ________________________________________________________
<br>
<br>Example:
<br> the template hpp-default.tt:
<br> ________________________________________________________
<br> [% classname=input('Class name: ')
<br> doxygen=choice('with Doxygen comments: ', 'no', 'yes')
<br> -%]
<br> #ifndef [% uc(classname) %]_HPP
<br> #define [% uc(classname) %]_HPP
<br>
<br> [% IF doxygen=='yes' -%]
<br> /**
<br> * @brief [% classname %] ... short description ...
<br> * @author [% user.firstname %] [% user.lastname %] <[% user.mail %]>
<br> * @date [% date('%Y-%m-%d') %]
<br> * ... description ...
<br> */
<br>
<br> [% END -%]
<br> class [% classname %]
<br> {
<br> public:
<br> [% IF doxygen=='yes' -%]
<br>
<br> /**
<br> * Default constructor
<br> */
<br> [% END -%]
<br> [% classname %]();
<br> [% IF doxygen=='yes' -%]
<br>
<br> /**
<br> * Copy constructor
<br> * @param other reference on object to copy
<br> */
<br> [% END -%]
<br> [% classname %](const [% classname %]& other);
<br> [% IF doxygen=='yes' -%]
<br>
<br> /**
<br> * Assignment operator
<br> * @param other reference on object to copy
<br> * @return reference on initialisated object
<br> */
<br> [% END -%]
<br> [% classname %]& operator=(const [% classname %]& other);
<br> [% IF doxygen=='yes' -%]
<br>
<br> /**
<br> * Destructor
<br> */
<br> [% END -%]
<br> virtual ~[% classname %]();
<br>
<br> private:
<br> [% IF doxygen=='yes' -%]
<br>
<br> /**
<br> * Base initialisation should be called
<br> * at beginning of each constructor
<br> */
<br> [% END -%]
<br> void init();
<br> [% IF doxygen=='yes' -%]
<br>
<br> /**
<br> * Method to copy each member (deep copy)
<br> * @param other reference on object to copy
<br> */
<br> [% END -%]
<br> void init(const [% classname %]& other);
<br> };
<br>
<br> #endif /* #ifndef [% uc(classname) %]_HPP */
<br> ________________________________________________________
<br>
<br> run vim:
<br> :Vimplate hpp-default
<br> Class name: Parent
<br> with Doxygen comments:
<br> 0) no
<br> 1) yes
<br> 1
<br>
<br> your input was:
<br> :Vimplate hpp-default<CR>Parent<CR>1<CR>
<br>
<br> this will produce this c++ include file:
<br> ________________________________________________________
<br> #ifndef PARENT_HPP
<br> #define PARENT_HPP
<br>
<br> /**
<br> * @brief Parent ... short description ...
<br> * @author Urs Stotz <stotz at gmx.ch>
<br> * @date 2005-07-18
<br> * ... description ...
<br> */
<br>
<br> class Parent
<br> {
<br> public:
<br>
<br> /**
<br> * Default constructor
<br> */
<br> Parent();
<br>
<br> /**
<br> * Copy constructor
<br> * @param other reference on object to copy
<br> */
<br> Parent(const Parent& other);
<br>
<br> /**
<br> * Assignment operator
<br> * @param other reference on object to copy
<br> * @return reference on initialisated object
<br> */
<br> Parent& operator=(const Parent& other);
<br>
<br> /**
<br> * Destructor
<br> */
<br> virtual ~Parent();
<br>
<br> private:
<br>
<br> /**
<br> * Base initialisation should be called
<br> * at beginning of each constructor
<br> */
<br> void init();
<br>
<br> /**
<br> * Method to copy each member (deep copy)
<br> * @param other reference on object to copy
<br> */
<br> void init(const Parent& other);
<br> };
<br>
<br> #endif /* #ifndef PARENT_HPP */
<br> ________________________________________________________
<br>
<br>
<br>5. Documentation *vimplate-documentation*
<br>
<br>Documentation:
<br> - <a target="_blank" href="http://napali.ch/vimplate">http://napali.ch/vimplate</A>
<br> - <a target="_blank" href="http://www.template-toolkit.org/docs.html">http://www.template-toolkit.org/docs.html</A>
<br> - <a target="_blank" href="http://perldoc.perl.org/perl.html">http://perldoc.perl.org/perl.html</A>
<br>
<br>Todo:
<br> - better exception handling
<br> - write more templates
<br>
<br>License:
<br> This program is free software; you can redistribute it and/or modify it
<br> under the terms of the GNU General Public License, version 2, as published
<br> by the Free Software Foundation.
<br>
<br> This program is distributed in the hope that it will be useful, but
<br> WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
<br> or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
<br> for more details.
<br>
<br> A copy of the GNU GPL is available as /usr/share/common-licenses/GPL-2
<br> on Debian systems, or on the World Wide Web at
<br> <a target="_blank" href="http://www.gnu.org/copyleft/gpl.html">http://www.gnu.org/copyleft/gpl.html</A>
<br> You can also obtain it by writing to the Free Software Foundation, Inc.,
<br> 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
<br>
<br>Copyright:
<br> Copyright (c) 2005, Urs Stotz <stotz at gmx.ch>
<br>
<br>Version:
<br> vimplate 0.2.3
<br></td></tr>
+<tr><td> </td></tr>
+<tr><td class="prompt">install details</td></tr>
+<tr><td>6. Depends: *vimplate-depends*
<br>
<br> Perl
<br> <a target="_blank" href="http://www.perl.org">http://www.perl.org</A>
<br> Windows users:
<br> <a target="_blank" href="http://www.activestate.com/Products/ActivePerl">http://www.activestate.com/Products/ActivePerl</A>
<br> Template-Toolkit
<br> <a target="_blank" href="http://search.cpan.org/~abw/Template-Toolkit-2.14">http://search.cpan.org/~abw/Template-Toolkit-2.14</A>
<br> or apt-get install libtemplate-perl
<br> or perl -MCPAN -e"install Template"
<br> Windows users:
<br> ppm install
<br> <a target="_blank" href="http://openinteract.sourceforge.net/ppmpackages/AppConfig.ppd">http://openinteract.sourceforge.net/ppmpackages/AppConfig.ppd</A>
<br> ppm install
<br> <a target="_blank" href="http://openinteract.sourceforge.net/ppmpackages/Template-Toolkit.ppd">http://openinteract.sourceforge.net/ppmpackages/Template-Toolkit.ppd</A>
<br>
<br>Suggests:
<br> TT2 syntax:
<br> <a target="_blank" href="http://www.vim.org/scripts/script.php?script_id=830">http://www.vim.org/scripts/script.php?script_id=830</A>
<br>
<br>
<br>7. Installation *vimplate-installation*
<br>
<br>Installation steps:
<br> 1. change to your $HOME/.vim directory
<br> (on windows: set the variable HOME
<br> set HOME=c:\vim)
<br> 2. untar vimplate.tar.gz: gzip -dc vimplate.tar.gz |tar xpvf -
<br> 3. move the vimplate into your preferred directory
<br> for example in $HOME/bin or /usr/local/bin
<br> 4. move the directory Template with the example templates
<br> to the place that you prefer
<br> 5. edit your $HOME/.vimrc and set the variable Vimplate to
<br> to the place where vimplate is located
<br> for example let Vimplate = "$HOME/bin/vimplate"
<br> (on windows: let Vimplate = "%HOME%/bin/vimplate.cmd" )
<br> 6. run vimplate to create your configuration file $HOME/.vimplaterc
<br> for example $HOME/bin/vimplate -createconfig
<br> (on windows: %HOME%/bin/vimplate.cmd -createconfig" )
<br> 7. edit your $HOME/.vimplaterc
<br> (on windows: %HOME%/_vimplaterc)
<br> 8. change to the $HOME/.vim/doc directory,
<br> start Vim and run the ":helptags ." command to process the
<br> taglist help file. (see: |helptags| )
<br> 9. happy vimplating</td></tr>
+<tr><td> </td></tr>
+</table>
+
+<!-- rating table -->
+<form name="rating">
+<input type="hidden" name="script_id" value="1311">
+<table cellpadding="4" cellspacing="0" border="1" bordercolor="#000066">
+<tr>
+ <td class="lightbg"><b>rate this script</b></td>
+ <td valign="middle">
+ <input type="radio" name="rating" value="life_changing">Life Changing
+ <input type="radio" name="rating" value="helpful">Helpful
+ <input type="radio" name="rating" value="unfulfilling">Unfulfilling
+ <input type="submit" value="rate">
+ </td>
+</tr>
+</table>
+</form>
+<span class="txth2">script versions</span> (<a href="add_script_version.php?script_id=1311">upload new version</a>)
+<p>
+Click on the package to download.
+<p>
+
+<table cellspacing="2" cellpadding="4" border="0" width="100%">
+<tr class='tableheader'>
+ <th valign="top">package</th>
+ <th valign="top">script version</th>
+ <th valign="top">date</th>
+ <th valign="top">Vim version</th>
+ <th valign="top">user</th>
+ <th valign="top">release notes</th>
+</tr>
+<tr>
+ <td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=4504">vimplate-0.2.3.tar.gz</a></td>
+ <td class="rowodd" valign="top" nowrap><b>0.2.3</b></td>
+ <td class="rowodd" valign="top" nowrap><i>2005-08-20</i></td>
+ <td class="rowodd" valign="top" nowrap>6.0</td>
+ <td class="rowodd" valign="top"><i><a href="/account/profile.php?user_id=5415">Urs Stotz</a></i></td>
+ <td class="rowodd" valign="top" width="2000">The perl vimplate script is running now also on Windows.
<br>A vim help added.
<br>Dokumentation written for Windows ActiveState Perl User.
<br>Templates for C++, Perl, LaTeX and make revised.</td>
+</tr>
+<tr>
+ <td class="roweven" valign="top" nowrap><a href="download_script.php?src_id=4438">vimplate-0.2.2.tar.gz</a></td>
+ <td class="roweven" valign="top" nowrap><b>0.2.2</b></td>
+ <td class="roweven" valign="top" nowrap><i>2005-07-18</i></td>
+ <td class="roweven" valign="top" nowrap>6.0</td>
+ <td class="roweven" valign="top"><i><a href="/account/profile.php?user_id=5415">Urs Stotz</a></i></td>
+ <td class="roweven" valign="top" width="2000">Better templates for C++. Now with choose between Doxygen comments or non comments.
<br>Vimplate should be running on Windows when there Template-Toolkit is installed.</td>
+</tr>
+</table>
+<!-- finish off the framework -->
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+
+<!-- END OF THE PAGE BODY: BETWEEN HEADER AND FOOTER -->
+
+<table width="100%" cellpadding="0" cellspacing="0" border="0" bordercolor="red">
+ <tr><td colspan="4"><img src="/images/spacer.gif" width="1" height="5" alt=""></td></tr>
+ <tr><td colspan="4" bgcolor="#000000"><img src="/images/spacer.gif" height="2" width="1" alt=""></td></tr>
+ <tr><td colspan="4"><img src="/images/spacer.gif" width="1" height="5" alt=""></td></tr>
+ <tr>
+ <td><img src="/images/spacer.gif" width="5" height="1" alt=""></td>
+
+ <td align="left" valign="top"><small>
+ If you have questions or remarks about this site, visit the
+ <a href="http://vimonline.sf.net">vimonline development</a> pages.
+ Please use this site responsibly.
+ <br>
+
+ Questions about <a href="http://www.vim.org/about.php">Vim</a> should go
+ to vim at vim.org after searching
+ <a href="http://groups.yahoo.com/group/vim">the archive</a>.
+ Help Bram <a href="http://iccf-holland.org/">help Uganda</a>.
+ </small>
+
+
+
+ <!-- Start of StatCounter Code -->
+ <script type="text/javascript" language="javascript">
+ var sc_project=1417324;
+ var sc_invisible=1;
+ var sc_partition=11;
+ var sc_security="d41633bc";
+ </script>
+
+ <script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><a href="http://www.statcounter.com/" target="_blank"><img src="http://c12.statcounter.com/counter.php?sc_project=1417324&java=0&security=d41633bc&invisible=0" alt="free tracking" border="0"></a> </noscript>
+ <!-- End of StatCounter Code -->
+ <small>
+ <a href="http://my.statcounter.com/project/standard/stats.php?project_id=1417324&guest=1">stats</a>
+ </small>
+ </td>
+
+ <td align="right" valign="top">
+ <a href="http://www.webconceptgroup.net"><img src="/images/logo_sponsor_wcg.jpg" width="131" height="30" border="0" alt="Sponsored by Web Concept Group Inc."></a>
+ <a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=8&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a>
+ </td>
+
+ <td><img src="/images/spacer.gif" width="5" height="1" alt=""></td>
+ </tr>
+
+
+ <tr><td colspan="4"><img src="/images/spacer.gif" width="1" height="5" alt=""></td>
+
+ </tr>
+</table>
+
+</body>
+</html>
+
Modified: trunk/packages/vim-scripts/html/plugin_winmanager.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/plugin_winmanager.vim.html?rev=898&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/plugin_winmanager.vim.html (original)
+++ trunk/packages/vim-scripts/html/plugin_winmanager.vim.html Wed Feb 7 11:52:04 2007
@@ -154,7 +154,7 @@
<td class="lightbg"><b> script karma </b></td>
<td>
Rating <b>632/212</b>,
- Downloaded by 14020 </td>
+ Downloaded by 14039 </td>
</tr>
</table>
<p>
Added: trunk/packages/vim-scripts/plugin/vimplate.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/plugin/vimplate.vim?rev=898&op=file
==============================================================================
--- trunk/packages/vim-scripts/plugin/vimplate.vim (added)
+++ trunk/packages/vim-scripts/plugin/vimplate.vim Wed Feb 7 11:52:04 2007
@@ -1,0 +1,37 @@
+"""""""""""""""""""""""""""""""""""""""""""""
+" vimplate - Template-Toolkit support for Vim
+"""""""""""""""""""""""""""""""""""""""""""""
+" please see:
+" :help vimplate
+" or
+" http://www.vim.org/scripts/script.php?script_id=1311
+" Version:
+" vimplate 0.2.3
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+" allow user to avoid loading this plugin and prevent loading twice
+if exists ("loaded_vimplate")
+ finish
+endif
+let loaded_vimplate = 1
+
+let s:vimplate = Vimplate
+
+function s:RunVimplate(template)
+ let l:tmpfile = tempname()
+ let l:cmd = s:vimplate. " -out=" . l:tmpfile . " -template=" . a:template
+ let l:line = line(".")
+ execute "!" . l:cmd
+ silent execute "read " . l:tmpfile
+ execute delete(l:tmpfile)
+ execute "normal " . l:line . "G"
+ if getline(".") =~ "^$"
+ execute "normal dd"
+ endif
+endfunction
+
+function ListTemplates(...)
+ return system(s:vimplate . " -listtemplates")
+endfun
+
+command! -complete=custom,ListTemplates -nargs=1 Vimplate call s:RunVimplate(<f-args>)
Added: trunk/packages/vim-scripts/share/vimplate-templates/LaTeX.tt
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/share/vimplate-templates/LaTeX.tt?rev=898&op=file
==============================================================================
--- trunk/packages/vim-scripts/share/vimplate-templates/LaTeX.tt (added)
+++ trunk/packages/vim-scripts/share/vimplate-templates/LaTeX.tt Wed Feb 7 11:52:04 2007
@@ -1,0 +1,100 @@
+[% titel=input('titel: ')
+ class=choice('class type: ', 'article', 'report', 'letter', 'book')
+ german=choice('language german: ', 'no', 'yes')
+ tfsize=choice('typeface size: ', '10pt', '11pt', '12pt')
+ paper=choice('paper: ', 'a4paper', 'a5paper', 'b5paper', 'letterpaper', 'legalpaper', 'executivepaper')
+ titelpg=choice('titel page: ', 'notitlepage', 'titlepage')
+ side=choice('side layout: ', 'oneside', 'twoside')
+ column=choice('column: ', 'onecolumn', 'twocolumn')
+-%]
+\documentclass[[% tfsize %],[% paper %],[% titelpg %],[% side %],[% column %],pagesize]{[% class %]}
+\usepackage{multicol}
+\usepackage{graphicx} % extended graphics package.
+\usepackage{color}
+\usepackage{isolatin1} % 8 bit character and ISO-8859 Latin-1 codes.
+\usepackage{eurosym}
+\usepackage{textcomp} % allow TS1-encoding symbols.
+\usepackage{anysize} % set margin sizes with simple commands.
+[% IF german=='yes' -%]
+\usepackage{german}
+[% END -%]
+\usepackage{html}
+\usepackage{hthtml}
+\usepackage[ps2pdf]{thumbpdf}
+\usepackage[
+ ps2pdf,
+ pagebackref,
+ pdfpagelabels,
+ extension=pdf,
+]{hyperref}
+\hypersetup{
+ pdftitle = {[% titel %]},
+ pdfsubject = {},
+ pdfauthor = {[% user.firstname %] [% user.lastname %] <[% user.mail %]>},
+ pdfkeywords = {},
+ pdfcreator = {ps2pdf with Ghostscript},
+ pdfproducer = {LaTeX with hyperref and thumbpdf},
+ bookmarks = true,
+ bookmarksopen = true,
+ bookmarksnumbered = true,
+ pdfstartpage = {1},
+ pdfpagemode = UseThumbs,
+ colorlinks = true,
+ linkcolor = red,
+ anchorcolor = red,
+ citecolor = blue,
+ filecolor = red,
+ pagecolor = red,
+ urlcolor = red
+}
+
+\marginsize{25mm}{25mm}{25mm}{15mm} %anysize, links*rechts*oben*unten
+\setlength{\parindent}{0mm}
+
+[% IF german=='yes' -%]
+\date{[% date('de_DE', '%d. %B %Y') %]}
+[% ELSE -%]
+\date{[% date('C', '%d. %B %Y') %]}
+[% END -%]
+\author{[% user.firstname %]~[% user.lastname %]}
+\title{[% titel %]}
+
+\begin{document}
+\maketitle
+
+\newpage
+\tableofcontents
+\newpage
+
+% Beispiele
+%
+% URL
+% \href{http://napali.ch}{napali}
+% \url{http://napali.ch}
+% \url{mailto:stotz at gmx.ch}
+%
+% Bilder
+% \begin{figure}[htb]
+% \begin{center}
+% \includegraphics[scale=1]{logo}
+% \caption{Welcome}
+% \label{fig:logo}
+% \begin{center}
+% \end{figure}
+%
+% Bibliographie
+% \cite{ID}
+% \begin{thebibliography}{1}
+% \bibitem{ID} Buchtitel
+% Vorname Name: \textit{Titel}
+% Verlag 1999.
+% \end{thebibliography}
+
+[% IF class=='book' -%]
+\chapter{Kapiteltitel}
+[% ELSE -%]
+\section{Sektionstitel}
+[% END -%]
+...
+
+\end{document}
Added: trunk/packages/vim-scripts/share/vimplate-templates/Makefile-C.tt
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/share/vimplate-templates/Makefile-C.tt?rev=898&op=file
==============================================================================
--- trunk/packages/vim-scripts/share/vimplate-templates/Makefile-C.tt (added)
+++ trunk/packages/vim-scripts/share/vimplate-templates/Makefile-C.tt Wed Feb 7 11:52:04 2007
@@ -1,0 +1,24 @@
+##################################################
+# Author: [% user.firstname %] [% user.lastname %] <[% user.mail %]>
+# Date: [% date('C', '%Y-%m-%d') %]
+##################################################
+
+PROGS = [% input('list of program names:') %]
+DEBUG = -O0 -ggdb -pg
+CFLAGS += -Wall -pedantic -ansi ${DEBUG}
+LDFLAGS +=
+CPPFLAGS +=
+FLAGS += ${CFLAGS} ${LDFLAGS} ${CPPFLAGS}
+
+all: ${PROGS}
+
+${PROGS}: % : %.c
+ ${CC} -o $@ ${FLAGS} $<
+
+test: all
+ @for prog in ${PROGS}; do \
+ echo $$prog; ./$$prog; \
+ done
+
+clean:
+ ${RM} *.o core ${PROGS}
Added: trunk/packages/vim-scripts/share/vimplate-templates/Makefile-LaTeX.tt
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/share/vimplate-templates/Makefile-LaTeX.tt?rev=898&op=file
==============================================================================
--- trunk/packages/vim-scripts/share/vimplate-templates/Makefile-LaTeX.tt (added)
+++ trunk/packages/vim-scripts/share/vimplate-templates/Makefile-LaTeX.tt Wed Feb 7 11:52:04 2007
@@ -1,0 +1,43 @@
+[% name=input('Name of the main LaTeX file: ') -%]
+##################################################
+# Author: [% user.firstname %] [% user.lastname %] <[% user.mail %]>
+# Date: [% date('C', '%Y-%m-%d') %]
+##################################################
+
+NAME = [% name %]
+
+default: ${NAME}.dvi
+all: ${NAME}.dvi ${NAME}.ps ${NAME}.pdf html
+dvi: ${NAME}.dvi
+ps: ${NAME}.ps
+pdf: ${NAME}.pdf
+txt: ${NAME}.txt
+
+${NAME}.dvi: ${NAME}.tex
+ latex ${NAME}.tex
+ latex ${NAME}.tex
+ latex ${NAME}.tex
+
+${NAME}.ps: ${NAME}.dvi
+ dvips -Ppdf ${NAME}.dvi
+
+${NAME}.pdf: ${NAME}.ps
+ ps2pdf ${NAME}.ps
+ thumbpdf --modes=ps2pdf ${NAME}.pdf
+ dvips -Ppdf ${NAME}.dvi
+ ps2pdf ${NAME}.ps
+
+html: ${NAME}.tex
+ ${RM} -rf html
+ latex2html -dir html -mkdir ${NAME}.tex
+
+one_html: ${NAME}.tex
+ ${RM} -rf one_html
+ latex2html -split 0 -no_navigation -dir one_html -mkdir ${NAME}.tex
+
+${NAME}.txt: one_html
+ lynx -dump one_html/index.html >${NAME}.txt
+
+clean:
+ ${RM} *.aux *.log *.out *.toc *.tpm \
+ ${NAME}.dvi ${NAME}.ps ${NAME}.pdf ${NAME}.txt -rf html one_html
Added: trunk/packages/vim-scripts/share/vimplate-templates/Test.tt
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/share/vimplate-templates/Test.tt?rev=898&op=file
==============================================================================
--- trunk/packages/vim-scripts/share/vimplate-templates/Test.tt (added)
+++ trunk/packages/vim-scripts/share/vimplate-templates/Test.tt Wed Feb 7 11:52:04 2007
@@ -1,0 +1,15 @@
+[% name=input('her name: ') -%]
+[% eyescolor=choice('her eyes: ', 'blue', 'green', 'gray', 'black') -%]
+[% weekday=choice('which weekday: ', 'Sonnday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday') -%]
+[% location=input('your own location: ') -%]
+ [% ucfirst(location) %], [% date('%b %d, %Y') %]
+My Dear [% ucfirst(name) %],
+
+Do you know that I love the color of your [% eyescolor %] eyes?
+... bla, ... bla, ... bla
+
+I'm glad to see you on [% weekday %]
+
+Much Love,
+
+[% user.firstname %]
Added: trunk/packages/vim-scripts/share/vimplate-templates/cpp-default.tt
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/share/vimplate-templates/cpp-default.tt?rev=898&op=file
==============================================================================
--- trunk/packages/vim-scripts/share/vimplate-templates/cpp-default.tt (added)
+++ trunk/packages/vim-scripts/share/vimplate-templates/cpp-default.tt Wed Feb 7 11:52:04 2007
@@ -1,0 +1,26 @@
+[% classname=input("Class name: ") -%]
+#include "[% classname %].hpp"
+
+// [% date('%Y-%m-%d') %] [% user.firstname %] [% user.lastname %] <[% user.mail %]>
+
+[% classname %]::[% classname %]()
+{
+}
+
+[% classname %]::~[% classname %]()
+{
+ // cleanup
+}
+
+[% classname %]::[% classname %](const [% classname %]& other)
+{
+ *this=other;
+}
+
+[% classname %]& [% classname %]::operator=(const [% classname %]& other)
+{
+ if (this != &other){ // no self-assignmet
+ // deep copy
+ }
+ return *this;
+}
Added: trunk/packages/vim-scripts/share/vimplate-templates/hpp-default.tt
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/share/vimplate-templates/hpp-default.tt?rev=898&op=file
==============================================================================
--- trunk/packages/vim-scripts/share/vimplate-templates/hpp-default.tt (added)
+++ trunk/packages/vim-scripts/share/vimplate-templates/hpp-default.tt Wed Feb 7 11:52:04 2007
@@ -1,0 +1,55 @@
+[% classname=input('Class name: ')
+ doxygen=choice('with Doxygen comments: ', 'no', 'yes')
+-%]
+#ifndef [% uc(classname) %]_HPP
+#define [% uc(classname) %]_HPP
+
+[% IF doxygen=='yes' -%]
+/**
+ * @brief [% classname %] ... short description ...
+ * @author [% user.firstname %] [% user.lastname %] <[% user.mail %]>
+ * @date [% date('%Y-%m-%d') %]
+ * ... description ...
+ */
+
+[% END -%]
+class [% classname %]
+{
+ public:
+[% IF doxygen=='yes' -%]
+
+ /**
+ * Default constructor
+ */
+[% END -%]
+ [% classname %]();
+[% IF doxygen=='yes' -%]
+
+ /**
+ * Destructor
+ */
+[% END -%]
+ virtual ~[% classname %]();
+[% IF doxygen=='yes' -%]
+
+ /**
+ * Copy constructor
+ * @param other Reference on object to copy.
+ */
+[% END -%]
+ [% classname %](const [% classname %]& other);
+[% IF doxygen=='yes' -%]
+
+ /**
+ * Assignment operator
+ * @param other Reference on object to copy.
+ * @return Reference on initialisated object.
+ */
+[% END -%]
+ [% classname %]& operator=(const [% classname %]& other);
+
+ private:
+
+};
+
+#endif /* #ifndef [% uc(classname) %]_HPP */
Added: trunk/packages/vim-scripts/share/vimplate-templates/perl.tt
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/share/vimplate-templates/perl.tt?rev=898&op=file
==============================================================================
--- trunk/packages/vim-scripts/share/vimplate-templates/perl.tt (added)
+++ trunk/packages/vim-scripts/share/vimplate-templates/perl.tt Wed Feb 7 11:52:04 2007
@@ -1,0 +1,174 @@
+[% programname=input("Program name: ")
+ log4perl=choice('with Log::Log4perl: ', 'no', 'yes')
+-%]
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+
+=head1 NAME
+
+[% programname %] - short description
+
+=cut
+
+use constant VERSION => '0.0.1';
+
+use diagnostics;
+use Getopt::Long qw(:config no_ignore_case posix_default );
+use Pod::Usage;
+[% IF log4perl=='yes' -%]
+use Log::Log4perl qw(:easy);
+[% END -%]
+
+=head1 SYNOPSIS
+
+[% programname %] -run -help|-h -man -version [...]
+[% IF log4perl=='yes' -%]
+ -loglevel=<string> -logfile=<file> -loglayout=<layout string>
+[% END -%]
+
+=cut
+
+my %opt = ();
+GetOptions( \%opt, 'run!', 'help|h!', 'man!', 'version!',
+ [% IF log4perl=='yes' -%] 'loglevel=s', 'logfile=s', 'loglayout=s' [% END -%] )
+ or pod2usage( -verbose => 0, -exitval => 1, -output => \*STDERR );
+
+=head1 OPTIONS
+
+=over 4
+[% IF log4perl=='yes' -%]
+
+=item B<-loglevel>
+
+Set the loglevel=<DEBUG|INFO|WARN|ERROR|FATAL> default is WARN.
+
+=cut
+
+$opt{loglevel} ='INFO' unless (defined $opt{loglevel});
+
+=item B<-logfile>
+
+Set the logfile=<file> default is STDERR.
+
+=cut
+
+$opt{logfile} ='STDERR' unless (defined $opt{logfile});
+
+=item B<-loglayout>
+
+Set the loglayout=<format> default is '%d %r %p %F %L %M %m%n'
+
+The format string can contain a number of placeholders which will be
+replaced by the logging engine when it's time
+to log the message:
+
+ %c Category of the logging event.
+ %C Fully qualified package (or class) name of the caller
+ %d Current date in yyyy/MM/dd hh:mm:ss format
+ %F File where the logging event occurred
+ %H Hostname
+ %l Fully qualified name of the calling method followed by the
+ callers source the file name and line number between
+ parentheses.
+ %L Line number within the file where the log statement was issued
+ %m The message to be logged
+ %M Method or function where the logging request was issued
+ %n Newline (OS-independent)
+ %p Priority of the logging event
+ %P pid of the current process
+ %r Number of milliseconds elapsed from program start to logging
+ event
+ %x The elements of the NDC stack (see below)
+ %X{key} The entry 'key' of the MDC (see below)
+ %% A literal percent (%) sign
+
+=cut
+
+$opt{loglayout}="%d $$ %p %F %L %M %m%n" unless (defined $opt{loglayout});
+
+Log::Log4perl->easy_init(
+ {
+ category => __PACKAGE__,
+ level => $opt{loglevel},
+ file => $opt{logfile},
+ layout => $opt{loglayout},
+ }
+);
+DEBUG("Option: \$opt{$_}=$opt{$_}") for ( keys %opt );
+[% END -%]
+
+=item B<-help|-h>
+
+Print a brief help message and exit.
+
+=cut
+
+if ( defined $opt{help} ) {
+ pod2usage( -verbose => 1, -exitval => 0 );
+}
+
+=item B<-man>
+
+Prints the manual page and exit.
+
+=cut
+
+if ( defined $opt{man} ) {
+ pod2usage(-verbose => 2, -exitval => 0);
+}
+
+=item B<-version>
+
+Prints the version number and exit.
+
+=cut
+
+if ( defined $opt{version} ) {
+ print '[% programname %] version ' . VERSION . "\n";
+ exit 0;
+}
+
+=item B<-run>
+
+This option is running your program.
+
+=cut
+
+unless ( defined( $opt{run} )) {
+ pod2usage(-verbose => 0, -exitval => 1);
+}
+
+=back
+
+=cut
+
+# # # #
+
+[% IF log4perl=='yes'; 'INFO "Program is running."'; ELSE; 'print "Program is running.\n"'; END %]
+
+# # # #
+
+__END__
+
+=head1 DESCRIPTION
+
+B<foo.pl> will do something...
+
+=head1 AUTHOR
+
+[% user.firstname %] [% user.lastname %] <[% user.mail %]>
+
+=head1 COPYRIGHT
+
+Copyright (c) [% date("%Y") %], [% user.firstname %] [% user.lastname %] <[% user.mail %]>
+
+All rights reserved. This program is free software; you can redistribute it
+and/or modify it under the same terms as Perl itself.
+
+=head1 SEE ALSO
+
+L<perl(1)|perl>[% IF log4perl=='yes' -%] L<Log::Log4perl> [% END -%]
+
+=cut
More information about the pkg-vim-maintainers
mailing list