0

I'm having this really weird issue with Vim, when I scroll down certain files it gives me a "Max memory" error and then the entire file turns white. It doesn't make any sense though because the file I view is <500 SLOC and is a .yaml file. Here's my .vimrc

call plug#begin()
  Plug 'preservim/nerdtree'
  Plug 'sheerun/vim-polyglot'
  Plug 'prettier/vim-prettier', { 'do': 'yarn install --frozen-lockfile --production' } 
  Plug 'thaerkh/vim-workspace'
call plug#end()

let g:NERDTreeWinPos = "right"

set anti enc=utf-8 set guifont=Monaco:h14

au VimEnter * NERDTree

set autoindent set relativenumber set number set mouse=a

Original error: enter image description here

After running the file as nvim --clean

enter image description here

Also noticed this line: enter image description here

next I ran it using vim --clean, same errors, different colors :)

enter image description here

Also, I noticed at the bottom of my file there is a large blob of data:

genesis: AAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAIONyBTTF0nAdPx82GBb5rdRMZw0gGKoR4fX7Xm0thUf5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD8Y6ihgEAAAAAAAAAAAAAQGhVeHJpeDYybHBpR1VQMUxiUVkvN1UyM09UYmZSVHhQa1ZXTEtzNlBicDZUZWdiNzFPc0FQSG9lZWFXbFFwajUYOjAAAAEAAAAAAAMAEAAAAAAAAQACAAMAASBY5NUBCwG4+d9ySf7lzkDymZRwTleDIHaPuD7kzUkJ7iBPDCchXF1hHF2JxKDMX8adW+YJupDn7m/3yi+E1saj6wAAAAAACCEAAQAAAAAAAAAAAAAAAAAAAAAAAAABCwNiY3NQoRzrCwYAAAAGAQACAwIGBQgHBw8NCBwUDDAEAAAAAQABAQABBgkAAQoCA2Jjcwh0b19ieXRlcwAAAAAAAAAAAAAAAAAAAAAAAAABAAECAAAEaGFzaF6hHOsLBgAAAAYBAAIDAgoFDAMHDxcIJhQMOggAAAABAAAAAAIAAAABCgIEaGFzaAhzaGEyXzI1NghzaGEzXzI1NgAAAAAAAAAAAAAAAAAAAAAAAAABAAECAAEBAgAABWFzY2lpiwahHOsLBgAAAAsBAAQCBA4DElQEZggFbjsHqQHIAQjxAhQGhQMKCo8DCwyaA7oCDdQFBAAAAAEAAgcAAAMHAAEPBwEAAAAEAAEAAAUAAgAABgMEAAAHBAMAAAgFBgAACQQBAAAKBAEAAAsABwAADAgDAAANCQoAAA4GBQAAEAYLAAESDQEBAAETDg8BAAEUCg4BAAEVDw4BAAwFDQUOBQ8FAQYIAQEBAQYKAgEIAAECAQgBAQoCAQMBBwgBAgcIAQgAAAELAgEIAQIDAwEGCwIBCQABCwIBCQABCQAFYXNjaWkGb3B0aW9uBENoYXIGU3RyaW5nGGFsbF9jaGFyYWN0ZXJzX3ByaW50YWJsZQhhc19ieXRlcwRieXRlBGNoYXIKaW50b19ieXRlcxFpc19wcmludGFibGVfY2hhcg1pc192YWxpZF9jaGFyBmxlbmd0aAhwb3BfY2hhcglw...

enter image description here

After inspection it looks like a ton of text on a single line. Maybe this is causing the issue?

Origami
  • 29
  • 3
  • What if you disable the plugins and in particular polyglot? – Vivian De Smedt Feb 27 '23 at 22:28
  • Please [edit] with a minimal vimrc that solves the problem (How to debug my vimrc) – D. Ben Knoble Feb 28 '23 at 00:48
  • @D.BenKnoble removed comments to make it shorter – Origami Mar 01 '23 at 23:03
  • Thanks for the simplifications :-) But I would like you to try to simplify further :-/ Do you the problem if you disable NerdTree? Do you have the problem if you disable Polyglot? What we would need is the absolute minimal config :-) To reproduce the problem we would also need your text if that is possible :-/ – Vivian De Smedt Mar 02 '23 at 03:41
  • try vim --clean. Also, what exactly do you mean with certain files? What exact file types provoke that behaviour? – Christian Brabandt Mar 02 '23 at 08:03
  • its a .yaml file, nothing crazy @ChristianBrabandt. was scrolling down using mouse when it happened – Origami Mar 02 '23 at 13:38
  • I think I found the problem here, it's due to a bunch of data on a single line. Any way for me to avoid this problem in the future, under the assumption I will deal with similar files? – Origami Mar 02 '23 at 13:51
  • ah, yaml is notoriously known for some crazy patterns. You could try to increase the 'maxmempattern' option value (not sure this will work) or you may want to try to lower the 'synmaxcol' setting to say 250 or so. – Christian Brabandt Mar 02 '23 at 16:02
  • related issue: https://github.com/vim/vim/issues/10730 – Christian Brabandt Mar 02 '23 at 16:03
  • Is there a way to just avoid synax highlighting for super long lines, but keep it for everything else? Mainly annoyed that the file turns completely white after passing this line. @ChristianBrabandt – Origami Mar 02 '23 at 18:46
  • isn't that exactly what 'synmaxcol' does? Avoid syntax highlighting for lines longer than this amount of columns? – Christian Brabandt Mar 03 '23 at 09:41
  • @ChristianBrabandt it seems so, but max memory is still reached firrst and I have to exit the full screen error – Origami Mar 03 '23 at 13:00

0 Answers0