Update runtime files.
Includes changing &sw to shiftwidth() for all indent scripts.
This commit is contained in:
@ -215,14 +215,14 @@ function! GetTeXIndent() " {{{
|
||||
" ZYC modification : \end after \begin won't cause wrong indent anymore
|
||||
if line =~ '\\begin{.*}'
|
||||
if line !~ g:tex_noindent_env
|
||||
let ind = ind + &sw
|
||||
let ind = ind + shiftwidth()
|
||||
let stay = 0
|
||||
endif
|
||||
|
||||
if g:tex_indent_items
|
||||
" Add another sw for item-environments
|
||||
if line =~ g:tex_itemize_env
|
||||
let ind = ind + &sw
|
||||
let ind = ind + shiftwidth()
|
||||
let stay = 0
|
||||
endif
|
||||
endif
|
||||
@ -241,23 +241,23 @@ function! GetTeXIndent() " {{{
|
||||
if g:tex_indent_items
|
||||
" Remove another sw for item-environments
|
||||
if cline =~ g:tex_itemize_env
|
||||
let ind = ind - &sw
|
||||
let ind = ind - shiftwidth()
|
||||
let stay = 0
|
||||
endif
|
||||
endif
|
||||
|
||||
let ind = ind - &sw
|
||||
let ind = ind - shiftwidth()
|
||||
let stay = 0
|
||||
endif
|
||||
|
||||
if g:tex_indent_brace
|
||||
if line =~ '[[{]$'
|
||||
let ind += &sw
|
||||
let ind += shiftwidth()
|
||||
let stay = 0
|
||||
endif
|
||||
|
||||
if cline =~ '^\s*\\\?[\]}]' && s:CheckPairedIsLastCharacter(v:lnum, indent(v:lnum))
|
||||
let ind -= &sw
|
||||
let ind -= shiftwidth()
|
||||
let stay = 0
|
||||
endif
|
||||
|
||||
@ -266,7 +266,7 @@ function! GetTeXIndent() " {{{
|
||||
let char = line[i]
|
||||
if char == ']' || char == '}'
|
||||
if s:CheckPairedIsLastCharacter(lnum, i)
|
||||
let ind -= &sw
|
||||
let ind -= shiftwidth()
|
||||
let stay = 0
|
||||
endif
|
||||
endif
|
||||
@ -280,12 +280,12 @@ function! GetTeXIndent() " {{{
|
||||
if g:tex_indent_items
|
||||
" '\item' or '\bibitem' itself:
|
||||
if cline =~ g:tex_items
|
||||
let ind = ind - &sw
|
||||
let ind = ind - shiftwidth()
|
||||
let stay = 0
|
||||
endif
|
||||
" lines following to '\item' are intented once again:
|
||||
if line =~ g:tex_items
|
||||
let ind = ind + &sw
|
||||
let ind = ind + shiftwidth()
|
||||
let stay = 0
|
||||
endif
|
||||
endif
|
||||
@ -317,9 +317,9 @@ function! s:GetLastBeginIndentation(lnum) " {{{
|
||||
return indent(lnum)
|
||||
endif
|
||||
if line =~ g:tex_itemize_env
|
||||
return indent(lnum) + 2 * &sw
|
||||
return indent(lnum) + 2 * shiftwidth()
|
||||
endif
|
||||
return indent(lnum) + &sw
|
||||
return indent(lnum) + shiftwidth()
|
||||
endif
|
||||
endfor
|
||||
return -1
|
||||
@ -347,7 +347,7 @@ function! s:GetEndIndentation(lnum) " {{{
|
||||
let min_indent = min([min_indent, indent(lnum)])
|
||||
endif
|
||||
endfor
|
||||
return min_indent - &sw
|
||||
return min_indent - shiftwidth()
|
||||
endfunction
|
||||
|
||||
" Most of the code is from matchparen.vim
|
||||
|
||||
Reference in New Issue
Block a user