Is it possible to have different syntax coloring rules for different parts of the same file in VimScript?
Is it possible to have different s开发者_如何学编程yntax coloring rules for different parts of the same file in VimScript?
If what you want is to have different sections of same file with different languages having different syntax rules for each, then check out my answer to this SO question: Different syntax rules within same vim file
Having different syntax rules is not quite the same thing as having different coloring rules, since, e.g., same color will be used for an 'Identifer' item regardless of which language section it is in. The thing that having different syntax regions does is change what Vim regards as an 'Identifier' within each section.
精彩评论