From b4b21450f2c89b8abf41aa4bd011c2b27d1c241d Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Tue, 26 Apr 2016 08:49:46 +0900 Subject: [PATCH] fallback for shiftwidth() --- autoload/emmet.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/emmet.vim b/autoload/emmet.vim index 3c0ec0d..aff5c65 100644 --- a/autoload/emmet.vim +++ b/autoload/emmet.vim @@ -49,7 +49,8 @@ function! emmet#getIndentation(...) abort elseif has_key(s:emmet_settings.variables, 'indentation') let indent = s:emmet_settings.variables.indentation else - let indent = (&l:expandtab || &l:tabstop !=# shiftwidth()) ? repeat(' ', shiftwidth()) : "\t" + let sw = exists('*shiftwidth') ? shiftwidth() : &l:shiftwidth + let indent = (&l:expandtab || &l:tabstop !=# sw) ? repeat(' ', sw) : "\t" endif return indent endfunction