Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to let auto-fill mode count virtual spaces? #27

Open
zzjjzzgggg opened this issue Jan 14, 2019 · 1 comment
Open

How to let auto-fill mode count virtual spaces? #27

zzjjzzgggg opened this issue Jan 14, 2019 · 1 comment

Comments

@zzjjzzgggg
Copy link

zzjjzzgggg commented Jan 14, 2019

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 zzjjzzgggg changed the title How to let auto-fill mode count virtual spaces? How to let auto-fill mode count virtual spaces? Jan 14, 2019
@coldnew
Copy link
Owner

coldnew commented Jan 15, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants