Vim syntax highlighting is broken. When I am editing a file, some
parts of the file is not syntax highlighted or syntax highlighted incorrectly. Vim doesn’t read the whole file to parse the text for syntax highlighting. It starts parsing wherever you are viewing the file. That saves a lot of time, but sometimes the colors are wrong. A simple fix is refreshing the screen using the CTRL-L key. Or scroll back a bit and then forward again. You can also use the command:
:syntax sync fromstart
Note that this might considerably slow down the screen refreshing.
Comments (1)
Pepsh Pepshinsky
Let’s see you to :help viminfo-file-name (option -i) :set viminfofile=NONE