Describe the bug
Adding a newline and undoing it makes the file scroll extremely slow. I have a video below with nvim, but exact same behavior occurs with vim too! Please excuse me for not creating one more video, I have filed a similar bug on them: neovim/neovim#14818
Preparation:
scrollslow.vim and problemfile.vim in your computer, let's say in home directory.Part-1
1. Open vim with command ``>>vim -u ~/scrollslow.vim ~/problemfile.vim``.
2. Press ``G`` to scroll to bottom of file.
3. Press and hold ``<Up>`` arrow or ``k`` to scroll up.
4. Close vim: ``:q<CR>``
Note the relatively acceptable speed of scroll, and position of cursor (it will remain in first column).
Part-2
1. Open vim with command ``>>vim -u ~/scrollslow.vim ~/problemfile.vim``.
2. Press ``i<CR><Esc>u``.
3. Press ``G`` to scroll to bottom of file.
4. Press and hold ``<Up>`` arrow or ``k`` to scroll up.
Note the slow and stuttery scroll and the fact that cursor seems to go all around instead of staying in first column.
Editing and undoing the edit should have no effect on the smoothness of scroll...
For file problemfile.vim: Download problemfile.txt, and change its extension to .vim to get problemfile.vim.
File slowscroll.vim:
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath=&runtimepath
set nocompatible
filetype plugin on
set noswapfile
set updatetime=50
set updatecount=0
call plug#begin('~/.vim/plugged')
Plug 'NLKNguyen/papercolor-theme'
call plug#end()
colorscheme PaperColor
set number
set cursorline
set background=dark
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled May 26 2021 20:32:10)
macOS version - arm64
Included patches: 1-2890
Compiled by Homebrew
Huge version without GUI. Features included (+) or not (-):
$TERM: doesn't matter, varies by terminal above. I am using xterm-256color in general.Best viewed in full screen mode with further zoom-in to align video boundary with screen boundary.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
I cannot seem to reproduce. But a couple of questions:
:syntime). I can also think, that syntax syncing might cause a slow down. Not sure if messing with :syn sync has an impact.updatecount to zero. So why do you then need to set the 'updatetime' setting to such a slow value? Any CursorHold autocommands that could be triggered?@chrisbra I don't, I guess you didn't read the entire file slowscroll.vim above. That's the complete vimrc here given I pass it as argument to -u option. The plugin that gives syntax coloring is also in slowscroll.vim: Plug 'NLKNguyen/papercolor-theme'. I tried by setting set ei=all, it still has same behavior, so there are no auto commands.
It could be that our key repeat rates are different, so you are not able to notice the difference. Here's my analysis of that for someone's pointing out that: neovim/neovim#14818 (comment).
I don't follow. According to your vimrc file, you do not set syntax coloring (Note: the papercolor is just a color theme, it does not (or should not) enable syntax highlighting). So please try without syntax coloring. As said, I could imagine, that since the file is being modified, I syntax engine needs to resync. And since you are using syntax, can you please also post the output of :syntime report?. Also I still do not understand what's the reason for setting updatetime that low. If that hurts your scrolling speed, simply do not set it that low. Especially since you seem to disable swapfiles intentionally (not that I recommend that).