Vim:在语法区域内启用不同类型的语法高亮显示?
我用latex用Vim:在语法区域内启用不同类型的语法高亮显示?,vim,syntax-highlighting,Vim,Syntax Highlighting,我用latex用minted软件包排版了很多代码。我的Latex源的布局主要如下所示: ... text ... \begin{cppcode} class GenericClass{ public: int publicMember; private: int privateMember; } \end{cppcode} ... text ... 是否有必要告诉Vim突出显示\begin{cppcode}\end{cppcode}中的代码,就好
minted
软件包排版了很多代码。我的Latex源的布局主要如下所示:
... text ...
\begin{cppcode}
class GenericClass{
public:
int publicMember;
private:
int privateMember;
}
\end{cppcode}
... text ...
是否有必要告诉Vim突出显示
\begin{cppcode}
\end{cppcode}中的代码,就好像它是C++
代码一样?是的,您可以-请查看详细信息。+1在bash脚本中使用awk和perl代码时,我也有同样的问题。无法实现这一点。。它从不识别我的end
语句,将整个文件放在cppcode
区域C++
highlightedI与perl区域有类似的问题,这可能是嵌入(或嵌入?)语言语法文件中的错误/不兼容。要进行检查,您可能需要使用:h synid
下的示例代码来获取或:h synstack
来获取光标下语法元素的名称,以确认您定义的区域实际上在结束标记处结束。如果是,则确认语法文件中存在不兼容。