Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vimscript buffer to get output of perl script

Tags:

vim

perl

buffer

I'm trying to edit the copy-paste buffer:

I have the following command:

nmap gfb :let .shellescape(getreg('0'))=1<br>

that should have put the number 1 into the buffer, which is not happening.

how do i put the output of a perl script into a vimscript buffer?

like image 320
john-jones Avatar asked Dec 30 '10 11:12

john-jones


1 Answers

To get the output of an external command into a vim buffer you use system:

:let @0 = system("/bin/ls")
:echo @0

I'm not sure how this relates to Perl exactly. You might want to edit your question to clarify.

like image 100
Rob N Avatar answered Sep 29 '22 06:09

Rob N