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

Re: adding a word to the search history

Expand Messages
  • Matteo Cavalleri
    ... it s not really the same. your mapping makes the cursor jump forward and back, which may cause some flickering if the next match is outside of the
    Message 1 of 8 , Jul 11 12:29 PM
    • 0 Attachment
      Il giorno giovedì 11 luglio 2013 18:06:32 UTC+2, Christian Brabandt ha scritto:
      >
      >
      > Am I missing something, or is this the same as
      >
      > nnoremap * *<c-o>
      >

      it's not really the same. your mapping makes the cursor jump forward and back, which may cause some flickering if the next match is outside of the currently displayed text. maybe not a big deal but if there's a better way to do it why not? :)


      --
      --
      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.
    • Nikolay Pavlov
      ... back, which may cause some flickering if the next match is outside of the currently displayed text. maybe not a big deal but if there s a better way to do
      Message 2 of 8 , Jul 11 12:46 PM
      • 0 Attachment


        On Jul 11, 2013 11:29 PM, "Matteo Cavalleri" <cvlmtg@...> wrote:
        >
        > Il giorno giovedì 11 luglio 2013 18:06:32 UTC+2, Christian Brabandt ha scritto:
        > >
        > >
        > > Am I missing something, or is this the same as
        > >
        > > nnoremap * *<c-o>
        > >
        >
        > it's not really the same. your mapping makes the cursor jump forward and back, which may cause some flickering if the next match is outside of the currently displayed text. maybe not a big deal but if there's a better way to do it why not? :)

        There is 'lazyredraw' to prevent flickering, but flickering is not a problem at all:

            vim -u NONE -c 'nnoremap * *<C-o>' -c 'call setline(1, repeat([""], 100))' -c 'call setline("$", "abc")' -c 'call setline(5, "abc")' -c $'normal 4\C-e'

        now press *: you will see "abc" jump from the top of the screen to the middle. This *is* the problem.

        (Note: you need zsh for the $'' thing to work. Replace "\C-e" with what is appropriate for your shell.)

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

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