然后按照里面的说明,在~/.vimrc中添加
代码: 全选
" REQUIRED. This makes vim invoke Latex-Suite when you open a tex file.
filetype plugin on
" IMPORTANT: win32 users will need to have 'shellslash' set so that latex
" can be called correctly.
" set shellslash (我是Ubuntu)
" IMPORTANT: grep will sometimes skip displaying the file name if you
" search in a singe file. This will confuse Latex-Suite. Set your grep
" program to always generate a file-name.
set grepprg=grep\ -nH\ $*
" OPTIONAL: This enables automatic indentation as you type.
filetype indent on
" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
" The following changes the default filetype back to 'tex':
let g:tex_flavor='latex'
代码: 全选
" this is mostly a matter of taste. but LaTeX looks good with just a bit
" of indentation.
set sw=2
" TIP: if you write your \label's as \label{fig:something}, then if you
" type in \ref{fig: and press <C-n> you will automatically cycle through
" all the figure labels. Very useful!
set iskeyword+=:
代码: 全选
1 % File: sample.tex
2 % Created: Sun Jun 22 04:00 PM 2003 P
3 % Last Change: Sun Jun 22 04:00 PM 2003 P
4 %
5 \documentclass[a4paper]{article}
6 \begin{document}
7
8 \end{document}
代码: 全选
\begin{amsmath}
\end{amsmath}
解决这个问题本以为可以好好用了,结果又马上发现问题,并且不知道如何解决:
在正文区输入eqnarray,在normal下按F5,结果不是
代码: 全选
\begin{eqnarray}
\label{}<++>
\end{eqnarray}<++>
代码: 全选
\begin{eqnarray}
『cursor』
\label{<++>}
\end{eqnarray}<++>