Friday, May 10, 2019

Re: scrolljump and paste ?

On Sat, May 11, 2019 at 2:30 AM M Kelly <mckelly2833@gmail.com> wrote:
>
> Hi,
>
> I set scrolljump=-50, it works well for me.
> But sometimes when I paste it is annoying when the cursor jumps.
> I have experimented with:
>
> au InsertEnter * let &scrolljump=1
> au InsertLeave * let &scrolljump=-50
>
> but this doesn't seem to affect pasting.
> Does anyone know of or have a suggestion for this ?
> Could I remap 'p' to set scrolljump=1 then p again ?
>
> thx for all things vim,
> -mark

I suppose you could, but this would not solve the question of how to
come back, or of how to paste before the cursor.

I suggest the following (untested, assumes 'nocompatible'):

:map <F5> :set scrolljump=1<CR>p
:map <S-F5> :set scrolljump=1<CR>P
:map <F6> :set scrolljump=-50<CR>

Best regards,
Tony.

--
--
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@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJkCKXsa2uCoQZzR%2BzJbZY4KaUXpzJPrZzTvTsS%3DgBqRxtCwvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments: