" Configuration file for vim
set modelines=0
" CVE-2007-2438
" Normally we use vim-extensions. If you want true vi-compatibility
" remove change the following statements
set nocompatible
" Use Vim defaults instead of 100% vi compatibility
set backspace=2
"
我想以“虚拟”开始一个区域,用不同的颜色高亮显示所有的虚拟方法,但由于虚拟已经在cpp.vim文件中被定义为关键字,所以区域匹配永远不会执行。我尝试了以下几种方法
syn region cVirtualMethod start="virtual" end=";" contains=cppType
hi cVirtualMethod ctermfg=red
但它不起作用。但是,如果我从cppType中删除了virtual,但它会高亮显示整行(公平地说,我更喜欢方法名,但它也很好)。
有没有一种方法可以让cpp.vim的虚拟高亮显示(这样虚拟最终会变成绿色)
我正在使用pygments为我的MD文档生成语法高亮显示,但是,我在将高亮显示应用于缩进块时遇到了困难。
例如:
文本1
文本2
代码在这里
文本3
10 space方法可以很好地将代码作为列表的子元素放置,但是,我不能像通常在列表之外那样应用语法高亮显示。
Can someone explain how i can have the code as a sub-element of the list WITH syntax highlighting?
Update: I've figured it out now. For anyone that's c
我想扩展现有文件类型的文件类型语法和高亮显示。我的新文件语法的基本结构如下:
" Some local (new) syntax that I want to match
syn match upfOperator "[&|~><!)(*#%@+/=?:;}{,.\^\-\[\]]"
syn match upfDefines "\$\S\+"
syn match upfDefines "\${\S\+}"
syn match upfParens "[)(}{\[\]]"