Hi, Here's a patch that updates CMake runtime files:
* Do not set 'et' for all users (backported from https://gitlab.kitware.com/cmake/cmake/merge_requests/1273) * Replace &sw by shiftwidth() Thanks! -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
From 4a88741e189b47dc42d58a36b1501e320b40418f Mon Sep 17 00:00:00 2001 From: Dimitri Merejkowsky <[email protected]> Date: Sat, 23 Sep 2017 13:12:08 +0200 Subject: [PATCH 1/2] cmake indent: replace &sw by shiftwidth() --- runtime/indent/cmake.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime/indent/cmake.vim b/runtime/indent/cmake.vim index 85a9ec4e98..52b65834ac 100644 --- a/runtime/indent/cmake.vim +++ b/runtime/indent/cmake.vim @@ -67,19 +67,19 @@ fun! CMakeGetIndent(lnum) let ind = ind else if previous_line =~? cmake_indent_begin_regex - let ind = ind + &sw + let ind = ind + shiftwidth() endif if previous_line =~? cmake_indent_open_regex - let ind = ind + &sw + let ind = ind + shiftwidth() endif endif " Subtract if this_line =~? cmake_indent_end_regex - let ind = ind - &sw + let ind = ind - shiftwidth() endif if previous_line =~? cmake_indent_close_regex - let ind = ind - &sw + let ind = ind - shiftwidth() endif return ind From 3244af8a0aaba09b03736527a7794e698014cbd3 Mon Sep 17 00:00:00 2001 From: Patrick Boettcher <[email protected]> Date: Mon, 18 Sep 2017 17:27:36 +0200 Subject: [PATCH 2/2] do not force expandtabs for all cmake-users backport from https://gitlab.kitware.com/cmake/cmake/merge_requests/1273 --- runtime/indent/cmake.vim | 1 - 1 file changed, 1 deletion(-) diff --git a/runtime/indent/cmake.vim b/runtime/indent/cmake.vim index 52b65834ac..83d9e24fe9 100644 --- a/runtime/indent/cmake.vim +++ b/runtime/indent/cmake.vim @@ -14,7 +14,6 @@ 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(
