syntax highlight within a text file?
I have a text file wit开发者_StackOverflow社区h 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).
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)
精彩评论