comparison runtime/indent/tex.vim @ 13735:a62eeee5f116

Update runtime files. commit https://github.com/vim/vim/commit/7dda86f2ff35bb80afce4da24782fd58216bbe50 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Apr 20 22:36:41 2018 +0200 Update runtime files.
author Christian Brabandt <cb@256bit.org>
date Fri, 20 Apr 2018 22:45:07 +0200
parents 63b0b7b79b25
children a9fdf01085a8
comparison
equal deleted inserted replaced
13734:600a38fe5c00 13735:a62eeee5f116
1 " Vim indent file 1 " Vim indent file
2 " Language: LaTeX 2 " Language: LaTeX
3 " Maintainer: Yichao Zhou <broken.zhou AT gmail.com> 3 " Maintainer: Yichao Zhou <broken.zhou AT gmail.com>
4 " Created: Sat, 16 Feb 2002 16:50:19 +0100 4 " Created: Sat, 16 Feb 2002 16:50:19 +0100
5 " Version: 0.9.4 5 " Version: 1.0.0
6 " Please email me if you found something I can do. Comments, bug report and 6 " Please email me if you found something I can do. Comments, bug report and
7 " feature request are welcome. 7 " feature request are welcome.
8 8
9 " Last Update: {{{ 9 " Last Update: {{{
10 " 25th Sep 2002, by LH : 10 " 25th Sep 2002, by LH :
60 " (*) Fix problems for \[ and \]. Thanks Bruno for reporting. 60 " (*) Fix problems for \[ and \]. Thanks Bruno for reporting.
61 " 2017/04/30 by Yichao Zhou <broken.zhou AT gmail.com> 61 " 2017/04/30 by Yichao Zhou <broken.zhou AT gmail.com>
62 " (*) Fix a bug between g:tex_noindent_env and g:tex_indent_items 62 " (*) Fix a bug between g:tex_noindent_env and g:tex_indent_items
63 " Now g:tex_noindent_env='document\|verbatim\|itemize' (Emacs 63 " Now g:tex_noindent_env='document\|verbatim\|itemize' (Emacs
64 " style) is supported. Thanks Miles Wheeler for reporting. 64 " style) is supported. Thanks Miles Wheeler for reporting.
65 " 2018/02/07 by Yichao Zhou <broken.zhou AT gmail.com>
66 " (*) Make indentation more smart in the normal mode
65 " 67 "
66 " }}} 68 " }}}
67 69
68 " Document: {{{ 70 " Document: {{{
69 " 71 "
89 " * g:tex_indent_items 91 " * g:tex_indent_items
90 " 92 "
91 " If this variable is set, item-environments are indented like Emacs does 93 " If this variable is set, item-environments are indented like Emacs does
92 " it, i.e., continuation lines are indented with a shiftwidth. 94 " it, i.e., continuation lines are indented with a shiftwidth.
93 " 95 "
94 " NOTE: I've already set the variable below; delete the corresponding line 96 " set unset
95 " if you don't like this behaviour. 97 " ------------------------------------------------------
96 " 98 " \begin{itemize} \begin{itemize}
97 " Per default, it is unset. 99 " \item blablabla \item blablabla
98 " 100 " bla bla bla bla bla bla
99 " set unset 101 " \item blablabla \item blablabla
100 " ---------------------------------------------------------------- 102 " bla bla bla bla bla bla
101 " \begin{itemize} \begin{itemize} 103 " \end{itemize} \end{itemize}
102 " \item blablabla \item blablabla
103 " bla bla bla bla bla bla
104 " \item blablabla \item blablabla
105 " bla bla bla bla bla bla
106 " \end{itemize} \end{itemize}
107 " 104 "
108 " 105 "
109 " * g:tex_items 106 " * g:tex_items
110 " 107 "
111 " A list of tokens to be considered as commands for the beginning of an item 108 " A list of tokens to be considered as commands for the beginning of an item
288 let ind = ind + shiftwidth() 285 let ind = ind + shiftwidth()
289 let stay = 0 286 let stay = 0
290 endif 287 endif
291 endif 288 endif
292 289
293 if stay 290 if stay && mode() == 'i'
294 " If there is no obvious indentation hint, we trust our user. 291 " If there is no obvious indentation hint, and indentation is triggered
292 " in insert mode, we trust our user.
295 if empty(cline) 293 if empty(cline)
296 return ind 294 return ind
297 else 295 else
298 return max([indent(v:lnum), s:GetLastBeginIndentation(v:lnum)]) 296 return max([indent(v:lnum), s:GetLastBeginIndentation(v:lnum)])
299 endif 297 endif