From 97495098409b180cff00aec7259cdbfaf3ca9fb9 Mon Sep 17 00:00:00 2001 From: tmsanrinsha Date: Sun, 12 Feb 2017 19:09:08 +0900 Subject: [PATCH] Use shiftwidth() --- autoload/neosnippet/view.vim | 2 +- indent/neosnippet.vim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/neosnippet/view.vim b/autoload/neosnippet/view.vim index 8a8ee41..e0ec121 100644 --- a/autoload/neosnippet/view.vim +++ b/autoload/neosnippet/view.vim @@ -200,7 +200,7 @@ function! s:indent_snippet(begin, end) abort "{{{ if &l:expandtab && current_line =~ '^\t\+' " Expand tab. cal setline('.', substitute(current_line, - \ '^\t\+', base_indent . repeat(' ', &shiftwidth * + \ '^\t\+', base_indent . repeat(' ', shiftwidth() * \ len(matchstr(current_line, '^\t\+'))), '')) elseif line_nr != a:begin call setline('.', base_indent . current_line) diff --git a/indent/neosnippet.vim b/indent/neosnippet.vim index a55d1f2..f1df340 100644 --- a/indent/neosnippet.vim +++ b/indent/neosnippet.vim @@ -48,7 +48,7 @@ function! SnippetsIndent() abort "{{{ if prev_line =~ '^\s*$' return 0 elseif prev_line =~ '^' . syntax && line !~ '^\s*' . syntax - return &shiftwidth + return shiftwidth() else return match(line, '\S') endif