Friday, May 10, 2019

Re: scrolljump and paste ?

> Thanks Tony.
> Is there a way around the recursion of mapping p to call a function that
> issues a p between setting scrolljump values ? Perhaps with an alias ?

Hi,

Something weird, like this ???

function! MyPaste() abort
nnoremap <silent> <buffer> p p
let &scrolljump=1
execute "normal p"
let &scrolljump=-50
nnoremap <silent> <buffer> p :call MyPaste()<CR>
endfunction

nnoremap <silent> <buffer> p :call MyPaste()<CR>

thx,
-m

--
--
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/0579b9ba-3bf9-43c0-bd5e-a9cec6e3bb00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: