我刚刚在看 这篇文章,它描述了如何在 vim 中包装整个单词。公认的解决办法是:
:set formatoptions=l
:set lbr
它接受这个文本(制表符显示为 t) :
*Inside of window *Outside of window
|---------------------------------------|
|\t\tthis is a like of text that will wr|ap here
|\t\tcan you see the wrap |
| |
|---------------------------------------|
这实现了类似下面这样的行为(选项卡显示为 t) :
*Inside of window *Outside of window
|---------------------------------------|
|\t\tthis is a like of text that will |
|wrap here |
|\t\tcan you see the wrap |
| |
|---------------------------------------|
然而,我想重新定义这个函数。我希望包装线前面有相同数量的制表符,上面的行加一。即:
*Inside of window *Outside of window
|---------------------------------------|
|\t\tthis is a like of text that will |
|\t\t\twrap here |
|\t\tcan you see the wrap |
| |
|---------------------------------------|
有什么想法吗?