Guillaume Cottenceau <[EMAIL PROTECTED]> writes:
> > vi, which also features som kind of syntaxic colorization crisse
> > d'hostie d'calice.
>
> then you should use ",ch" to automatically generate a new changelog
> entry instead of typing it manually :-).
add this in your ~/bin/
#!/bin/sh
# my $vim++, shift if $ARGV[0] =~ /-v/;
#
# my $file = shift or die "Give me ganja for my aeroplane\n";
# local *macros;
#
# open FH, $file;
# while (<FH>) {
# $macros{$1}=$2 if /^%define\s*(\w+)\s*(.*)$/;
# while (/^\w+:\s+.*%.*/) {s|%{(\w+)}|$macros{$1}|; s|%(\w+)|$macros{$1}|}
# &gmac(Name); &gmac(Version); &gmac(Release);
# }
# close FH;
#
# if ($vim) { $macros{Release}++, $macros{Release} .= "mdk" } else { print
"$macros{Name}-" };
#
# print "$macros{Version}-$macros{Release}\n";
#
# sub gmac { my $s = shift @_; $macros{$s} = $1 if /^$s:\s+(.*)/; }
argument=$1
[[ -z $argument ]] && argument=$(echo *.spec)
rpm -q --qf '%{VERSION}-%{RELEASE}\n' --specfile $argument|head -1
and this in your ~/.vimrc
map ,ch /^%changelog/<C-m>o* <C-R>=strftime("%a %b %d %Y")<C-m> E.T. <[EMAIL PROTECTED]>
<Esc>:r!spec-version %<C-m>d$k$po-