Sample Header Ad - 728x90

Vim highlighting problems with large files

1 vote
1 answer
138 views
If I open a large file (using that term generously, like ~1000 lines is enough) in vim, and jump somewhere, I sometimes get highlighting that ignores text off screen. For example, if I jump to the end of a large while loop (in sh highlighting, but I have had the same type of problem with C highlighting), the "done" will be marked red as if it does not actually terminate a loop. It is like the program is not looking far enough back to properly contextualize what I am currently looking at. On the other hand, if I go to the start of the loop and 'j' my way down, it will properly highlight. Is there any way to fix this?
Asked by Kyle (687 rep)
Sep 25, 2024, 05:08 PM
Last activity: Sep 26, 2024, 01:38 AM