Loading ...
Sorry, an error occurred while loading the content.

Re: \%123l and friends -- matching screen line

Expand Messages
  • Ben Fritz
    ... You could use line( w0 ) to get the line number of the first visible ... {second part of command you are using} See :help line() Out of curiosity, what do
    Message 1 of 3 , Mar 30, 2009
    • 0 Attachment
      On Mar 29, 7:03 am, Yakov <iler...@...> wrote:

      > Is there \% that matches the *screen line*, that is,
      > for example, match to the line that is currently shown at 1st line of
      > buffer window.
      >

      You could use line('w0') to get the line number of the first visible
      line, then use \%l to match it:

      :execute '{first part of command you are using}\%'.line('w0').'l
      {second part of command you are using}'

      See :help line()

      Out of curiosity, what do you need this for?

      Is this something for which you could use another match, such as "\
      %#" (match cursor position)?
      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.