annotate runtime/ftplugin/tex.vim @ 31537:91924f1b59af v9.0.1101

patch 9.0.1101: unused global variable Commit: https://github.com/vim/vim/commit/b536540ab3c13db629432c411e92c05c4a3808ba Author: Bram Moolenaar <Bram@vim.org> Date: Mon Dec 26 14:37:44 2022 +0000 patch 9.0.1101: unused global variable Problem: Unused global variable. Solution: Remove the variable. (closes https://github.com/vim/vim/issues/11752)
author Bram Moolenaar <Bram@vim.org>
date Mon, 26 Dec 2022 15:45:03 +0100
parents 11b656e74444
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " LaTeX filetype plugin
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: LaTeX (ft=tex)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Benji Fisher, Ph.D. <benji@member.AMS.org>
837
6bb1fa855dc9 updated for version 7.0e03
vimboss
parents: 799
diff changeset
4 " Version: 1.4
6bb1fa855dc9 updated for version 7.0e03
vimboss
parents: 799
diff changeset
5 " Last Change: Wed 19 Apr 2006
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " URL: http://www.vim.org/script.php?script_id=411
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
799
6beb2c667935 updated for version 7.0b
vimboss
parents: 7
diff changeset
8 " Only do this when not done yet for this buffer.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 if exists("b:did_ftplugin")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
799
6beb2c667935 updated for version 7.0b
vimboss
parents: 7
diff changeset
13 " Start with plain TeX. This will also define b:did_ftplugin .
6beb2c667935 updated for version 7.0b
vimboss
parents: 7
diff changeset
14 source $VIMRUNTIME/ftplugin/plaintex.vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
799
6beb2c667935 updated for version 7.0b
vimboss
parents: 7
diff changeset
16 " Avoid problems if running in 'compatible' mode.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 let s:save_cpo = &cpo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 set cpo&vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
837
6bb1fa855dc9 updated for version 7.0e03
vimboss
parents: 799
diff changeset
20 let b:undo_ftplugin .= "| setl inex<"
6bb1fa855dc9 updated for version 7.0e03
vimboss
parents: 799
diff changeset
21
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " Allow "[d" to be used to find a macro definition:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " Recognize plain TeX \def as well as LaTeX \newcommand and \renewcommand .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 " I may as well add the AMS-LaTeX DeclareMathOperator as well.
799
6beb2c667935 updated for version 7.0b
vimboss
parents: 7
diff changeset
25 let &l:define .= '\|\\\(re\)\=new\(boolean\|command\|counter\|environment\|font'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 \ . '\|if\|length\|savebox\|theorem\(style\)\=\)\s*\*\=\s*{\='
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 \ . '\|DeclareMathOperator\s*{\=\s*'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " Tell Vim how to recognize LaTeX \include{foo} and plain \input bar :
799
6beb2c667935 updated for version 7.0b
vimboss
parents: 7
diff changeset
30 let &l:include .= '\|\\include{'
25773
11b656e74444 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
31 " On some file systems, "{" and "}" are included in 'isfname'. In case the
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 " TeX file has \include{fname} (LaTeX only), strip everything except "fname".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 let &l:includeexpr = "substitute(v:fname, '^.\\{-}{\\|}.*', '', 'g')"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " The following lines enable the macros/matchit.vim plugin for
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " extended matching with the % key.
799
6beb2c667935 updated for version 7.0b
vimboss
parents: 7
diff changeset
37 " ftplugin/plaintex.vim already defines b:match_skip and b:match_ignorecase
837
6bb1fa855dc9 updated for version 7.0e03
vimboss
parents: 799
diff changeset
38 " and matches \(, \), \[, \], \{, and \} .
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 if exists("loaded_matchit")
837
6bb1fa855dc9 updated for version 7.0e03
vimboss
parents: 799
diff changeset
40 let b:match_words .= ',\\begin\s*\({\a\+\*\=}\):\\end\s*\1'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 endif " exists("loaded_matchit")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 let &cpo = s:save_cpo
3410
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 837
diff changeset
44 unlet s:save_cpo
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 " vim:sts=2:sw=2: