Tuesday, August 16, 2011

Re: Get selected line(s) using Perl

Thanks John, you're a genius and this is working like a charm. :-)

> You can use the VIM:Eval() method with vim's getpos function on the '<
> and '> marks. F.ex.
>
> perl ($success, $startline) = VIM::Eval('getpos("\'<")[1]')
> perl ($success, $endline) = VIM::Eval('getpos("\'>")[1]')
> perl @lines = $curbuf->Get($startline .. $endline)

--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

--
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

No comments: