我有一些代码:
Vector3 targetCoords = this.GetFiringSolution(
targetObject,
targetObject.root.rigidbody.velocity,
muzzle,
verticalRotator.root.rigidbody.velocity,
projectileForce
)但当我在vim中使用(gg+G)时,它会将其转换为
Vector3 targetCoords = this.GetFiringSolution(
targetObject,
targetObject.root.rigidbody.velocity,
muzzle,
verticalRotator.root.rigidbody.velocity,
projectileForce
)下面是my :set输出:
--- Options ---
autoindent cindent fileformat=unix history=50 modified scroll=28 smartindent notextmode
background=dark diffexpr=MyDiff() filetype=cs hlsearch number shiftwidth=4 syntax=cs visualbell
backup expandtab helplang=en incsearch ruler showmatch tabstop=4 window=57
backspace=indent,eol,start
comments=sO:* -,mO:* ,exO:*/,s1:/*,mb:*,ex:*/,:///,://
formatoptions=croql
keymodel=startsel,stopsel
selection=exclusive
selectmode=mouse,key
viminfo=%,'100,<50,s10,h,rA:,rB:
whichwrap=b,s,<,>,[,]
wildignore=*.meta,*.swp有什么办法可以阻止这种行为吗?我试着查看cimoptions,但没有完全理解。这发生在C#和PHP中的多行函数调用(和类似的事情)中--可能是其他的。
我也尝试了打开si/ai和两者,但都没有帮助。
提前谢谢。
发布于 2013-10-23 13:34:33
来自cinoptions-values的vim帮助
+N Indent a continuation line (a line that spills onto the next)
inside a function N additional characters. (default
'shiftwidth').
Outside of a function, when the previous line ended in a
backslash, the 2 * N is used.因此,看起来你要么完全禁用cindent,要么不得不在函数外部使用双缩进。
https://stackoverflow.com/questions/19529803
复制相似问题