Preserve shiftwidth across loading sub-syntax indent files

This commit is contained in:
leafOfTree
2021-01-13 12:42:10 +08:00
parent aa4ca7b23d
commit f3813ab0e4

View File

@@ -49,6 +49,9 @@ let s:has_init_indent = vue#GetConfig("has_init_indent",
" Load indent method {{{ " Load indent method {{{
" "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Save shiftwidth
let s:sw = &sw
" Use lib/indent/ files for compatibility " Use lib/indent/ files for compatibility
unlet! b:did_indent unlet! b:did_indent
runtime lib/indent/xml.vim runtime lib/indent/xml.vim
@@ -92,6 +95,9 @@ if s:use_typescript
unlet! b:did_indent unlet! b:did_indent
runtime! indent/typescript.vim runtime! indent/typescript.vim
endif endif
" Recover shiftwidth
let &sw = s:sw
"}}} "}}}
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""