X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/c99b009281bc9433450aab2a9d5a088c7a94053d..c98ff8ea47598e577c5a23a94efdfb0a6eaf22e9:/vim/indent/cmake.vim diff --git a/vim/indent/cmake.vim b/vim/indent/cmake.vim index 421afcb..c6f8974 100644 --- a/vim/indent/cmake.vim +++ b/vim/indent/cmake.vim @@ -61,7 +61,8 @@ fun! CMakeGetIndent(lnum) \ '\(' . cmake_regex_comment . '\)\?$' let cmake_indent_begin_regex = '^\s*\(IF\|MACRO\|FOREACH\|ELSE\|ELSEIF\|WHILE\|FUNCTION\)\s*(' - let cmake_indent_end_regex = '^\s*\(ENDIF\|ENDFOREACH\|ENDMACRO\|ELSE\|ELSEIF\|ENDWHILE\|ENDFUNCTION\)\s*(' + let cmake_indent_end_regex = '^\s*\(ENDIF\|ENDFOREACH\|ENDMACRO\|ELSE\|ELSEIF\|ENDWHILE\|ENDFUNCTION\)\s*(' . + \ or . ')\s*$' " Add if previous_line =~? cmake_indent_comment_line " Handle comments