On Jul 11, 2013 11:29 PM, "Matteo Cavalleri" <[email protected]> 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 [email protected].
> 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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to