pangu-spacing icon indicating copy to clipboard operation
pangu-spacing copied to clipboard

How to let auto-fill mode count virtual spaces?

Open zzjjzzgggg opened this issue 5 years ago • 1 comments

Suppose fill-column is 80. The following sentence has with 80, and is displayed in one line. a字a字a字a字a字a字a字a字a字a字a字a字a字a字a字a字a字a字a字a字a字a字a字a字a字a字a字a

When virtual spaces are added by pangu-spacing, the above sentence becomes a 字 a 字 a 字 a 字 a 字 a 字 a 字 a 字 a 字 a 字 a 字 a 字 a 字 a 字 a 字 a 字 a 字 a 字 a 字 a 字 a 字 a 字 a 字 a 字 a 字 a 字 a 字 a

However, auto-fill still thinks its width is 80, and hence doesn't fill it.

Is it possible to fill it properly?

zzjjzzgggg avatar Jan 14 '19 16:01 zzjjzzgggg

Not sure, maybe we need to add some hook to auto-fill since pangu-spacing only insert the white space on the overlay, not the buffer itself.

The quickly way is to make pangu-spacing insert the space to the buffer, you can turn this option on by following code:

 (setq pangu-spacing-real-insert-separtor t)

But enable this option is not recommended, since it will modify your contents.

coldnew avatar Jan 15 '19 02:01 coldnew