我将此文本插入Vim:
t tttt ttttttttt tt tttt tt ttt tttttt-tttt-ttttttt
tttttttttttttttttttttttttttttttttttttttttttttttttttttt ttttt ttt ttt tttttt
ttttttt tttt ttttttt: ttttttt tt ttttttt, ttttttt tt tttttt, tttttt tt ttttttt,
tttttt tt tttttt ttt. t tttttt tt ttt (tttt) ttttttt-tttttt-tt-ttttttt tttttt
for the "tttttt in ttttttt" part of the issue (in the previous week I have
worked on the "objects in objects" part). This part is about making it
possible for the end user to add arrays in objects. First of all I checked
that the current implementation allows putting arrays in objects at least
from the schema passed to the plugin constructor.
然后我在视觉上选择所有这些行并按gq
。内容变为:
t tttt ttttttttt tt tttt tt ttt tttttt-tttt-ttttttt
tttttttttttttttttttttttttttttttttttttttttttttttttttttt ttttt ttt ttt tttttt
ttttttt tttt ttttttt: ttttttt tt ttttttt, ttttttt tt tttttt, tttttt tt ttttttt,
tttttt tt tttttt ttt. t tttttt tt ttt (tttt) ttttttt-tttttt-tt-ttttttt tttttt
for the "tttttt in ttttttt" part of the issue (in the previous week I have
worked on the "objects in objects" part). This part is about making it
possible for the end user to add arrays in objects. First of all I checked
that the current implementation allows putting arrays in objects at least
from the schema passed to the plugin constructor.
请向我解释为什么在最后四行的开头有空白。for
在某些编程语言中,第五行的第一个单词()是否会启动for
循环,是否有可能使Vim认为它应启动一个新的缩进代码块,即使这些行位于未保存的文件或Markdown文件中?如何避免这种行为,并gq
停止插入该空格?
我的comments
设置具有默认值:s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-
。你可以在这里看到我的.vimrc
文件。
更新:我的fo
(formatoptions
)选项的值为tcq
,formatexpr
并且formatprg
选项为空。
如果文件已保存/不是新文件,有什么不同吗?
—
加百利·彼得罗维
这是相同的行为。
—
silviubogan
然后,您可以从文本中删除该信息,以使问题更简单。
—
加百利·彼得罗维
@GabrielPetrovay,谢谢您的反馈!
—
silviubogan
:-)
我更新了问题。
您的“ fo”选项和“ formatexpr”以及formatprg选项是什么?
—
Christian Brabandt 2015年