首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何控制vim度量段落的方式

如何控制vim度量段落的方式
EN

Stack Overflow用户
提问于 2013-02-27 22:02:41
回答 1查看 143关注 0票数 2

在vim中编辑latex代码时,我经常输入gwap来重新对齐当前段落。不幸的是,当段落包含等式或其他类似的latex控制代码时,格式就会完全混淆。

例如,如果我试图重新对齐对齐的段落

代码语言:javascript
复制
Our network model follows that of Nakajima et
al.~\\cite{nakajima_robustness_2010} which is in turn based on the model of Li
et al.~\\cite{li_yeast_2004}. We define the dynamics of a network through the
following recurrence relation
\\[
X_i^{t+1} = \\left\\{ \\begin{array}{cl}
  1 & \\textrm{if $\\sum_j J_{ij} X_j^t > 0$} \\\\
  0 & \\textrm{if $\\sum_j J_{ij} X_j^t < 0$} \\\\
  \\theta_i & \\textrm{if $\\sum_j J_{ij} X_j^t = 0$}
\\end{array} \\right.
\\]
$X_i^t \\in \\{0, 1\\}$ is the expression state of gene $i$ at time point $t$.
$J_{ij}$ represents the regulatory effect of gene $j$ on gene $i$. $J_{ij} >
0$, $J_{ij} < 0$ and $J_{ij} = 0$  imply activation, repression and the absence
of regulation respectively. $\\theta_i$ is the constitutive expression state of
gene $i$.

然后我就得到了这个烂摊子:

代码语言:javascript
复制
Our network model follows that of Nakajima et
al.~\\cite{nakajima_robustness_2010} which is in turn based on the model of Li
et al.~\\cite{li_yeast_2004}. We define the dynamics of a network through the
following recurrence relation \\[ X_i^{t+1} = \\left\\{ \\begin{array}{cl} 1 &
                              \\textrm{if $\\sum_j J_{ij} X_j^t > 0$} \\\\ 0 &
                       \\textrm{if $\\sum_j J_{ij} X_j^t < 0$} \\\\ \\theta_i &
                       \\textrm{if $\\sum_j J_{ij} X_j^t = 0$} \\end{array}
                   \\right.  \\] $X_i^t \\in \\{0, 1\\}$ is the expression state of
                   gene $i$ at time point $t$.  $J_{ij}$ represents the
                   regulatory effect of gene $j$ on gene $i$. $J_{ij} > 0$,
                   $J_{ij} < 0$ and $J_{ij} = 0$  imply activation, repression
                   and the absence of regulation respectively. $\\theta_i$ is
                   the constitutive expression state of gene $i$.

我如何告诉vim段落不应该像\[ \] \begin{} \end{}那样跨越代码

谢谢,约翰。

EN

回答 1

Stack Overflow用户

发布于 2013-02-28 00:06:42

段落的概念来自nroff宏的旧vi继承(不管是什么:-);它不能被实质性地改变。最近,support custom definitions via regular expressionsvim_dev mailing list上出现了一个补丁。

到目前为止,您必须通过使用视觉选择来解决这个问题:Vjjjgw。或者,您可以为Tex段落编写自己的文本对象。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15114001

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档