5

这些是我在 .vimrc中的格式选项:

set formatoptions=tqronw
set formatlistpat=^\\([\\-\\*]\\\|[0-9]\\+[.)]\\)\\s*
set textwidth=72
set autoindent

1)
我的文字:

- This is my text this is my text this is my text this is my text this is my text this is my text.

格式化后的输出:

- This is my text this is my text this is my text this is my text this is my 
 text this is my text.

预期输出:

- This is my text this is my text this is my text this is my text this is my 
  text this is my text.

2)
我的文字:

for Biochemistry, conducted a quality clinical study to determine the effects of microwave cooking on food

格式化后的输出:

for Biochemistry, conducted a quality clinical study to determine the
 effects of microwave cooking on food

预期输出:

for Biochemistry, conducted a quality clinical study to determine the
effects of microwave cooking on food

编辑
为我的第一个问题找到了解决方案:)
文本中有(不可见)nbsp(无中断空格)。
当我用普通空格替换时,格式符合预期

4

1 回答 1

1

让我对你的第二个问题进行大胆的猜测。尝试添加:

set nosmartindent
于 2012-06-25T06:29:12.617 回答