vim/after/syntax/cmake.vim

9 lines
591 B
VimL

" Transparent regions to enable syntax based folding.
syntax region cmakeIfBlock start='if\s*(.*)' end='endif\s*(.*)' fold transparent keepend
syntax region cmakeFunctionBlock start='function\s*(.*)' end='endfunction\s*(.*)' fold transparent keepend
syntax region cmakeMacroBlock start='macro\s*(.*)' end='endmacro\s*(.*)' fold transparent keepend
syntax region cmakeForeachBlock start='foreach\s*(.*)' end='endforeach\s*(.*)' fold transparent keepend
syntax region cmakeWhileBlock start='while\s*(.*)' end='endwhile\s*(.*)' fold transparent keepend
highlight link cmakeStatement Statement