summaryrefslogtreecommitdiffstats
path: root/runtime/indent/cmake.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-06-05 17:43:32 +0200
committerBram Moolenaar <Bram@vim.org>2010-06-05 17:43:32 +0200
commit945e2dbb633ed29b697a8d4eea51672e3c11143b (patch)
tree9d91ddcd66538a3f908dd71acb4a6b8ed90cd374 /runtime/indent/cmake.vim
parenta76638f47d157ff4520fcd2917106d51d03a2ad9 (diff)
Use full path in undofile(). Updated docs.
Diffstat (limited to 'runtime/indent/cmake.vim')
-rw-r--r--runtime/indent/cmake.vim23
1 files changed, 8 insertions, 15 deletions
diff --git a/runtime/indent/cmake.vim b/runtime/indent/cmake.vim
index 4315ad23af..8c408fb1ec 100644
--- a/runtime/indent/cmake.vim
+++ b/runtime/indent/cmake.vim
@@ -1,19 +1,11 @@
-" =============================================================================
-"
-" Program: CMake - Cross-Platform Makefile Generator
-" Module: $RCSfile: cmake-indent.vim,v $
-" Language: VIM
-" Date: $Date: 2006/09/23 21:09:08 $
-" Version: $Revision: 1.7 $
-"
-" =============================================================================
-
" Vim indent file
+" Program: CMake - Cross-Platform Makefile Generator
+" Module: $RCSfile: cmake-indent.vim,v $
" Language: CMake (ft=cmake)
" Author: Andy Cedilnik <andy.cedilnik@kitware.com>
-" Maintainer: Andy Cedilnik <andy.cedilnik@kitware.com>
-" Last Change: $Date: 2006/09/23 21:09:08 $
-" Version: $Revision: 1.7 $
+" Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com>
+" Last Change: $Date: 2008-01-16 16:53:53 $
+" Version: $Revision: 1.9 $
"
" Licence: The CMake license applies to this file. See
" http://www.cmake.org/HTML/Copyright.html
@@ -25,6 +17,7 @@ endif
let b:did_indent = 1
setlocal indentexpr=CMakeGetIndent(v:lnum)
+setlocal indentkeys+==ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE(
" Only define the function once.
if exists("*CMakeGetIndent")
@@ -65,8 +58,8 @@ fun! CMakeGetIndent(lnum)
\ ')\s*' .
\ '\(' . cmake_regex_comment . '\)\?$'
- let cmake_indent_begin_regex = '^\s*\(IF\|MACRO\|FOREACH\|ELSE\|ELSEIF\|WHILE\)\s*('
- let cmake_indent_end_regex = '^\s*\(ENDIF\|ENDFOREACH\|ENDMACRO\|ELSE\|ELSEIF\|ENDWHILE\)\s*('
+ 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*('
" Add
if previous_line =~? cmake_indent_comment_line " Handle comments