Reputation: 12752
I have a text file with code snippets scattered here and there.
Is there a way to have syntax highlight for the code snippets ?
(all snippets are in the same language).
Upvotes: 1
Views: 966
Reputation: 9437
You can use:
:set syntax=<language>
to force some syntax coloring.
-- Yet it might be chaotic if the remaining text has some elements that conflict (unmatched quotes for instance)
Upvotes: 1