perl_io.vim : Perl : using 'print' and 'printf' instead of 'VIM::Msg'
script karma |
Rating 13/4,
Downloaded by 787 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Serguei Jidkov |
|
script type |
utility |
|
description |
This plugin uses 'Tie::Handle' mechanism to create two output handles: VIMOUT and VIMERR. Then standard output is
associated with VIMOUT. This allows normal use of 'print' and 'printf' operators:
:perl << EOP
print 'Line:', $curwin->(Cursor())[0];
printf '%d:%d", $curwin->Cursor();
print VIMERR "Error: $!";
EOP
Value in $, is handled correctly:
:perl $, = '; ';
:perl print 'a' .. 'e'; # prints 'a; b; c; d; e'
Value in $\ is ignored and there is no buffering, so it works as if $\ was set to "\n":
:perl print 'one'; print 'two'
prints same as
:perl print "one\ntwo"
|
|
install details |
Drop in your plugin directory. |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 3.141.8.247
|