diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-11-07 01:34:28 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-11-07 01:37:30 +0100 |
commit | a39bf019580d82f8ca5f9e8d99dd856418ffc491 (patch) | |
tree | 9040de854b2065059b7b41ab1c5d099b9174b1a8 /runtime/indent/tex.vim | |
parent | 599170de8304d74baa3e18df0929330e3773a14d (diff) | |
download | rneovim-a39bf019580d82f8ca5f9e8d99dd856418ffc491.tar.gz rneovim-a39bf019580d82f8ca5f9e8d99dd856418ffc491.tar.bz2 rneovim-a39bf019580d82f8ca5f9e8d99dd856418ffc491.zip |
vim-patch:3ec574f2b549
Update runtime files.
Includes changing &sw to shiftwidth() for all indent scripts.
https://github.com/vim/vim/commit/3ec574f2b549f456f664f689d6da36dc5719aeb9
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 fc6cc0a638..1a4d8b1cb6 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 |