Skip to content

Commit

Permalink
Update files for version 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LiLittleCat committed Aug 12, 2022
1 parent d1eda57 commit 4dc733d
Show file tree
Hide file tree
Showing 10 changed files with 127 additions and 28 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@

## [Unreleased]

### Added
- Support all IntelliJ Platform-Based IDEs.
- Support format in commit message.
- Support format in Reformat Code Action and Reformat Commit Message Action.
- Change the keyboard shortcut because it conflicts with "Commit and Push" while using the non-model commit interface in Version Control.

## [1.0.0]
### Added
- Spacing selected content.
### Added
- Spacing selected content.
- Spacing whole file.

68 changes: 57 additions & 11 deletions DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,74 @@
<!-- Plugin description -->
Automatically inserts whitespace between CJK (Chinese, Japanese, Korean), half-width English, digit, and symbol characters.

When you select some text, the plugin will only space the selected text.
## Usage

You can use this plugin to spacing content in editor and commit message.

### In Editor
When you select some text in editor, the plugin will only space the selected text.
Otherwise, it will space the whole file.

### Usage
There are three ways to use this plugin to spacing:
- See editor popup menu > <kbd>Pangu Format</kbd>.
- See <kbd>Tools</kbd> > <kbd>Pangu Format</kbd>.
- Use <kbd>⌥ + .</kbd> / <kbd>Alt + .</kbd> .
There are three ways to use:
- See editor popup menu > <kbd>Pangu Format</kbd>

- Use <kbd>Alt + .</kbd> / <kbd>⌥ + .</kbd>

- Use Reformat Code Action (<kbd>Ctrl + Alt + L</kbd> / <kbd>⌘ + ⌥ + L</kbd> by default)

Pangu Format Action will perform after internal Reformat Code Action.

You can disable this feature in <kbd>Settings/Preferences</kbd> > <kbd>Tools</kbd> > <kbd>Pangu</kbd>

### In Commit message

There are also three ways to use this plugin in commit message:

- Click the Pangu Format icon besides the commit message text area.

- Use <kbd>Alt + .</kbd> / <kbd>⌥ + .</kbd>

- Use Reformat Commit Message Action (<kbd>Ctrl + Alt + L</kbd> / <kbd>⌘ + ⌥ + L</kbd> by default)

Pangu Format Action will perform after internal Reformat Commit Message action.


