这些是我在 .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(无中断空格)。
当我用普通空格替换时,格式符合预期