1

I had the feeling that neovim was being sluggish in insert mode so I started bisecting my init.vim. Contrary to my expectations it looks like dozens autotrigger snippets were not the culprit but rater it's breakindent (and to some extent linebreak and scrolloff=2).

I ran some test of the form :Time norm 1000isomething * on a medium-size tex file (350 lines, 3400 words) with empty init.vim and these were the results:

  • when breakindent is off this takes less than 2s
  • with breakindent this takes 16s (same if I add so=2)
  • with breakindent and linebreak it's 22s
  • and if I add so=2 it increases further to 27s

For comparison, on vim the times follow a similar pattern but the slowest I get is 5s.

I feel like 27ms is a lot of time to process 10 input characters so it seems like something is wrong here? Is this a bug in neovim? Is this a known issue / is there anything I can do to make this faster?

I'm using Neovim 0.5.1 on Ubuntu.


* using the Time command fromtpope/vim-scriptease

5
  • Is this nvim-qt or just plain nvim? Commented Dec 27, 2021 at 22:12
  • Do you have :set wrap? Commented Dec 27, 2021 at 22:44
  • @Matt plain nvim in a terminal Commented Dec 27, 2021 at 23:10
  • @D.BenKnoble yes, it's enabled by default it seems. Commented Dec 27, 2021 at 23:11
  • 1
    These issues just seem like they would be less affected with nowrap, since breakindent and linebreak won’t apply Commented Dec 27, 2021 at 23:19

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.