perl in vim question

19 views
Skip to first unread message

tooth pik

unread,
May 9, 2019, 3:37:04 PM5/9/19
to vim...@googlegroups.com
in if_perl i see everything i need except how to get the current
buffer's current line number

$curbuf->Append('.', $stuff) appends after line 0

there is no $curbuf->Line() function

any help will be appreciated

Tekki

unread,
May 10, 2019, 2:29:55 AM5/10/19
to vim_use
Am Donnerstag, 9. Mai 2019 21:37:04 UTC+2 schrieb toothpik:
> there is no $curbuf->Line() function

Try $curwin->Cursor(): "With no arguments, returns a (row, col) array for the current cursor position in the Window."

tooth pik

unread,
May 10, 2019, 2:21:35 PM5/10/19
to vim...@googlegroups.com
no, that's window position, not buffer line

i have an ugly workaround: in viml before the perl i let lno = line('.')

then inside the perl i use $l = VIM::Eval(lno);
> --
> --
> 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
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/8bc56581-1312-4bf0-b403-426ffa0da1ab%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages