diff runtime/indent/cmake.vim @ 12499:d91cf2e26ef0

Update runtime files. commit https://github.com/vim/vim/commit/37c64c78fd87e086b5a945ad7032787c274e2dcb Author: Bram Moolenaar <Bram@vim.org> Date: Tue Sep 19 22:06:03 2017 +0200 Update runtime files.
author Christian Brabandt <cb@256bit.org>
date Tue, 19 Sep 2017 22:15:06 +0200
parents 63b0b7b79b25
children 34c8ec888122
line wrap: on
line diff
--- a/runtime/indent/cmake.vim
+++ b/runtime/indent/cmake.vim
@@ -1,14 +1,12 @@
 " 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:   Karthik Krishnan <karthik.krishnan@kitware.com>
-" Last Change:  $Date: 2008-01-16 16:53:53 $
-" Version:      $Revision: 1.9 $
+" Maintainer:   Dimitri Merejkowsky <d.merej@gmail.com>
+" Former Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com>
+" Last Change:  2017 Aug 30
 "
 " Licence:      The CMake license applies to this file. See
-"               http://www.cmake.org/HTML/Copyright.html
+"               https://cmake.org/licensing
 "               This implies that distribution with Vim is allowed
 
 if exists("b:did_indent")
@@ -16,6 +14,7 @@ if exists("b:did_indent")
 endif
 let b:did_indent = 1
 
+setlocal et
 setlocal indentexpr=CMakeGetIndent(v:lnum)
 setlocal indentkeys+==ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE(
 
@@ -68,19 +67,19 @@ fun! CMakeGetIndent(lnum)
     let ind = ind
   else
     if previous_line =~? cmake_indent_begin_regex
-      let ind = ind + shiftwidth()
+      let ind = ind + &sw
     endif
     if previous_line =~? cmake_indent_open_regex
-      let ind = ind + shiftwidth()
+      let ind = ind + &sw
     endif
   endif
 
   " Subtract
   if this_line =~? cmake_indent_end_regex
-    let ind = ind - shiftwidth()
+    let ind = ind - &sw
   endif
   if previous_line =~? cmake_indent_close_regex
-    let ind = ind - shiftwidth()
+    let ind = ind - &sw
   endif
 
   return ind