Pasting some yank line is slow

27 views
Skip to first unread message

Ni Va

unread,
Jan 14, 2022, 4:04:03 AM1/14/22
to vim_use
Hi,

I encounter a recent problem pasting some yank things (lines or sentences' part).

don't see why because my updatetime is et to 300 and redrawtime is set to 500.

Thank you.
NiVA

Tim Chase

unread,
Jan 14, 2022, 10:36:25 AM1/14/22
to vim...@googlegroups.com
A couple candidates occur to me:

1) if the paste itself is slow to activate, do you have some mapping
interfering? I'd start by checking the output of

:map
:imap
:vmap

to see if there's anything that might be causing problems. You can
also try tweaking 'timeoutlen' to see if increasing the value makes
it worse and shortening the timeout makes it better. Or if hitting
<space> (or some other character) while waiting causes it to paste
quickly. If this is the case, you likely have some mapping that vim
is waiting to see if you'll complete it before the timeout. Usually
the best solution here is to change the mapping(s) to remove the
overlap.


2) in some cases, syntax highlighting can cause some serious
slow-down. I've noticed it most with XML containing long lines. Try
turning off syntax highlighting

:syn off

doing the paste, and see if it's faster. If so, it would help to
know the filetype in question.

3) plugins may also interfere. Have you tried doing the paste
without any plugins enabled? Sometimes a plugin will interfere or do
strange/pathological things. If you can bisect your .vimrc and
track it down to a misbehaving plugin, you can go nudge its author
for help.

Hopefully this gives you some mechanisms to track diagnose the issue,

-tim



Ni Va

unread,
Jan 15, 2022, 4:53:16 AM1/15/22
to vim_use
Thank you and best wishes Mr Chase.



1) seeing mapping, it's an ocean because of vimplug and plugins installed.  
     Behind this ocean world of mapping, it would be great to filter them with suspected letter.

   I had two own mapping that began by p but without them no diff, not at the origin of pb.

nnoremap           pc    :silent! vim9cmd @* = expand('%:p')<CR>:echo 'In Clipboard : ' . @* <CR>
nnoremap           ph    :silent! vim9cmd @* = expand('%:p:h')<CR>:echo 'In Clipboard : ' . @* <CR>


2)syn off, I do same observation than you about long line in xml, no effect in my case.

3) Bisecting plugins installed, deleting them and pasting them one by one in my vim-plug dir, no diff.


it appears that my paste key take normal time again without any change in my own config 
out of building vim from 8.2.4090 to 4092 but don't see the reason.

Thank you for helping
NiVa

Ni Va

unread,
Jan 15, 2022, 5:59:06 PM1/15/22
to vim_use
Hum, maybe using coc.vim with LSP clangd, it seems to be slow not on cpp but on cs file.
Reply all
Reply to author
Forward
0 new messages