偶然发现了这个不错的插件,但是似乎作者已经弃坑了,提 issue 没有回应,便决定 fock 一份自己动手,丰衣足食。(与原版冲突,不可同时使用)
- Add whitespace between Chinese and English
- Add whitespace between Chinese and
[ ]
, \ . : ; ? !
after Chinese characters to,、。:;?!
()
around Chinese characters to()
[] <> `
remains untouched
- Continuous
。
(at least 3) to......
, e.g.。
to......
- Truncate more than three continuous
? !
to only three ones. - Truncate continuous
。,;:、“”『』〖〗《》
to only one.
Note that all functions are based on Regex, it cannot do brace match, thus it lacks the ability to handle very complex cases, but it's enough for normal use. Maybe improve in the future.
Ctrl+Shift+P -> Pangu Format
or
F1 -> Pangu Format
Or
Right Click in editor (when open markdown file) -> Pangu Format
Name | Description |
---|---|
pangu.auto_format_on_save | Auto apply Pangu format on save |
Thanks to pangu.vim, writing4cn and pangu.