Paranoid text spacing for good readability, Pangu (PánGǔ)
is an IntelliJ Platform-Based IDEs plugin that automatically inserts whitespace between CJK (Chinese, Japanese, Korean), half-width English, digit, and symbol characters.
You can use this plugin to spacing files including markdown, plain text, Java code, HTML, XML, and more.
Here are some examples:
- 你好Hello世界
+ 你好 Hello 世界
- 我今天18岁了
+ 我今天 18 岁了
- 咖啡因可以抑制θ脑波和α脑波,并提高β脑波。
+ 咖啡因可以抑制 θ 脑波和 α 脑波,并提高 β 脑波。
-
Using IDE built-in plugin system:
Settings/Preferences > Plugins > Marketplace > Search for "Pangu" > Install Plugin
-
Manually:
Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...
You can use this plugin to spacing content in editor and commit message.
When you select some text in editor, the plugin will only space the selected text. Otherwise, it will space the whole file.
There are three ways to use:
-
See editor popup menu > Pangu Format
-
Use Alt + . / ⌥ + .
-
Use Reformat Code Action (Ctrl + Alt + L / ⌘ + ⌥ + L by default)
Pangu Format Action will perform after internal Reformat Code Action.
You can disable this feature in Settings/Preferences > Tools > Pangu
There are also three ways to use this plugin in commit message:
-
Click the Pangu Format icon besides the commit message text area.
-
Use Alt + . / ⌥ + .
-
Use Reformat Commit Message Action (Ctrl + Alt + L / ⌘ + ⌥ + L by default)
Pangu Format Action will perform after internal Reformat Commit Message action.
- Thanks XiaoYao for helping design the plugin icon.
- Thanks vinta for his great job pangu.js.
- IntelliJ Platform Plugin Template.