diff runtime/indent/zimbu.vim @ 7790:ca19726d5e83

commit https://github.com/vim/vim/commit/298b440930ecece38d6ea0505a3e582dc817e79b Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jan 28 22:38:53 2016 +0100 Update runtime files.
author Christian Brabandt <cb@256bit.org>
date Thu, 28 Jan 2016 22:45:05 +0100
parents 04592728474a
children 9c221ad9634a
line wrap: on
line diff
--- a/runtime/indent/zimbu.vim
+++ b/runtime/indent/zimbu.vim
@@ -1,7 +1,7 @@
 " Vim indent file
 " Language:	Zimbu
 " Maintainer:	Bram Moolenaar <Bram@vim.org>
-" Last Change:	2012 Sep 08
+" Last Change:	2016 Jan 25
 
 " Only load this indent file when no other was loaded.
 if exists("b:did_indent")
@@ -74,9 +74,9 @@ func GetZimbuIndent(lnum)
 	  \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
 	  \ . " =~ '\\(Comment\\|String\\|Char\\)$'")
       if pp > 0
-	return indent(prevLnum) + &sw
+	return indent(prevLnum) + shiftwidth()
       endif
-      return indent(prevLnum) + &sw * 2
+      return indent(prevLnum) + shiftwidth() * 2
     endif
     if plnumstart == p
       return indent(prevLnum)
@@ -102,13 +102,13 @@ func GetZimbuIndent(lnum)
   endif
 
   if prevline =~ '^\s*\(IF\|\|ELSEIF\|ELSE\|GENERATE_IF\|\|GENERATE_ELSEIF\|GENERATE_ELSE\|WHILE\|REPEAT\|TRY\|CATCH\|FINALLY\|FOR\|DO\|SWITCH\|CASE\|DEFAULT\|FUNC\|VIRTUAL\|ABSTRACT\|DEFINE\|REPLACE\|FINAL\|PROC\|MAIN\|NEW\|ENUM\|CLASS\|INTERFACE\|BITS\|MODULE\|SHARED\)\>'
-    let plindent += &sw
+    let plindent += shiftwidth()
   endif
   if thisline =~ '^\s*\(}\|ELSEIF\>\|ELSE\>\|CATCH\|FINALLY\|GENERATE_ELSEIF\>\|GENERATE_ELSE\>\|UNTIL\>\)'
-    let plindent -= &sw
+    let plindent -= shiftwidth()
   endif
   if thisline =~ '^\s*\(CASE\>\|DEFAULT\>\)' && prevline !~ '^\s*SWITCH\>'
-    let plindent -= &sw
+    let plindent -= shiftwidth()
   endif
 
   " line up continued comment that started after some code