On 21/03/09 00:18, Edward Peschko wrote:
>
> all,
>
> I was wondering the simplest way of getting the current line for use
> with perl - ie: if
>
>       $main::curbuf->Get(42);
>
> gets the 42nd line of the given buffer, shouldn't
>
>       $main::curbuf->Get() # no arguments
>
> get the current line where the cursor is at? Or shouldn't there be a
> $main:: variable, ie:
>
>       $main::curline
>
> that returns the current line?
>
> Anyways, given the above doesn't seem to work, what's the easiest way
> to get the current line into perl using the perl interface?
>
> thanks much,
>
> Ed

Hm, what about

        Vim::Eval("getline('.')")

for the text of the current line, and either

        $curbuf->Cursor()[0]
or
        Vim::eval("line('.')")

for its number? See ":help perl-overview".

Disclaimer: I don't know Perl.


Best regards,
Tony.
-- 
Mophobia, n.:
        Fear of being verbally abused by a Mississippian.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to