pangu-spacing
pangu-spacing copied to clipboard
How to let auto-fill mode count virtual spaces?
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?
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.