我目前正在使用vim-latex插件和自编的tex.vim设置。
但是我通常使用设置为:set tw=80
的textwith 80。但是我不希望像
\caption{looongwritten text...
foo }
或在eqnarrays环境中:
\begin{eqnarray}
LOONG formulars
unwanrted wrap
\end{eqnarray}
有没有办法阻止{}
内部和eqnarray
等定义环境中的自动换行?
答案 0 :(得分:0)
试用方程式代码
%s/\\begin{eqnarray}\s*\n*\(\zs[^\(\n\)]*\ze\n\)\\end{eqnarray}/\=substitute(submatch(1),'\n', '', 'g')/gec
这用于标题,但要确保标题不应包含像\ textit,\ textbf {}之类的子括号......在其中
%s/\\caption{\(\zs\_[^}]*\ze\)}/\=substitute(submatch(1),'\n', ' ', 'g')/gec