Michael Ludwig wrote:
Marc Weber schrieb am 12.01.2012 um 02:38 (+0100):
Would take me 30secs to one minute to write. If you don't know VimL
much.. Why not just write your own perl script and pipe the buffer?
:%! perl myscript_adding_prefixes.pl
But this in a Windows batch file, it does the numbering:
@ECHO OFF
perl -e "push @l, [$.,$_] while <>; $_->[0]*=100/($#l+1) for @l; printf q(%%3u %%s),
@$_ for @l"
But Why doesn't this work?
:%! perl -e 'push @l, [$.,$_] while <>; $_->[0]*=1000/$#l+1) for @l;
printf q(%%3u %%
s), @$ for @l'
Tried double quotes as well, got a very helpful message in both cases:
E194: No alternate file name to substitute for #
!?!?!
There's a reason why having \p as a quote operator to write in perl
would be a good thing in
more places than find/replace -- no doubt vim doesn't honor quoted
strings -- single or double
any more than it does backslash...
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php