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

2 番目の質問については大まかな推測をさせてください。追加してみてください:

set nosmartindent
于 2012-06-25T06:29:12.617 に答える