mirror of
https://github.com/rememberber/MooTool.git
synced 2026-09-19 02:37:00 +08:00
快捷键:格式化支持intellij mac的command+option+L
This commit is contained in:
+2
-1
@@ -67,7 +67,8 @@ public class QuickNoteRSyntaxTextViewer extends RSyntaxTextArea {
|
||||
public void keyPressed(KeyEvent evt) {
|
||||
if ((evt.isControlDown() || evt.isMetaDown()) && evt.getKeyCode() == KeyEvent.VK_S) {
|
||||
QuickNoteListener.quickSave(true, true);
|
||||
} else if ((evt.isControlDown() || evt.isMetaDown()) && evt.isShiftDown() && evt.getKeyCode() == KeyEvent.VK_F) {
|
||||
} else if (((evt.isControlDown() || evt.isMetaDown()) && evt.isShiftDown() && evt.getKeyCode() == KeyEvent.VK_F)
|
||||
|| evt.isMetaDown() && evt.isAltDown() && evt.getKeyCode() == KeyEvent.VK_L) {
|
||||
QuickNoteListener.format();
|
||||
} else if ((evt.isControlDown() || evt.isMetaDown()) && evt.getKeyCode() == KeyEvent.VK_F) {
|
||||
QuickNoteListener.showFindPanel();
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Json格式化"/>
|
||||
<text value="格式化"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="5922d" class="javax.swing.JLabel">
|
||||
@@ -71,7 +71,7 @@
|
||||
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Ctrl+Shift+F"/>
|
||||
<text value="Ctrl+Shift+F或option+command+L"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="6ce1f" class="javax.swing.JLabel">
|
||||
|
||||
@@ -80,7 +80,7 @@ public class KeyMapDialog extends JDialog {
|
||||
label2.setText("查找");
|
||||
panel1.add(label2, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
final JLabel label3 = new JLabel();
|
||||
label3.setText("Json格式化");
|
||||
label3.setText("格式化");
|
||||
panel1.add(label3, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
final JLabel label4 = new JLabel();
|
||||
label4.setText("删除选择的行");
|
||||
@@ -92,7 +92,7 @@ public class KeyMapDialog extends JDialog {
|
||||
label6.setText("Ctrl+F");
|
||||
panel1.add(label6, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
final JLabel label7 = new JLabel();
|
||||
label7.setText("Ctrl+Shift+F");
|
||||
label7.setText("Ctrl+Shift+F或option+command+L");
|
||||
panel1.add(label7, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
final JLabel label8 = new JLabel();
|
||||
label8.setText("Ctrl+D");
|
||||
|
||||
@@ -115,7 +115,8 @@ public class JsonBeautyListener {
|
||||
public void keyPressed(KeyEvent evt) {
|
||||
if ((evt.isControlDown() || evt.isMetaDown()) && evt.getKeyCode() == KeyEvent.VK_S) {
|
||||
quickSave(true);
|
||||
} else if ((evt.isControlDown() || evt.isMetaDown()) && evt.isShiftDown() && evt.getKeyCode() == KeyEvent.VK_F) {
|
||||
} else if (((evt.isControlDown() || evt.isMetaDown()) && evt.isShiftDown() && evt.getKeyCode() == KeyEvent.VK_F) ||
|
||||
evt.isMetaDown() && evt.isAltDown() && evt.getKeyCode() == KeyEvent.VK_L) {
|
||||
String jsonText = jsonBeautyForm.getTextArea().getText();
|
||||
jsonBeautyForm.getTextArea().setText(formatJson(jsonText));
|
||||
jsonBeautyForm.getTextArea().setCaretPosition(0);
|
||||
|
||||
Reference in New Issue
Block a user