Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim: enable syntax highlight of different type inside a syntax region?

I use latex to typeset lots of code using the minted package. Mainly the layout of my Latex source looks like this:

... text ...
\begin{cppcode}
class GenericClass{
    public:
        int publicMember;
    private:
        int privateMember;
}
\end{cppcode}
... text ...

Is there anyway to tell Vim to highlight the code inside the \begin{cppcode} \end{cppcode} as if it C++ code?

like image 454
romeovs Avatar asked Jun 09 '11 13:06

romeovs


1 Answers

yes you can - please see this vim tip for details.

like image 111
ahmedre Avatar answered Oct 06 '22 12:10

ahmedre