<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tex.vim</title>
<style type="text/css">
.enscript-comment { font-style: italic; color: rgb(178,34,34); }
.enscript-function-name { font-weight: bold; color: rgb(0,0,255); }
.enscript-variable-name { font-weight: bold; color: rgb(184,134,11); }
.enscript-keyword { font-weight: bold; color: rgb(160,32,240); }
.enscript-reference { font-weight: bold; color: rgb(95,158,160); }
.enscript-string { font-weight: bold; color: rgb(188,143,143); }
.enscript-builtin { font-weight: bold; color: rgb(218,112,214); }
.enscript-type { font-weight: bold; color: rgb(34,139,34); }
.enscript-highlight { text-decoration: underline; color: 0; }
</style>
</head>
<body id="top">
<h1 style="margin:8px;" id="f1">tex.vim&nbsp;&nbsp;&nbsp;<span style="font-weight: normal; font-size: 0.5em;">[<a href="tex.vim">plain text</a>]</span></h1>
<hr/>
<div></div>
<pre>
&quot; LaTeX filetype plugin
&quot; Language:     LaTeX (ft=tex)
&quot; Maintainer:   Benji Fisher, Ph.D. &lt;<a href="mailto:benji@member.AMS.org">benji@member.AMS.org</a>&gt;
&quot; Version:	1.4
&quot; Last Change:	Wed 19 Apr 2006
&quot;  URL:		<a href="http://www.vim.org/script.php?script_id=411">http://www.vim.org/script.php?script_id=411</a>

&quot; Only do this when not done yet for this buffer.
if exists(&quot;b:did_ftplugin&quot;)
  finish
endif

&quot; Start with plain TeX.  This will also define b:did_ftplugin .
source $VIMRUNTIME/ftplugin/plaintex.vim

&quot; Avoid problems if running in 'compatible' mode.
let s:save_cpo = &amp;cpo
set cpo&amp;vim

let b:undo_ftplugin .= &quot;| setl inex&lt;&quot;

&quot; Allow &quot;[d&quot; to be used to find a macro definition:
&quot; Recognize plain TeX \def as well as LaTeX \newcommand and \renewcommand .
&quot; I may as well add the AMS-LaTeX DeclareMathOperator as well.
let &amp;l:define .= '\|\\\(re\)\=new\(boolean\|command\|counter\|environment\|font'
	\ . '\|if\|length\|savebox\|theorem\(style\)\=\)\s*\*\=\s*{\='
	\ . '\|DeclareMathOperator\s*{\=\s*'

&quot; Tell Vim how to recognize LaTeX \include{foo} and plain \input bar :
let &amp;l:include .= '\|\\include{'
&quot; On some file systems, &quot;{&quot; and &quot;}&quot; are inluded in 'isfname'.  In case the
&quot; TeX file has \include{fname} (LaTeX only), strip everything except &quot;fname&quot;.
let &amp;l:includeexpr = &quot;substitute(v:fname, '^.\\{-}{\\|}.*', '', 'g')&quot;

&quot; The following lines enable the macros/matchit.vim plugin for
&quot; extended matching with the % key.
&quot; ftplugin/plaintex.vim already defines b:match_skip and b:match_ignorecase
&quot; and matches \(, \), \[, \], \{, and \} .
if exists(&quot;loaded_matchit&quot;)
  let b:match_words .= ',\\begin\s*\({\a\+\*\=}\):\\end\s*\1'
endif &quot; exists(&quot;loaded_matchit&quot;)

let &amp;cpo = s:save_cpo
unlet s:save_cpo

&quot; vim:sts=2:sw=2:
</pre>
<hr />
</body></html>