Refresh Syntax Highlighting

Once a while when you open a very long file and immediately performs a find and jump, your syntax highlighting couldn't catch up to that point. At this moment, you can either scroll all the way up for vim to catch up or perform a local syntax refresh.

Local Syntax Refresh

To do a local syntax refresh, you need to get into command mode and enter the following command:

:syntax sync fromstart

Let it refresh all the syntax for the entire document and you're ready to go.

That's all about syntax fixing.