【发布时间】:2019-02-21 19:34:09
【问题描述】:
我只是在看this 的帖子,它描述了如何在 vim 中包装整个单词。我正在寻找一种方法来键入缩进,或者在我的情况下,缺少它。
我通常用V 选择几行,然后按gq 重新格式化并重新换行。
比方说,我有以下文件
*Inside of window *Outside of window
|---------------------------------------|
|This is a bla like of text that will wr|ap here
|can you see the wrap |
| |
|---------------------------------------|
结果将是:
*Inside of window *Outside of window
|---------------------------------------|
|This is a bla like of text that will |
|wrap here can you see the wrap |
| |
|---------------------------------------|
到目前为止一切顺利。
现在假设,我有以下带有一些乳胶标签的文档
*Inside of window *Outside of window
|---------------------------------------|
|\begin{abstract} |
|This is a bla like of text that will wr|ap here
|can you see the wrap |
|\end{abstract} |
| |
|---------------------------------------|
结果如下,其中下一行包含不受欢迎的\t
*Inside of window *Outside of window
|---------------------------------------|
|\begin{abstract} |
|This is a bla like of text that will |
| wrap here can you see the wrap |
|\end{abstract} |
| |
|---------------------------------------|
但是,我的目标是得到如下结果,下一行没有不受欢迎的\t。
*Inside of window *Outside of window
|---------------------------------------|
|\begin{abstract} |
|This is a bla like of text that will |
|wrap here can you see the wrap |
|\end{abstract} |
| |
|---------------------------------------|
我尝试将set breakindent 添加到我的.vimrc,但没有成功。目前这些是我使用的关于包装的行。
set wrap " Wrap
set textwidth=79 " Default Text Width
【问题讨论】: