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

Re: How to put search result on FIRST screen line

Expand Messages
  • Taylor Hedberg
    ... Not sure why that would be, as `zt` scrolls the cursor line to the top of the window. It is working as intended on my machine.
    Message 1 of 11 , Apr 3, 2013
      Philip Rhoades, Thu 2013-04-04 @ 07:40:47+1100:
      > That seems to put the searched line in the centre of the screen . .
      > not the first line of the screen.

      Not sure why that would be, as `zt` scrolls the cursor line to the top
      of the window. It is working as intended on my machine.
    • Tim Chase
      ... Do you have a non-default setting (i.e., very large value) for scrolloff ? -tim -- -- You received this message from the vim_use maillist. Do not
      Message 2 of 11 , Apr 3, 2013
        On 2013-04-04 07:40, Philip Rhoades wrote:
        > > nnoremap <Leader>n nzt
        >
        > That seems to put the searched line in the centre of the screen . .
        > not the first line of the screen.

        Do you have a non-default setting (i.e., very large value) for
        'scrolloff'?

        -tim


        --
        --
        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+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Philip Rhoades
        Paul, ... That s it! Excellent! Thanks, Phil. -- Philip Rhoades GPO Box 3411 Sydney NSW 2001 Australia E-mail: phil@pricom.com.au -- -- You received this
        Message 3 of 11 , Apr 3, 2013
          Paul,


          On 2013-04-04 06:57, Paul Isambert wrote:
          >> I want to flick through a large text file with repeated sections of
          >> variable length (but each with four heading lines) so that the the
          >> first
          >> heading line of each section always ends up as the first screen line
          >> -
          >> is there some way of doing this with the search facility?
          >
          > Try something like:
          >
          > noremap <buffer> X /PATTERN<CR>zt:nohl<CR>
          >
          > where PATTERN is whatever matches the first heading line. You can use
          > ? instead
          > of / to jump backward.


          That's it! Excellent!

          Thanks,

          Phil.
          --
          Philip Rhoades

          GPO Box 3411
          Sydney NSW 2001
          Australia
          E-mail: phil@...

          --
          --
          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+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        Your message has been successfully submitted and would be delivered to recipients shortly.