From 05e05c7d6d82395b04762067b393f511f6cab58b Mon Sep 17 00:00:00 2001 From: Peter Fabinski Date: Mon, 31 Jan 2022 15:21:14 -0500 Subject: [PATCH 1/2] Use shiftwidth function instead of setting --- plugin/vip.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/vip.vim b/plugin/vip.vim index 360bac6..c975b2a 100755 --- a/plugin/vip.vim +++ b/plugin/vip.vim @@ -510,7 +510,7 @@ if &expandtab == 1 else let s:indChar = "\t" endif -for s:inc in range(2, &shiftwidth) +for s:inc in range(2, shiftwidth()) let s:indChar = s:indChar.s:indChar endfor From 541a341c361aec2f9f43b88357f43bfa72f22394 Mon Sep 17 00:00:00 2001 From: Peter Fabinski Date: Tue, 23 Aug 2022 03:05:59 -0400 Subject: [PATCH 2/2] Only use shiftwidth function if it exists --- plugin/vip.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/vip.vim b/plugin/vip.vim index c975b2a..aaec729 100755 --- a/plugin/vip.vim +++ b/plugin/vip.vim @@ -510,7 +510,7 @@ if &expandtab == 1 else let s:indChar = "\t" endif -for s:inc in range(2, shiftwidth()) +for s:inc in range(2, (exists('?shiftwidth') ? shiftwidth() : &shiftwidth)) let s:indChar = s:indChar.s:indChar endfor