If you find something is not working or missing, feel free to submit an issue on [GitHub repo](https://github.com/LiLittleCat/intellij-pangu).

---
<br/>

自动在 CJK(中文、日文、韩文)、英文、数字和符号之间插入空格。

## 使用

你可以使用这个插件对编辑器中的文本和提交信息里的文本进行空格插入格式化。

### 编辑器中的文本

当你在文件中选中部分内容时,该插件只会在选中的部分进行空格插入。 没有选中时,该插件会在当前文件的所有文本进行空格插入。

### 使用方法
有三种方式使用此插件:
- 在编辑时右键弹出菜单中使用 > <kbd>Pangu Format</kbd>。
- 使用 <kbd>Tools</kbd> > <kbd>Pangu Format</kbd>。
- 使用快捷键 <kbd>⌥ + ⇧ + P</kbd> / <kbd>Alt + Shift + P</kbd>。
有三种使用方式:

- 在编辑时右键弹出菜单中使用 <kbd>Pangu Format</kbd>
- 使用快捷键 <kbd>Alt + .</kbd> / <kbd>⌥ + .</kbd>
- 使用软件自带格式化代码功能(默认快捷键:<kbd>Ctrl + Alt + L</kbd> / <kbd>⌘ + ⌥ + L</kbd>)

插件会在自带格式化代码功能之后执行空格插入。

你可以在 <kbd>Settings/Preferences</kbd> > <kbd>Tools</kbd> > <kbd>Pangu</kbd> 关闭此功能:

### 提交信息中的文本

同样有三种方式:

- 点击提交信息旁边的图标

- 使用快捷键 <kbd>Alt + .</kbd> / <kbd>⌥ + .</kbd>

- 使用软件自带格式化提交信息功能(默认快捷键:<kbd>Ctrl + Alt + L</kbd> / <kbd>⌘ + ⌥ + L</kbd>)

插件会在自带格式化提交信息功能之后执行空格插入。


有任何问题或者建议,欢迎在 [GitHub repo](https://github.com/LiLittleCat/intellij-pangu) 提交 issue。
Expand Down
38 changes: 31 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,43 @@ Here are some examples:
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>

## Usage
When you select some text, the plugin will only space the selected text.

You can use this plugin to spacing content in editor and commit message.

### In Editor
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 this plugin to spacing:
- See editor popup menu > <kbd>Pangu Format</kbd>.
There are three ways to use:
- See editor popup menu > <kbd>Pangu Format</kbd>

![EditorPopupMenu](example/EditorPopupMenu.png)

- See <kbd>Tools menu</kbd> > <kbd>Pangu Format</kbd>.
- Use <kbd>Alt + .</kbd> / <kbd>⌥ + .</kbd>

- Use Reformat Code Action (<kbd>Ctrl + Alt + L</kbd> / <kbd>⌘ + ⌥ + L</kbd> by default)

Pangu Format Action will perform after internal Reformat Code Action.

You can disable this feature in <kbd>Settings/Preferences</kbd> > <kbd>Tools</kbd> > <kbd>Pangu</kbd>

![Setting](example/Setting.png)


### In Commit message

There are also three ways to use this plugin in commit message:

- Click the Pangu Format icon besides the commit message text area.

![CommitMessage](example/CommitMessage.png)

- Use <kbd>Alt + .</kbd> / <kbd>⌥ + .</kbd>

- Use Reformat Commit Message Action (<kbd>Ctrl + Alt + L</kbd> / <kbd>⌘ + ⌥ + L</kbd> by default)

![Tools](example/Tools.png)
Pangu Format Action will perform after internal Reformat Commit Message action.

- Use <kbd>⌥ + .</kbd> / <kbd>Alt + .</kbd> .

## Thanks

Expand All @@ -66,4 +90,4 @@ There are three ways to use this plugin to spacing:
[XiaoYao's link]: https://space.bilibili.com/15765234
[template]: https://github.com/JetBrains/intellij-platform-plugin-template
[vinta]: https://github.com/vinta
[pangu.js]: https://github.com/vinta/pangu.js
[pangu.js]: https://github.com/vinta/pangu.js
31 changes: 27 additions & 4 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,42 @@

## 使用

你可以使用这个插件对编辑器中的文本和提交信息里的文本进行空格插入格式化。

### 编辑器中的文本

当你在文件中选中部分内容时,该插件只会在选中的部分进行空格插入。 没有选中时,该插件会在当前文件的所有文本进行空格插入。

有三种使用方式:

- 在编辑时右键弹出菜单中使用 <kbd>Pangu Format</kbd>
- 在编辑时右键弹出菜单中使用 <kbd>Pangu Format</kbd>

![EditorPopupMenu](example/EditorPopupMenu.png)

- 在 <kbd>Tools</kbd> 中使用 <kbd>Pangu Format</kbd>。
- 使用快捷键 <kbd>Alt + .</kbd> / <kbd>⌥ + .</kbd>

- 使用软件自带格式化代码功能(默认快捷键:<kbd>Ctrl + Alt + L</kbd> / <kbd>⌘ + ⌥ + L</kbd>)

插件会在自带格式化代码功能之后执行空格插入。

你可以在 <kbd>Settings/Preferences</kbd> > <kbd>Tools</kbd> > <kbd>Pangu</kbd> 关闭此功能:

![Setting](example/Setting.png)


### 提交信息中的文本

同样有三种方式:

- 点击提交信息旁边的图标

![CommitMessage](example/CommitMessage.png)

- 使用快捷键 <kbd>Alt + .</kbd> / <kbd>⌥ + .</kbd>

![Tools](example/Tools.png)
- 使用软件自带格式化提交信息功能(默认快捷键:<kbd>Ctrl + Alt + L</kbd> / <kbd>⌘ + ⌥ + L</kbd>)

- Use <kbd>⌥ + .</kbd> / <kbd>Alt + .</kbd>
插件会在自带格式化提交信息功能之后执行空格插入

## 致谢

Expand Down
Binary file added example/CommitMessage.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/EditorPopupMenu.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/Setting.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed example/Tools.png
Binary file not shown.
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pluginGroup = com.lilittlecat.plugin.intellij-pangu
pluginName = Pangu
# SemVer format -> https://semver.org
pluginVersion = 1.0.0
pluginVersion = 1.1.0

# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
Expand All @@ -13,8 +13,8 @@ pluginUntilBuild = 222.*

# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
platformType = IC
platformVersion = 193.5233.102
#platformVersion = 2022.1
#platformVersion = 193.5233.102
platformVersion = 2022.1

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<action id="Pangu.Format.Editor"
class="com.lilittlecat.plugin.action.PanguFormatAction"
text="Pangu Format"
description="Pangu format text in editor"
description="Pangu format"
icon="/icons/pangu.svg">
<keyboard-shortcut keymap="$default" first-keystroke="alt PERIOD"/>
<add-to-group group-id="EditorPopupMenu" anchor="first"/>
Expand Down

0 comments on commit 4dc733d

Please sign in to comment.