Is it possible to have different syntax coloring rules for different parts of the same file in VimScript?
Is it possible to have different syntax coloring rules for different parts of the
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.