diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-06-13 18:12:01 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-06-13 18:12:01 +0200 |
commit | 3ec574f2b549f456f664f689d6da36dc5719aeb9 (patch) | |
tree | 8aa7d766ebc0eb3919fdc678e6f48dd0a2b36673 /runtime/indent/tex.vim | |
parent | 2102035488e80ef6fd5038ed15d21672712ba0f6 (diff) | |
download | vim-git-3ec574f2b549f456f664f689d6da36dc5719aeb9.tar.gz |
Update runtime files.
Includes changing &sw to shiftwidth() for all indent scripts.
Diffstat (limited to 'runtime/indent/tex.vim')
-rw-r--r-- | runtime/indent/tex.vim | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/runtime/indent/tex.vim b/runtime/indent/tex.vim index fc6cc0a63..1a4d8b1cb 100644 --- a/runtime/indent/tex.vim +++ b/runtime/indent/tex.vim @@ -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 |